[英]Nginx vs Node.js - reverse proxy for multiple web-sockets servers
I want to host MULTIPLE WEBSOCKETS node servers (separate processes). 我想托管MULTIPLE WEBSOCKETS节点服务器(单独的进程)。 It may be >1000 simultaneous connections.
它可能是> 1000个同时连接。 Also I want to log and control each connection and want to make it MEMORY efficient.
此外,我想记录和控制每个连接,并希望使MEMORY高效。 Is it a good idea to write reverse proxy in node.js?
在node.js中编写反向代理是一个好主意吗? Is it worse in anything than Nginx, pure Erlang or Scala?
除了Nginx,纯Erlang还是Scala之外,它更糟糕吗? Can even Nginx handle 1000+ websockets connections?
甚至Nginx可以处理1000多个websockets连接吗? Does 1 connection freeze 1 Nginx thread?
1连接冻结1个Nginx线程吗? Is it memory efficient?
内存效率高吗?
Easy answer: nginx does not currently do HTTP/1.1 to upstreams, and thus definitely not websockets (nor does it have threads, but that's another story). 简单回答:nginx目前没有对上游做HTTP / 1.1,因此绝对不是websockets(它也没有线程,但这是另一个故事)。 A custom websockets proxy based on node.js is probably a good solution.
基于node.js的自定义websockets代理可能是一个很好的解决方案。 You could also build something in Java;
你也可以用Java构建一些东西; there are plenty of people building websockets services with it now.
现在有很多人用它来构建websockets服务。
You should consider pure nginx . 你应该考虑纯nginx 。
http://wiki.nginx.org/3rdPartyModules http://wiki.nginx.org/3rdPartyModules
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.