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 am a student so i am pretty new at this but i am making a web cluster with two web servers so that if one server fails the website still stays up. my question is how do i assign a virtual IP address to both machines so that I have one IP address to handle all incoming requests? both machines are running ubuntu 9.04

share|improve this question
add comment

2 Answers

Do you want a failover cluster or a load balancing cluster?

Failover cluster: only one server gets the "virtual" IP address and handles incoming requests; if it fails, the other one becomes active in its place; there is only one web site active, so it needs no special tweak to run this way (but you should take care to only have data in locations accessible by all nodes); this setup is usually achieved at the O.S. level.

Load balancing cluster: both servers share a single "virtual" IP address and handle requests; the web site needs to be designed to handle multiple simultaneous instances (no local content on servers, proper session management, etc.); this can be achieved at the O.S. level or using a dedicated hardware load balancer in front of the web servers.

The load balancing cluster is the usual setup for web farms.

share|improve this answer
    
I am doing the load balancer cluster. this is the tutorial i'm using howtoforge.com/… thanks for the help!!!! –  slufb63 Dec 16 '09 at 18:40
    
any ideas? I'm really stuck on this –  slufb63 Dec 16 '09 at 19:52
    
Where and why are you stuck?!? That's a pretty thorough tutorial... –  Massimo Dec 16 '09 at 20:20
    
i setup the /etc/network/interfaces file as shown in the tutorial (with my ip address of course) but the virtual ip address does not resolve to anything when i type it into the url –  slufb63 Dec 16 '09 at 20:24
add comment

You have several options depending on what you are trying to accomplish.

LVS with keepalived is a good load balancing solution: http://keepalived.org/ heartbeat might also be an option: http://www.linux-ha.org/HomePage

share|improve this answer
add comment

Your Answer

 
discard

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