Round-robin DNS

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Round-robin DNS is a technique of load distribution, load balancing, or fault-tolerance provisioning multiple, redundant Internet Protocol service hosts, e.g., Web server, FTP servers, by managing the Domain Name System's (DNS) responses to address requests from client computers according to an appropriate statistical model.[1]

In its simplest implementation, round-robin DNS works by responding to DNS requests not only with a single potential IP address, but with a list of potential IP addresses corresponding to several servers that host identical services.[2][3] The order in which IP addresses from the list are returned is the basis for the term round robin. With each DNS response, the IP address sequence in the list is permuted.[4] Usually, IP clients initially attempt connections with the first address returned from a DNS query,[5] so that on different connection attempts, clients would receive service from different providers, thus distributing the overall load among servers.

There is no standard procedure for deciding which address will be used by the requesting application, a few resolvers attempt to re-order the list to give priority to numerically "closer" networks. Some desktop clients do try alternate addresses after a connection timeout of up to 30 seconds.[2]

Round-robin DNS is often used to load balance requests among a number of Web servers. For example, a company has one domain name and three identical copies of the same web site residing on three servers with three different IP addresses. The DNS server will be set up so that domain name has multiple A records, one for each IP address. 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.

A round-robin DNS name is, on rare occasions, referred to as a "rotor" due to the rotation among alternative A records.

Drawbacks[edit]

Although easy to implement, round-robin DNS has a number of drawbacks, such as those arising from record caching in the DNS hierarchy itself, as well as client-side address caching and reuse, the combination of which can be difficult to manage. Round-robin DNS should not solely be relied upon for service availability. If a service at one of the addresses in the list fails, the DNS will continue to hand out that address and clients will still attempt to reach the inoperable service.

Round-robin DNS 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 name server is queried. Because it does not take transaction time, server load, and network congestion into consideration, it works best for services with a large number of uniformly distributed connections to servers of equivalent capacity. Otherwise, it just does load distribution.[6]

Methods exist to overcome such limitations. For example, modified DNS servers (such as lbnamed[7]) can routinely poll mirrored servers for availability and load factor. If a server does not reply as required, the server can be temporarily removed from the DNS pool, until it reports that it is once again operating within specs.

DNS GSLB method can also be used to enhance the simple round-robin distribution.[8] By either working at the authoritative DNS server by checking the server availability (and sometimes the client one as well) or at the edge of the network in a recursive DNS server by modifying on the fly the DNS answers. Authoritative solution are generally embedded in load balancing solution and application delivery controller as a standard or optional solution. Recursive solution, also called Edge DNS GSLB[9], is pushing the concept by adding an easier way to validate record availability on the network from the client standpoint, then reducing interpretation errors.

References[edit]

  1. ^ "Round-Robin DNS". Cloudflare. Cloudflare, Inc. Retrieved 16 August 2019.
  2. ^ a b Feenberg, Daniel (July 25, 2016). "DNS round robin for web server failover". Retrieved January 10, 2020.
  3. ^ "What is the difference among a multivalue answer routing policy and a simple routing policy?". Amazon Web Services, Inc. August 3, 2018. Retrieved January 10, 2020.
  4. ^ Liska, A.; Stowe, G. (2016). "Understanding DNS". DNS Security. p. 19.
  5. ^ Pan, Jianping; Hou, Y. Thomas; Li, Bo (2003). "An overview of DNS-based server selections in content distribution networks". Computer Networks. 43 (6): 695–711. doi:10.1016/S1389-1286(03)00293-7.
  6. ^ Brisco, Thomas P. (April 1995). "RFC 1794 - DNS Support for Load Balancing". Retrieved 24 August 2019.
  7. ^ lbnamed, a load-balanced DNS server implemented in the Perl programming language
  8. ^ What is GSLB?, Global Server Load Balancing
  9. ^ Edge DNS GSLB