7

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

2 Answers2

5

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.

Massimo
  • 72,827
0

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

rorr
  • 632