Round robin DNS is nothing but a simple technique of load balancing various Internet services such as Web server, e-mail server by creating multiple DNS A records with the same name.
How Does It Works?
You configure DNS server to send a list of IP addresses of several servers with same hostname. For example, foo.dnsknowledge.com may be configured to return two IP address as follows:
- foo.dnsknowledge.com – 18.104.22.168
- foo.dnsknowledge.com – 22.214.171.124
Half of the time when a user make foo.dnsknowledge.com request will go to 126.96.36.199 and rest will go to 188.8.131.52. In other words, all clients would receive service from two different server, thus distributing the overall load among servers.
Round Robin DNS Usage
You can use round robin DNS for
- Load distribution.
- Load balancing.
- Fault-tolerance service.
Round Robin DNS Example
Open a terminal (Mac OS X or UNIX / Linux) and type the following command to see IP address of google.com:
host -t A google.com
google.com has address 184.108.40.206 google.com has address 220.127.116.11 google.com has address 18.104.22.168
So a request to google.com would be split into the 3 server. When you type http://google.com/ first time in a browser, 22.214.171.124 will display google search home page. Type the following command again at the shell prompt:
host -t A google.com
google.com has address 126.96.36.199 google.com has address 188.8.131.52 google.com has address 184.108.40.206
Next request would go to the server 220.127.116.11. By using Round Robin DNS google managed to lighten the webserver load. This kind of setup pretty common among the large website such as google.com, amazon.com, yahoo.com etc. If your site gets a large number of hits (millions of unique hits per day) per day, consider using this technique.
- RFC 1794: DNS Support for Load Balancing
Hi, I want to insert my custom policy for load balancing in Bind9. Could you please guide me where can I do it in the source code of Bind9.
“This kind of setup pretty common among the large website such as google.com, amazon.com, yahoo.com etc.” – these “large websites” won’t be using “round-robin DNS” (which is unreliable). They will be using a proper “load-balancer”.