System Design
8. Load Balancing and ScalabilityAnimated
DNS Load Balancing
Returning different IPs for the same name.
The idea
DNS can rotate or select addresses, spreading traffic across servers or regions.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- client
- gateway / proxy
- service
- cache
- data store
- queue / stream
DNS returns a different IP address for the same name.
- step:
- 1/3
- at:
- Client
1/6
The green dot is a request moving through the system.
Step by step
- 1Client resolves the name
- 2DNS returns one or several IPs
- 3Client connects to one
- 4Records change for failover
Where it is used
Coarse global distribution.
Watch out for
Caching means failover is slow and uneven.