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
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