Question

I'm trying to get nginx to reverse proxy websocket connections so that i can host a rails application on the same port.

Considering we neglect the 8 byte content-length handshake issue, I have a couple of questions on this topic:

  1. if i were to implement 1.1 keep-alive for current http upstream, would that allow me to use nginx as a reverse proxy for a node.js websocket server instance at the backend?
  2. (and i'm not sure if i understand this correctly) considering i'm implementing upstream keepalive, would that mean that every connection between client and nginx also results in a connection between nginx and the node.js backend for as long as the client is connected to the websocket? if that's the case is that in any way conflicting with nginx' way of connection handling?
  3. if 1. holds, can you give me any hints on how i would approach implementing this?

Thanks, Reza

P.s. There is an ngx-upstream-keepalive module which doesn't support http. http://mdounin.ru/hg/ngx_http_upstream_keepalive/

Was it helpful?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top