loading...

re: Scaling Out With Docker and Nginx VIEW POST

FULL DISCUSSION
 

Great article brother.

A simple suggestion from my end, instead of using backend1, backend2, backend3 in the Dockerfile we can define a single service as backend. We can rather scale out using "docker-compose up -d --scale backend=n", where n is the number of replicas. In nginx.conf, we simply need to define the server config as "server foldername_backend_1:3000 max_fails=3 fail_timeout=10s weight=1;".

code of conduct - report abuse