Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to configure several IPs for one domain name? For example, if one server has fallen for some period of time, users will go to second server. I red something about load balancing with main computer (load balancer) and several slaves but what to do in case of main computer failures?

Thanks for answers! The main question is: what to do in case if main computer's data center lost internet connection or something like that? (main computer - load balancer that serve all requests from domain name)

share|improve this question

migrated from Jun 20 '11 at 16:38

This question came from our site for professional and enthusiast programmers.

You flagged this as "DNS". DNS is sometimes called the 'poor man's load balancer".

The DNS servers themselves are inherently redundant, but their role as a load balancer does not offer a redundant solution for the web servers since no monitoring is built-in to take a node out of rotation when it fails. You need to write your own, and even then DNS caching keeps it from an immediate update during failures.

However, a hardware or software load balancer of some sort is usually better. It gives faster failover times, better monitoring, and much more control than DNS does.

Load Balancers will generally work in pairs and have a virtual IP that floats between them. If one fails, the other load balancer will take over IP address. That avoids a single point of contact.

My recommendation is to research load balancers more to see what you're comfortable with. For example, would you use a hardware load balancer, does your data center provider have a solution that you can use, or would you want to consider a Linux based or Microsoft based solution that you could get up to speed on quickly, depending on your expertise.

If you truly want data center redundancy then you will need to depend on BGP or DNS. There are some DNS services that offer this as a service: and are two examples.

share|improve this answer
Multiple A records won't give you any kind of failover. You could just as well have a single A record and modify that based upon a certain server being up or down – Server Horror Jun 20 '11 at 23:26
It actually does not do "well as a redundant protocol", but that's in part because the failover isn't part of the DNS. It's entirely within the remit of the individual applications program, which has to be written to try connecting to successive IP addresses in turn. Not all applications softwares are written this way. – JdeBP Jun 21 '11 at 12:11
I was unclear in my wording. I was addressing the load balancer redundancy, and not the web server HA. I'll update my wording to be more clear. – Scott Forsyth - MVP Jun 21 '11 at 13:11

Yes, this is possible and called Round Robin, also the drawbacks are listed in the Wiki article. But you don't have priorities (like the MX record).

BTW: This question seems to be more related to

share|improve this answer
The Round Robin DNS feature's will not respond to server failure, it simply rotate address of servers to clients, by this way if you are looking to load balance traffic between two of more web servers look to a more robust hardware solution like radware technology or maybe you may use simply a software solution like nginx. For other services, there is also another Linux/Unix software named pen. – mezgani Jun 20 '11 at 18:03
To my knowledge Round Robin is broken because Windows will only choose the first A record. Also you linked to the main page of serverfault - not to a question. – Server Horror Jun 20 '11 at 23:27
I linked the main page of serverfault, because the question originally was posted at stackoverflow. I don't think Round Robin is broken on windows, there are many articles at e.g. describing how to configure round robin for load balancing of remote desktop services. – Thor Jun 21 '11 at 5:26
Round Robin is useless in general. It's not specific to Windows. It's based upon a flawed understanding of how the DNS works that is independent of platform, and doesn't achieve most peoples' actual goals. – JdeBP Jun 21 '11 at 12:04

In addition to the other comments here, it's worth pointing out that it's best not to think of the load balancer as the "main" computer. It's a load balancer, and the ones you call "slaves" are hosting the service that the load balancer is balancing traffic between.

Another approach to accomplish what you're talking about is to use a single IP and hide the multiple servers with NAT. (NAT does interact poorly with some protocols, so be careful.)

With either load balancing or NAT, if you are running a stateful service on your backend you'll have to address synchronization issues.

share|improve this answer

See this question:

How do you set up redundant servers?

Your question how to provide high-availability. DNS round robin is not HA since:

  • it is broken even for load distribution (a popular commercially available OS only uses the first record sent back)
  • there's now way to tell for a requesting party which of the IPs are actually providing service and most software doesn't have the "magic button" that will enable this
  • even if both of the above would be solved you need to guarantee (to a certain level) that if one server goes down all other servers will provide correct answers. And DNS has absolutely nothing to do with it.

Regarding the first point, you could have 10 A records and only serve out 3 for every DNS request where the answer is randomly sorted and the subset is also randomly chosen - which is what quite a few people do. But most of them have BGP under their control so they can actually choose where the request goes to

EDIT: This relies on my experience with "common" DNS server which don't really randomize the order in which the answer is send out.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.