Scaling a service: three api containers
Select an icon to see what it is.
Step 4 of 6
Spreading is by connection, not by magic
A client usually connects to the first address it gets, so new lookups spread connections across the replicas. Compose does not balance load itself. A client that keeps one connection, or caches its lookup, keeps talking to one container.
connect()
172.18.0.2 -> 172.18.0.3:3000