WebsiteGear Logo Log In
New User? Sign Up
About | Contact | FAQ
  Home Content Web Hosting Saturday, November 07, 2009 
POPULAR ARTICLES
Nav Subdomain Configuration - How To Setup A Sub Domain
Nav Website Layout - Tips & Tricks
Nav Round Robin DNS Load Balancing
Nav Domain Configuration - How To Setup A Domain Name
Nav Introduction To Server Load Balancing
Nav Server Load Balancing Methods
Nav Tips On Using SubDomain
Nav Breadcrumb Navigation
FEATURED NEWS | POPULAR NEWS
View More News View More News
SPONSORED LINKS
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 123.45.67.1
srv2 IN A 123.45.67.2
srv3 IN A 123.45.67.3
srv4 IN A 123.45.67.4


Add the following canonical names to resolve www.domain.com 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 www.domain.com 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 http://domain.com (without 'www') should be forwarded to http://www.domain.com 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 123.45.67.1
www.domain.tld. 60 IN A 123.45.67.2
www.domain.tld. 60 IN A 123.45.67.3
www.domain.tld. 60 IN A 123.45.67.4


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
RELATED ARTICLES
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.
RELATED NEWS
News Post Online advertising stats round up
Advertising expenditure on the internet grew to £3,350m in 2008, a 17.1% like-for-like increase on 2007. Total UK advertising...
News Post PricewaterhouseCoopers Named 'Top Company for Working Families' by DiversityInc
Firm Recognized for Consistent Leadership in Diversity and Inclusion, Progressive Workplace Flexibility Programs
News Post iPhone Developer Selling 87 App-Business on eBay
COLLEGE STATION, Texas, Nov. 6 /PRNewswire/ -- Texas based independent developer Brice Milliorn today announced the decision...
News Post Fortune Data Centers Earns LEED Gold Certification From U.S. Green Building Council for Silicon Valley Facility
Fortune Provides Customers with Energy-Efficient Data Center Space and Shares the Cost Savings with Customers; Extends LEED Gold Benefits to All Tenants at No Additional Charge
News Post Hosted Solutions Named to 'Fast 50' for Sixth Consecutive Year, as One of Triangle's Fastest Growing Private Companies
Company cited as sixth-largest in region, based on revenue and profitability growth
Submit News | View More NewsView more news
RELATED CLASSIFIED ADS
Classified Ad Sales Lead Management System - Part CRM, Part SFA
LeadMaster offers powerfully easy, on-demand, customizable sales lead management software for ever ...
Classified Ad Php Developer India
If a balance of low cost-high performance websites is what you're aiming for then Hire PHP web devel ...
Classified Ad QC Training
ezTrainings.com has expertise in providing online trainings. We prepare trainees to enhance their sk ...
Classified Ad Singapore Colocation from 1U to Full Suite
8 to Infinity Pte Ltd is a 12 year old Singapore Web Hosting company managing 30 racks in 4 datacent ...
Classified Ad Singapore Colocation
8 to Infinity provides racks in Pacific Internet (Singapore and Hong Kong), Media Ring (Singapore) a ...
Post Free Ad | View More View more classifieds
RELATED FORUM POSTS
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


Copyright © 2003-2009 WebsiteGear Inc. All rights reserved.
About | Advertise | Submit Content | Privacy | Agreement | Contact