Round Robin DNS Setup :: A Howto

May 29, 2008 · Filed Under How To's · Comment 

Round Robin DNS is a technique involving changes to the DNS records The TTL or the Time to Live plays a very important part for Round Robin DNS to work. We will see some practical examples of DNS being using in Round Robin mode below:

1. If you need a site’s http traffic to be distributed to multiple servers, you need to set the A records in the DNS zone for the domain as below :

domain.com. 300 IN A 123.123.123.123
domain.com. 300 IN A 123.123.124.124
domain.com. 300 IN A 111.112.113.114

arecords.jpg

2. If you need a site’s mail traffic to be distributed to multiple servers, you should point the domain’s MX record to mail.domain.com and then you need to set the A records in the DNS zone for the mail record as below :


domain.com 3600 IN MX 0 mail.domain.com.
domain.com. 300 IN A 123.123.123.123
domain.com. 300 IN A 123.123.124.124
domain.com. 300 IN A 111.112.113.114

In the above examples you will see that the TTL for the A record has been set to 300 seconds. This is lower than normal and so the traffic will be rotated in Round Robin Mode.