Results 1 to 6 of 6
  1. #1
    Join Date
    May 2002
    Modesto, CA

    FAQ: Distributing HTTP requests with Round-Robin DNS

    The Round-Robin DNS solution is recommended only if a hardware-based loadbalancing solution is unavailable. Round-Robin DNS is a mechanism for cycling through a list of Web server IP addresses for a single Web host name.

    Suppose that you have two Web servers, ( and (, and you want to balance the load for on these two servers by using the Round-Robin DNS trick.

    Just follow these steps:

    1. Add the following lines to your zone file:
    www1 IN A
    www2 IN A
    www IN CNAME www1
    www IN CNAME www2

    2. Restart your DNS server and ping the host. You will see the address in the ping output.

    3. Stop pinging and then start pinging the same host, and youíll see the second IP address being pinged, because the preceding configuration tells the name server to cycle through the CNAME records for www. In other words, the host is both and

    When someone enters, the name server gives out the first address once, then gives out the second address for the next request, and keeps cycling between these addresses.

    A disadvantage of the round-robin trick is that the DNS server has no way of knowing which system is heavily loaded and which is notóit just blindly cycles. If one of the servers crashes or becomes unavailable for some reason, the round-robin DNS trick still returns the broken serverís IP on a regular basis. This means that some people will be able to access the sites and some wonít.
    <:<: [Fruit eating linux administrator]

  2. #2
    Join Date
    Nov 2001
    How can you mirror the same content of a website on 2 different hosts and if one host fails, then the user is automatically directed to the second host. The first server will be used as a regular option meaning this has more power and bandwidth, and the second one is just backup in case the first one is down.

    Is this possible? If so how? If not, what are the alternatives to avoid a down site (for small/medium websites), other than load balancing which is expensive and small websites cannot justify the costs of load balancing?


  3. #3
    Join Date
    May 2002
    Modesto, CA
    I dont see how you really can do it.

    You have hardware load balancing, and then you have round robin.

    If one host goes down in a round robin situation then 50 percent of your visitors will see a downed site, but it offers some kind of failover versus noone seeing your site at all.

    Its a judgement call here but I prefer hardware load balancing myself.
    <:<: [Fruit eating linux administrator]

  4. #4
    Join Date
    Oct 2002
    you can run the dns off a different server and have a perl or php script on that server ping the 2 webservers and if one isn't up it can change the dns to forward traffic to the other server.

  5. #5
    You can use a failover service like zoneedit offers or build it yourself. Basically, ping your servers every x minutes, if one of them does not respond, take it out of the round robin rotation. You could get more complicated and take server load readings and then "weight" it somehow, but if you are looking for cheap, go with zoneedit. -- Consolidate Student Loan Debt

  6. #6

    I found to be of interest specifically at the "Round-robin DNS" section.

    It did point out the following:

    === START CLIP ===

    "First, load balancing is only performed once for each client at the beginning of a session.

    Second, it's possible for the load balancing scheme to get a little skewed.

    For instance, all the users that have been sent to MyServer1 may go to lunch while all the users who have been sent to MyServer2 continue to send requests. In this case, one server could become overloaded while another server is sitting by idly.

    Third, A more significant problem with session-based load balancing is that it exposes the IP addresses of the servers in the farm to the client-side browser.

    What happens when a server crashes or is taken offline? Your balancing algorithm needs to account for this as soon as possible, but doing so can be problematic. If you're passing out bad IP addresses, your users will start to receive "server not available" errors.

    In a round-robin DNS system, it still can take as long as 48 hours to fix the problem once you've discovered that one of your servers has crashed.

    This is due to the fact that the changes to your IP address mappings need to be propagated to DNS servers throughout the Internet."

    === END CLIP === also does a good job at reporting the problems of DNS-based methods of load balancing:

    === START CLIP ===

    1. The time to live (TTL) on the zone files needs to be turned down severely to to reduce the time for which results are cached.

    The longer the TTL, the less control there is over which IP addresses that end-users are accessing. The shorter that TTL, the greater the potential for congestion on the DNS server.

    2. Users may access servers using an IP address rather than a host name.

    3. Users may use non-DNS methods such as an /etc/hosts file to map server host names to IP addresses.

    4. An additional problem with round-robin DNS is that the DNS daemon cannot differentiate between a request for a one-off hit, and a request that will result in many hits. That is, it is hard to control the granularity of scheduling.

    5. When using round-robin DNS there is no way to assign weights to servers, all servers will theoretically receive the same number of requests, regardless of their resources and current load.

    === END CLIP ===

    BTW, is an ok article on this subject.
    Peter M. Abraham
    LinkedIn Profile

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts