How do I setup round robin DNS?

Round robin DNS is a technique in which load balancing is performed by a DNS server instead of a strictly dedicated machine. A DNS record has more than one value IP address.

Adblock detected 😱

My website is made possible by displaying online advertisements to my visitors. I get it! Ads are annoying but they help keep this website running. It is hard to keep the site running and producing new content when so many people block ads. Please consider donating money to the nixCraft via PayPal/Bitcoin, or become a supporter using Patreon.

When a request is made to the DNS server which serves this record, the answer it gives alternates for each request. For instance, if you had a three webserver that you wished to distribute requests between, you could setup your DNS zone as follows:

When a query is made to the DNS server it will first give the IP of 68.142.234.44 for the www host. The next time a request is made for the IP of www, it will serve 68.142.234.45 and so on.

The order in which IP addresses from the list are returned is the basis of the round robin name. While this is a form of load balancing, it should be noted that if one of the hosts becomes unavailable, the DNS server does not know this, and will still continue to give out the IP of the downed server.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Your support makes a big difference:

I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft takes a lot of my time and hard work to produce. If everyone who reads nixCraft, who likes it, helps fund it, my future would be more secure. You can donate as little as $1 to support nixCraft:

5 comment

Yep, Round Robin DNS plays a crutial role in the managing the load between the multiple servers. Besides this the Round Robin DNS is also used for the services like mails,ftp and even IIRC. Being a service providers which offers clusters and high hosting setups we had setup a clustered for handling their mails for one of the corporate website having heavy mailing activity for one of our customer.