MYDNSREPORT RESOURCE

DNS Load Balancing Strategies: Round-Robin, Geolocation & Failover

Compare round-robin, location-based routing and failover, including the limits imposed by DNS caching.

Domain: example.com → A record: 192.0.2.10 → Web server: IPv4 address
An A record maps a hostname to an IPv4 address. A correct address alone does not prove the website is online.

What Is DNS Load Balancing?

DNS load balancing distributes incoming traffic across multiple servers by returning different IP addresses in DNS responses. Unlike hardware or software load balancers that sit in front of your servers, DNS-based load balancing works at the resolution layer — before a connection is even established.

This approach is used for global traffic distribution, disaster recovery, and scaling beyond a single data center. It's often combined with application-level load balancers for a layered strategy.

Round-Robin DNS

The simplest strategy: publish multiple A records for the same hostname. Resolvers rotate through them in order.

example.com.  300  IN  A  203.0.113.10
example.com.  300  IN  A  203.0.113.20
example.com.  300  IN  A  203.0.113.30

Pros:

  • Zero cost — works with any DNS provider
  • No special configuration required
  • Distributes load roughly evenly

Cons:

  • No health awareness — sends traffic to dead servers
  • No session persistence
  • Caching makes distribution uneven in practice

Weighted DNS Routing

Weighted routing lets you send a percentage of traffic to each server. This is useful for canary deployments, gradual migrations, or routing more traffic to beefier servers.

ServerWeightTraffic %
server-1 (us-east)7070%
server-2 (us-west)2020%
server-3 (canary)1010%

Weighted routing requires a managed DNS provider (Route 53, Cloudflare, Google Cloud DNS) — it's not possible with standard zone files.

Geolocation-Based Routing

Return different IPs based on the geographic location of the DNS resolver (and by proxy, the user). This reduces latency by directing users to the nearest data center.

Europe → 198.51.100.10 (Frankfurt)

North America → 203.0.113.10 (Virginia)

Asia-Pacific → 192.0.2.10 (Singapore)

Default → 203.0.113.10 (fallback)

Limitation: geolocation is based on the resolver's IP, not the end user's. Users on public resolvers like 8.8.8.8 may be routed suboptimally unless EDNS Client Subnet (ECS) is supported.

Latency-Based Routing

Routes users to the server with the lowest measured latency from their region. More accurate than geolocation since it uses actual network performance data rather than geographic proximity.

AWS Route 53 and Cloudflare offer latency-based routing. The DNS provider continuously measures latency between its edge nodes and your endpoints, then returns the fastest option.

DNS Failover

DNS failover automatically removes unhealthy servers from DNS responses. When a health check fails, the provider stops returning that IP until it recovers.

ServerRoleStatus
203.0.113.10PrimaryHealthy → returned
203.0.113.20SecondaryStandby
198.51.100.10TertiaryStandby

Use a low TTL (60–300s) for failover records. Higher TTLs mean longer outages as clients continue using cached dead IPs. Read more in our DNS Failover Setup blog post.

Health Checks & Monitoring

DNS load balancing without health checks is dangerous. Configure checks that:

  • Probe your application endpoint (not just ICMP ping) — use HTTP health checks on a specific path like /health
  • Run from multiple geographic locations to avoid false positives
  • Have sensible thresholds: 2–3 consecutive failures before removing, 1–2 successes before re-adding
  • Alert your team when a failover occurs
  • Verify the response body, not just the HTTP status code

Provider Comparison

ProviderStrategiesHealth Checks
CloudflareRound-robin, geo, weighted, failoverYes (via Load Balancing add-on)
AWS Route 53All strategies + latency-based + multivalueYes (built-in)
Google Cloud DNSRound-robin, geo, weightedYes (via Cloud Monitoring)
NS1All strategies + filter chainsYes (built-in)
Standard DNSRound-robin onlyNo

Best Practices

  • Always pair DNS load balancing with health checks
  • Use low TTLs (60–300s) for failover and active load balancing
  • Combine DNS-level distribution with application load balancers for session persistence
  • Test failover scenarios regularly — don't wait for a real outage
  • Monitor with the DNS Lookup Tool to verify records are rotating correctly
  • Consider Anycast for the fastest global distribution

FAQ

What is DNS load balancing?

DNS load balancing distributes traffic across multiple servers by returning different IP addresses in DNS responses, improving availability and performance without dedicated load balancer hardware.

Is DNS round-robin reliable?

Basic round-robin has no health awareness. Combine it with health checks and low TTLs, or use a managed DNS provider with built-in monitoring for production use.

What TTL should I use for DNS load balancing?

Use 60–300 seconds for active failover. Higher TTLs (3600+) are fine for stable configurations without failover needs.