Hey, I think sticky sessions is something that NGINX Plus offers at the moment. However, I've not really worked with NGINX Plus (as it's not free).
For simple load balancing between multiple instances of the same service running on different ports, here's a configuration that I use:
http {
upstream backend {
server localhost:3000;
server localhost:3001;
}
server {
location / {
proxy_pass backend;
}
}
}
Hardeek Sharma
Great article. Can you tell me how to make nginx for sticky sessions. If I have multiple instances of same service running on different port.