round robin dns in windows server not working

11,919

Multiple 'A' Records are the way to go with DNS round robin. Lets say you have a website www.example.com on three servers. You would add three A records to the example.com DNS zone with one record pointing at each IP address of each server. like this:

  • www A 10.0.0.1
  • www A 10.0.0.2
  • www A 10.0.0.3

When a browser / client sends a DNS request to the DNS server looking for www.example.com the DNS server will send all three entries back to the browser / client. You can see this by using ping to connect to www.example.com and then using IPCONFIG /DISPLAYDNS. You should see all three entries have been returned. Flush your cache and repeat the process, this time all three entries will be returned but in a different order (DNS Round Robin in Action!)

Here is the kicker....Ping is not a very intelligent application so if the first entry is down for whatever reason it WILL NOT try the second entry in the list. This is where Application side logic is needed. For example, an application like the Skype for Business client would try the next entry in the list provided by DNS if the first entry didn't respond.

DNS Round Robin is a crude load balancing mechanism, useful if you understand its limitations.

Alternatively if you use either a software load balancer like Microsoft NLB or a hardware load balancer these are more inelegant. We would add just one entry to DNS, this entry would point at the VIP being used by the load balancer and we leave it up to the load balancer to make sure we always connect to a server that is up and running.

Share:
11,919

Related videos on Youtube

Geoffrey McCosker
Author by

Geoffrey McCosker

Updated on September 18, 2022

Comments

  • Geoffrey McCosker
    Geoffrey McCosker almost 2 years

    Running Windows 2012 R2 Round Round enabled for my DNS zone (AD integrated)

    Im either not understanding this or its not working.

    I want to use round robin dns to resolve to a cluster of servers.

    First I tried creating a new sub domain and cname records

    • I had a subdomain of "mycluster" and a cname pointing to "." (blank name) for each server
    • I could ping mycluster.mydom.com and get back an ip of one of the servers
    • But on consecutive pings it replied with the same server
    • Even after I flushed DNS it replied with the same server's IP

    Then I tried creating a new sub domain and A records

    • So I had the same thing but instead I had A records with a blank name resolving to the domain
    • This time I got back IPs from the same server like before
    • But when I flushed dns on my computer I got back a different address (every time I flushed DNS I got a different one)

    Are cname not supported for round robin in windows DNS?

    Also does this mean that applications need to be written to support round robin? Like an application would have to not cache the resolved name in order to properly load balance

    • Admin
      Admin about 7 years
      Get a load balancer, RR DNS is not a good idea, it does not distribute load and does not create any fault tolerance.