ConceptsNetworking, domains & TLS
Load balancing
The proxy gives each new request to the next instance of the service, in turn.
The first request goes to instance 1.
1 / 4
A service can have more than one instance. Then the proxy shares the requests between them. This is load balancing.
The rule is round-robin: each instance gets a request in its turn.
The rules
- A route points only at instances that accept TCP connections.
- A
GETorHEADrequest with no body cannot reach an instance: the proxy tries it one more time on a different instance. - The proxy does not try other requests again.
- During a deploy, the proxy moves to the new instances in one step, after they pass their health check. See Deploys.
Add instances
ferry scale shop 3The proxy balances only the public traffic. Between services, the DNS of Docker gives the addresses of all the instances. See Private network.