I have using ip_hash in nginx conf file but found the requests were always redirected to same server address. Found that using $remote_addr should help to resolve this but nginx gives error
2020/05/26 11:52:50 [emerg] 24516#23724: unknown directive "hash" in C:\Program Files (x86)\nginx/conf/nginx.conf:34
Below is the snippet from nginx file
upstream rails {
#ip_hash;
hash $remote_addr;
server 127.0.0.1:5479;
server 127.0.0.1:5480;
server 127.0.0.1:5481;
server 127.0.0.1:5482;
}