DNS Round Robin

18 views
Skip to first unread message

Steven L

unread,
Nov 10, 2021, 5:54:37 PM11/10/21
to DNSControl-discuss
Hi.  I was unable to locate any details regarding this, but was wondering what is the best way (or if there is a way) to manage/represent DNS round robin such that an A record is configured with multiple IP addresses via dnsconfig.js?



Tom Limoncelli

unread,
Nov 11, 2021, 3:22:46 PM11/11/21
to Steven L, DNSControl-discuss
On Wed, Nov 10, 2021 at 5:54 PM Steven L <junknmi...@gmail.com> wrote:
Hi.  I was unable to locate any details regarding this, but was wondering what is the best way (or if there is a way) to manage/represent DNS round robin such that an A record is configured with multiple IP addresses via dnsconfig.js?

The generic answer is: DNSControl doesn't do anything, it manages things that do things.  So, if the DNS server you use (Route53, BIND, etc) supports something, 90% of the time DNSControl has a feature that lets you manage that.

That said...

Doing round-robin DNS is supported by all DNS servers by simply listing the A record multiple times:

D("example.com", REG_NAMECOM, DNS_ROUTE53,
    A("www", "10.0.0.1"),
    A("www", "10.0.0.2"),
    A("www", "10.0.0.3")
)

On most DNS servers, www.example.com will do round-robin: The first query for "www.example.com" will reply with 10.0.0.1, 10.0.0.2, 10.0.0.3.  The next query will reply with 10.0.0.2, 10.0.0.3, 10.0.0.1.  The next query will reply with 10.0.0.3,10.0.0.1,10.0.0.2.  Since most clients only use the first IP in a response, you'll get about 1/3rd of your web hits to each IP address.

Tom 
Reply all
Reply to author
Forward
0 new messages