nginx proxy websocket to multi nodes

linbo nginx-forum at
Tue Sep 23 03:11:08 UTC 2014

I use nginx as proxy server, backend are socketio services. Follow the
[document](  ,  nginx
configuration, ip_hash instruction that indicates the connections will be

    upstream socketio {
        server server1:3000;
        server server1:3001;
        server server2:3100;
        server server2:3101;

But for this configuration, same client request always proxy to same backend

If want same server request proxy to different backend server, have tried
but doesn't work

    upstream socketio {
        hash "${remote_addr}${remote_port}";

Any solution?

Posted at Nginx Forum:,253475,253475#msg-253475

More information about the nginx mailing list