Round robin DNS

From Wikipedia, the free encyclopedia

Round robin DNS is a technique in which load balancing is performed by a DNS server instead of a strictly dedicated machine.

This is only needed if you have a big network, or if you have a IRC Network

Round robin works by responding to DNS requests not with a single IP address, but a list of IP addresses (all of which would assumedly host the same content). The order in which IP addresses from the list are returned is the basis of the round robin name. The IP address at the top of the list is returned a set number of times before it is moved to the bottom, thus promoting the second IP address to the top of the list. This cycle is continual and allows the DNS server to assist in balancing requests between servers.

Basic DNS clients simply use the first entry and discard the rest. However, there is no internet standard for deciding which address will be used by the requesting application - a few resolvers even re-order the list to give priority to numerically "closer" networks. Some desktop clients may even try alternate addresses after a connection time out of 30-45 seconds.

Round robin DNS is usually used for balancing the load of geographically-distributed Web servers. For example, a company has one domain name and three identical home pages residing on three servers with three different IP addresses. When one user accesses the home page it will be sent to the first IP address. The second user who accesses the home page will be sent to the next IP address, and the third user will be sent to the third IP address. In each case, once the IP address is given out, it goes to the end of the list. The fourth user, therefore, will be sent to the first IP address, and so forth.

Many IRC networks use round robin DNS to distribute users across the servers on their networks. Indeed, virtually all the large and established networks have separate round robin DNS setup for each continent or country in which they have servers - so users can use a 'random' server local to them.

Although very easy to implement, round robin DNS has important drawbacks, such as those inherited from the DNS hierarchy itself and TTL (Time to live) values, which allows for address caching and can be very difficult to manage. Round robin DNS must not be relied upon for service availability. If a service at one of the addresses in the list goes down, the DNS will continue to hand out that address and clients will still attempt to reach the dead service.

Also, it may not be the best choice for load balancing on its own since it merely alternates the order of the address records each time a nameserver is queried. There is no consideration for transaction time, server load, network congestion, etc. Round robin DNS load balancing will only work for services with a large number of uniformly distributed connections to servers of equivalent capacity. Otherwise it just does load distribution.

To overcome this limitation, techniques can be used to combine DNS round robin techniques with scripts that routinely poll the servers mirroring the content to see if they are online and not overloaded, etc. If a server does not return a reply as expected, the server can be temporarily removed from the DNS pool, until it reports that it is once again operating normally.