Node: Scale socket.io / nowjs - scale across different instances

后端 未结 3 1647
一整个雨季
一整个雨季 2021-02-20 05:12

Before starting to write my application I need to know what to do when a single node.js instance (express and (socket.io or nowjs)) isn\'t enough anymore.

You might tell

3条回答
  •  情歌与酒
    2021-02-20 06:10

    Just as a sidenote on the discussion to use nginx for reverse proxy with socket.io, the way I understand it at least, nginx 1.0.x which is stable version does not support proxying of http/1.1 connections (which is needed in order to make socket.io work with websockets). there is a workaround described on here: http://www.letseehere.com/reverse-proxy-web-sockets to make it work, or use something like this: https://github.com/nodejitsu/node-http-proxy instead, the guys at nodejitsu says this should support it.

提交回复
热议问题