I use nginx as proxy server, backend are socketio services. Follow the
document , nginx
configuration, ip_hash instruction that indicates the connections will
be
sticky.
upstream socketio {
ip_hash;
server server1:3000;
server server1:3001;
server server2:3100;
server server2:3101;
}
But for this configuration, same client request always proxy to same
backend
server.
If want same server request proxy to different backend server, have
tried
hash
directive
but doesn’t work
upstream socketio {
hash "${remote_addr}${remote_port}";
Any solution?
Posted at Nginx Forum: