简体   繁体   中英

Nginx vs Node.js - reverse proxy for multiple web-sockets servers

I want to host MULTIPLE WEBSOCKETS node servers (separate processes). It may be >1000 simultaneous connections. Also I want to log and control each connection and want to make it MEMORY efficient. Is it a good idea to write reverse proxy in node.js? Is it worse in anything than Nginx, pure Erlang or Scala? Can even Nginx handle 1000+ websockets connections? Does 1 connection freeze 1 Nginx thread? 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). A custom websockets proxy based on node.js is probably a good solution. You could also build something in Java; there are plenty of people building websockets services with it now.

You should consider pure nginx .

http://wiki.nginx.org/3rdPartyModules

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM