Closed Fumaz closed 1 year ago
@Wowu I have a React app behind a Traefik reverse proxy, and I scale it to multiple instances in order to balance the load between all available cores. Traefik takes care of the loadbalancing for me, and it automatically detects new containers.
To add two cents, I also run scaled containers with docker-compose, mostly for service availability.
With docker-compose one can set a ranged port mapping: ports: [ '18080-18090:8080']
(this may be difficult to support as a shell script though) or let multiple container share 1 host port. I have been using the latter for a few times.
do you have any plan to implement this?
@alexle-dev I decided to remove --scale
flag, as we can detect scale from the running number of container. Let me know if setting scale manually is required for your use case 😃
Thank you @alexle-dev, I'll look into it!
By the way, can you share what is your case of running multiple copies of same container on a single machine?