node.js - nginx as a proxy for NodeJS+socket.io: everything is OK except for big messages -


as explained on nginx's website i've used these settings nginx proxy websockets nodejs server:

location /socket.io/ {     proxy_pass http://backend;     proxy_http_version 1.1;     proxy_set_header upgrade $http_upgrade;     proxy_set_header connection "upgrade"; } 

everything works fine , socket.emit() / socket.on() send messages each other; until send rather big text message (26 kb of html).

  • this big message not received nodejs (so guess issue on nginx side)
  • there no error on nginx log
  • once big message has been send client, nodejs stop receiving socket.io's heartbeats client.

what doing wrong? there nginx setting not aware of?

the "solution" found use haproxy split tcp stream between nginx , nodejs.

it not optimal because adds yet-another-program in our stack, job.

it seems me nginx websocket support still far being production-ready.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -