Round-robin DNS

Load balancing by DNS (English Round robin DNS) is a simple technique for load balancing for network services based on the DNS. But since there is a caching DNS responses, this solution is only sometimes useful for load balancing.

Operation

DNS makes it to that one name has several IP addresses can be assigned. More generally, Multiple resource records with the same label, the same class and the same type exist but each with a different data field. Such an arrangement is referred to as a resource record set.

By Resource Record Sets a simple load balancing ( engl. load balancing) can be realized.

Server.example.com. 1800 IN A 192.0.2.70      server.example.com. 1800 IN A 192.0.2.71      server.example.com. 1800 IN A 192.0.2.72 The DNS server If such a name query from a resolver, so basically provides all known IP addresses back, but in alternating order. The first request will be answered, for example, [ 192.0.2.70, 192.0.2.71, 192.0.2.72 ] and the second with [ 192.0.2.71, 192.0.2.72, 192.0.2.70 ]. It is then the responsibility of the resolver, which IP address he actually used.

Which strategy a DNS server specifies the order can be configured with Bind -compatible name servers. In BIND three variants are possible: cyclical, random and fixed. In the fixed version, the IP addresses are returned in the order in which they lie down in the name server.

Note: For reverse zones of the IN - ADDR.ARPA domain load balancing is not possible, although more than one name can be defined for an IP address. A load distribution would also not sensible.

Advanced Techniques

In more modern resource record types like SRV or NAPTR They also can still define a weight that determines which server IP addresses most commonly come first. The relevant servers are addressed so often.

For record types that do not provide weighting parameters are available, there is something unpleasant, but feasible alternative is to assign the IP addresses according to their weight several times, such as ADSL line three times, radio link only once.

There is also the possibility to return them from the pool of possible servers few. As always, three IP addresses, for example, returned from the Google server name, change the part. Another useful feature is a location-based return delivery of IP addresses when multiple distributed data centers are available - this is used by eg CDNs.

Limitations

The load balancing by DNS is of course only in the sense uniformly in terms of the allocation. About the then emerging actual load DNS knows nothing. Also does not check whether or not the target server is accessible at all. Upstream script can you check the availability and submit only those servers in the name server that actually are currently available. Thus, load balancing and failover can connect.

Examples of websites that use load balancing via DNS

  • Google
  • Amazon
  • Facebook
  • Yahoo
  • EBay
68
de