TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Tracking down a memory leak in Node.js and Socket.IO

66 点作者 jpallen大约 12 年前

3 条评论

exratione大约 12 年前
I suspect that most folk, such as myself, have blissfully skated past such issues in ignorance because using Node.js to field SSL traffic isn't the standard setup. Instead you run an http.Server - with or without Socket.IO latched to it - behind a websocket-capable, ssl-terminating proxy like HAProxy.<p><a href="http://www.exratione.com/2012/12/websockets-over-ssl-haproxy-nodejs-nginx/" rel="nofollow">http://www.exratione.com/2012/12/websockets-over-ssl-haproxy...</a><p>Because you're going to need all the proxy features like failover, clustering, etc, etc, anyway, so why put Node.js right up front?<p>(Nginx recently added support for websockets, so that's now a viable alternative to HAProxy in this role, but it was aggravating for a while that it wasn't).
评论 #5354071 未加载
quarterto大约 12 年前
Great writeup. I especially like the Telnet REPL trick:<p><pre><code> require("net") .createServer (socket) -&#62; repl = require('repl') repl.start("my-node-process&#62;", socket) .listen 5000, "localhost"</code></pre>
评论 #5353962 未加载
Sembiance大约 12 年前
A great alternative to socket.io is sock.js <a href="http://sockjs.org" rel="nofollow">http://sockjs.org</a> I've been using it in production now for a few weeks on <a href="http://worldofcardgames.com" rel="nofollow">http://worldofcardgames.com</a> with no issues.