DNS load balancing isn’t about magically distributing traffic; it’s a clever trick of serving up different IP addresses for the same hostname, making clients pick one and hope for the best.

Let’s see this in action with AWS Route 53. Imagine we have a web application deployed across two EC2 instances, web-01 and web-02, each with its own public IP address.

web-01 IP: 54.1.2.3 web-02 IP: 54.1.2.4

We want to set up DNS to point myapp.example.com to both of these. In Route 53, we create a hosted zone for example.com if we don’t have one, and then create an A record for myapp.

Route 53 Record Configuration:

  • Record Name: myapp
  • Record Type: A
  • Alias: No
  • Value:
    • 54.1.2.3
    • 54.1.2.4
  • Routing Policy: Simple (This is the default, and for basic round-robin, it’s what we use).

When a user’s DNS resolver queries for myapp.example.com, Route 53, configured for simple routing with multiple A records, will return both IP addresses, 54.1.2.3 and 54.1.2.4. The order in which they are returned is not guaranteed and can vary. The client’s operating system or browser then typically picks the first IP address it receives from the list.

The system problem this solves is how to direct incoming traffic to multiple identical servers without a dedicated load balancer appliance or service. It’s a decentralized approach where the "decision" of which server to hit is made by the client’s DNS resolver.

Internally, Route 53 is a globally distributed DNS service. When you create multiple A records for the same hostname under a Simple routing policy, it doesn’t perform any active health checks or intelligent traffic distribution. It simply returns the list of IP addresses associated with that record. The "round-robin" effect comes from the fact that the order of IPs in the response can change between queries, and clients tend to pick the first one.

The primary levers you control are the IP addresses you associate with the DNS record and the routing policy. For basic round-robin, Simple routing is the key. If you wanted more advanced behavior like weighted routing (sending 70% of traffic to one server, 30% to another) or latency-based routing (sending users to the server geographically closest to them), you’d select different routing policies.

What most people don’t realize is that "Simple" routing with multiple A records is a very naive form of load balancing. If one of the IP addresses becomes unresponsive, Route 53 will still happily return it in the DNS query results. The client will then attempt to connect to that dead IP, fail, and potentially retry by picking the next IP from the list, or it might just error out. There’s no automatic failover; the DNS record itself doesn’t know if the server behind the IP is alive.

The next concept you’ll naturally run into is how to make this more robust, typically by introducing health checks and more sophisticated routing policies like Weighted or Failover.

Want structured learning?

Take the full Load-balancing course →