Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Websockets proxy and nginx upstream

$
0
0
Hi,

I am trying to setup NginX as a reverse proxy for my WebSockets server. I have two backend servers and want the WebSocket connection calls to fail over between the machines if one of them is not available. I configured it such, but I don't see the fail over take place. Is the upstream module supported for WebSocket proxying?

upstream cluster {
server localhost:8001;
server localhost:8002;
}

server {
listen 8090;
server_name localhost;

location / {
proxy_pass http://cluster;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}

Ranjit

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>