Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have 2 webservers one principal webserver and a secondary webserver located in two different buildings. I need to know if it's possible to point www.example.com to the principal webserver and in case of server Fault i want that www.exemple.com points or redirect to the secondary webserver.

Is there something like secondary IP or something like that.

Thanks

Hmd

share|improve this question

3 Answers 3

You can accomplish this with a change to your DNS by changing what ip address the A record for your web site resolves to. In the case of clients that have the A record in their DNS cache, they'll resolve the new A record after the TTL expires for the A record. For clients that don't have the A record in their DNS cache, they'll resolve the new A record immediately.

share|improve this answer
    
This method does not give true fault tolerance. It can work, but requires manual effort. If the TTL on the DNS record is set for a long time, it could be several hours before a client DNS cache expires. –  Rob May 16 '11 at 16:58
1  
@rfair01: True enough but the OP didn't state he was looking for a fault tolerant system. He only asked how it could be done and I proposed one method. I was trying to keep it simple. –  joeqwerty May 16 '11 at 17:16

Or you could have both servers at the same location and have an F5 in place to load balance and act as a failover in the event one goes down. I also believe that windows had a clustering service that you can install in windows 2008 and is in there by default in 2003. The way this works is bother servers have their own IP but they share 1 dedicated IP. The two servers are then connected by heartbeat, if the main server goes down the secondary activates the shared IP. You can read more about it here:

http://www.microsoft.com/windowsserver2008/en/us/high-availability.aspx

share|improve this answer
    
I agree with this. Either a hardware load balancer (F5, Cisco, Citrix, etc.) or software load balancing (NLB or something along those lines) will give you true failover. Some of the cloud providers are now providing load balancing options as well (see Rackspace for an example). –  Rob May 16 '11 at 17:04

What you're looking for is a technology called GLSR (Global Server Load Balancing). In your case, you want a primary server and a lower-weighted failover server.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.