DNS round robin for single domain

November 26, 2018 2.2k views
DNS Ubuntu 18.04

We have two different A records for a single domain, one pointing to a loadbalancer, and one pointing to a single droplet. We have the impression that the single droplet receives a lot more traffic than the loadbalancer. So are the Digital Ocean nameservers configured for round robin or not? And if not, how can we send more traffic to a certain A record, especially to the one which is configured for the loadbalancer?

1 Answer

Hey friend,

Using two A records is often referred to as round robin simply because it works so similarly in practice. However, this is not actually what it does. The NS servers return the two values at all times, but the client side often randomizes the result. It isn’t that each time you run the lookup the values reverse, but that each time you run the lookup the result is random. The result of a random display of the values could be the same, it could be different. Local caches may also stick to the IP last displayed first.

So when you do a DNS round robin, you’re not going to have a clean 50/50 split in traffic. You’d need a load balancer instead to more evenly distribute traffic in such a way.

Jarland

Have another answer? Share your knowledge.