---
title: "Comment by Hardeek Sharma on \"Proxying to your app running on custom port in NGINX\" | Hashnode"
description: "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."
url: "https://hashnode.com/posts/proxy-pass-nginx/609cdda7b684eb4cd52c331d/comment/609d0de847373d4cb0560a11"
---

[Discussion](https://hashnode.com/posts/proxy-pass-nginx/609cdda7b684eb4cd52c331d)

Comment [Proxying to your app running on custom port in NGINX](https://hashnode.com/posts/proxy-pass-nginx/609cdda7b684eb4cd52c331d)

[Hardeek Sharma](https://hashnode.com/@hardeeksharma)

[May 13, 2021](https://hashnode.com/posts/proxy-pass-nginx/609cdda7b684eb4cd52c331d/comment/609d0de847373d4cb0560a11)

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.

[Harshit Budhraja](https://hashnode.com/@hrhv)

[May 13, 2021](https://hashnode.com/posts/proxy-pass-nginx/609cdda7b684eb4cd52c331d/comment/609d0de847373d4cb0560a11#reply-609d1dcf47373d4cb0560dc0)

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;
        }
    }
}
```
