advancedTop 100 Interview Questions
Why can't you combine a fixed host port mapping with `docker compose up --scale`?
Multiple replicas would all try to bind the same single host port, which isn't possible — only one process can listen on a given host port. To scale, omit the fixed host port mapping and put a load balancer in front of the replicas instead.
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full DevOps Mastery library.
Why can't you combine a fixed host port mapping with `docker compose up --scale`?