WebsiteGear Logo Log In
New User? Sign Up
About | Contact | FAQ
  Home Content Web Hosting Tuesday, October 25, 2016 
Print| Email| Save| Discuss| Feeds

Round Robin DNS Load Balancing
Published: Thursday, May 20, 2004

How DNS load balancing works

When the request comes to the DNS server to resolve the domain name, it gives out one of the several canonical names in a rotated order. This redirects the request to one of the several servers in a server group. Once the BIND feature of DNS resolves the domain to one of the servers, subsequent requests from the same client are sent to the same server.

DNS load balancing implementation (Multiple CNAMES)

This approach works for BIND 4 name servers, where multiple CNAMES are not considered as a configuration error. Assuming there are 4 web servers in the cluster configured with IP addresses 123.45.67.[1-4], add all of them to the DNS with Address records (A Names) as below. The srv[1-4] can be set to any name you want, such as foo[1-4], but should match the next step.

srv1 IN A
srv2 IN A
srv3 IN A
srv4 IN A

Add the following canonical names to resolve to one of these servers.
www IN CNAME srv1.domain.tld.
IN CNAME srv2.domain.tld.
IN CNAME srv3.domain.tld.
IN CNAME srv4.domain.tld.

The DNS server will resolve the to one of the listed servers in a rotated manner. That will spread the requests over the group of servers.

Note: The requests sent to (without 'www') should be forwarded to in this case to work. For BIND 8 name servers, the above approach will throw an error for multiple CNAMES. This can be avoided by an explicit multiple CNAME configuration option as shown below.

options {
multiple-cnames yes;

DNS load balancing implementation (Multiple A Records)

This above approach with multiple CNAMES for one domain name is not a valid DNS server configuration for BIND 9 and above. In this case, multiple A records are used.

www.domain.tld. 60 IN A
www.domain.tld. 60 IN A
www.domain.tld. 60 IN A
www.domain.tld. 60 IN A

The TTL value should be kept to a low value, so that the DNS cache is refreshed faster.

Other considerations

The DNS based load balancing method shown above does not take care of various potential issues such as unavailable servers (if one server goes down), or DNS caching by other name servers. The DNS server does not have any knowledge of the server availability and will continue to point to an unavailable server. It can only differentiate by IP address, but not by server port. The IP address can also be cached by other nameservers, hence requests may not be sent to the load balancing DNS server.

Considering the functionality, the round robin DNS is not a load balancing mechanism but a load distribution option. Some of these drawbacks can be overcome by implementing an advanced version of the DNS load balancer using Perl scripts. The details can be found here.

Some other variety of load balancing can be performed by using a proxy server, where one of the web servers, is solely used for re-routing of traffic to the other servers. If Apache is used as a web server, the mod_rewrite feature of Apache can be used for this purpose as detailed in this Apache website article.
Previous Article Server Load Balancing Methods
Print| Email| Save| Discuss| Feeds
Nav Introduction To Server Load Balancing
Load balancing applies to all types of servers (application server, database server), however, we will be devoting this section for load balancing of web servers (HTTP server) .
Nav SubDomain - The Third Level Domain
A subdomain is the part of the website address before the domain name. Learn about using subdomain names.
News Post Research and Markets - Global Military Load Carriage Systems Market 2016-2020 with Aegis Engineering, BAE Systems, Boston Dynamics, CQC & Lockheed Martin Dominating
DUBLIN, October 25, 2016 /PRNewswire/ -- Research and Markets has announced the addition of the "Global Military Load Ca...
News Post Clkim Appoints Serial Entrepreneur Ran Poliakine as Chairman of The Board as It Closes First Round of Funding
The start-up introduces the latest marketing technology in link management, monetization and analytics, bridging the gap between online and offline marketing campaigns
News Post Launches Lifewire
New site delivers clear, approachable and actionable tech advice
News Post Global Commercial Vehicle Tire Market By Vehicle Type (LCV and M&HCV), By Demand Category (OEM Vs Replacement), By Region (APAC, Americas, Europe & CIS and MEA), Competition Forecast & Opportunities, 2021
NEW YORK, Oct. 25, 2016 /PRNewswire/ -- Globally, commercial vehicle tires are usually deployed in vehicles with the load lim...
News Post Dataiku Secures $14 Million Series A to Deploy Data Science at Scale in the Enterprise
Led by FirstMark Capital to Empower Data Teams Across the Globe with an End-to-End Platform for both Clickers and Coders
Submit News | View More NewsView more news
Classified Ad ClubVPS – True Cloud In New York/Hong Kong/IL/Am" provide reliable, professional, High Availability Cloud ...
We have developed HTML Tagging Conversion software which can convert any TIFF Frech Srcipt Image to ...
Classified Ad Manpower Recruitment Agency In India for oman
MM Enterprises is the largest and leading Professional Recruitment Company, serving round the world. ...
Classified Ad The Future of Hosting is VPS Hosting
Virtual Private Server hosting is getting popular by the day and seeing the rise in demand shared ho ...
Classified Ad Society Software in Jodhpur
A complete IT solution for Co-Operative Society. Sahakaar is Society Software in Jodhpur specially d ...
Post Free Ad | View More View more classifieds
Forum Post 8 Steps to Choosing the Right Web Host
Here is an article I wrote a while ago but figured I would share this with other people for their co ...
Forum Post DIY photo collage yearbook with digital photos
Christmas is coming and a year also comes to its end right away. From beginning to end, from spring ...
Forum Post PHP MySQL Web Development Security Tips
PHP MySQL Web Development Security Tips - 14 tips you should know when developing with PHP and MySQL ...
Add New Post | View More View more forum posts
Nav How To Sell A Website
Nav Subdomain Configuration - How To Setup A Sub Domain
Nav Domain Configuration - How To Setup A Domain Name
Nav Website Layout - Tips & Tricks
Nav Round Robin DNS Load Balancing
Nav Introduction To Server Load Balancing
Nav Website Traffic & Revenue
Nav Tips On Using SubDomain
View More News View More News