Skip to content
StackDecode
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.

ClientDNSServer 1.1.1.1Server 2.2.2.2Server 3.3.3.3
  • 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

  1. 1Client resolves the name
  2. 2DNS returns one or several IPs
  3. 3Client connects to one
  4. 4Records change for failover

Where it is used

Coarse global distribution.

Watch out for

Caching means failover is slow and uneven.

Related