geekcell/docker-compose-nodejs-examples

Any gotchas when we scale up nginx & Node independently?

rasekar2000 opened this issue · 2 comments

Will nginx.conf's site available section need to be modified when nginx is disproportionately changes the docker instances with respect to node docker instances.

Lets assume node is scaled up to 5 docker instances but nginx is scaled only to 3 , will there be any change required in the nginx.conf section?

Hi @rasekar2000

I'm not that familiar with scaling services through Docker Compose, but my understanding is that services will scale just fine when they do not expose any posts. For Nginx (that's the one service with exposed ports), you should use something like HAProxy to load balance the requests through your Nginx services.

See: https://www.brianchristner.io/how-to-scale-a-docker-container-with-docker-compose/

Thanks .. I have seen this and reviewed more about its haproxy .