I've been trying this kind of set-up for a couple of days. Where it fails 
for me is that I need to have Apache bind to port 80 on a specific IP 
address (port 80 on other IP addresses are used for something else), and I 
need it to run all the time on the backup server so it gets updates from 
the primary (I'm running lots of servlets). Under 2.2.10 I have not found a 
way to create the IP address on the backup server without it being 
advertised via ARP. So just doing an "ip add addr" (I use the iproute2 
package) at the moment of failover doesn't do it. Any hints on how to get 
around this welcome...
         Thorsten

At 03:34 AM 8/4/99 , [EMAIL PROTECTED] wrote:
>Or, if don't want to spend a dime you can do this with simple cron'ed shell
>scripts and scale it your needs. Here's an example with two web servers
>192.168.1.1 (primary webserver) and 192.168.1.2 (backup webserver):
>
>1) Configure both servers to your specs. Recompile the kernel on your backup
>server to include Network Aliasing/IP Aliasing Support so that you can bind
>multiple addresses to a single interface.
>
>2) On the backup server write a cron'ed script to copy (mirror, replicate,
>etc..) your chosen files or directories. A really easy way to do this is to
>create a .rhosts on the primary server and do something like rsh 192.168.1.1
>tar -cf - /dir | tar --atime-preserve --same-owner -xpf - (the - is stdout).
>A better and more secure solution would be to use ssh for this. You can get
>as elaborate with this as you like and create a checksum and only replicate
>when it has changed and so forth.
>
>3) Again on the backup server, possibly even in your replication script, you
>can script a ping to the primary web servers IP address. If the ping fails
>call the commands to bind the primary web server address to the backup
>address using ifconfig:
>
>/sbin/ifconfig eth0:0 192.168.1.1 netmask 255.255.255.0 up
>/sbin/route add -host 192.168.1.1 eth0:0
>
>See the NET-3-HOWTO and the IP-Alias mini-HOWTO for more on this.
>
>4) If your primary server fails and the backup has to bind it's address
>you'll want to stop the script from binding the address over and over. Maybe
>check for the existance of a file in var/local/ that will be either created
>or deleted, it's your choice.
>
>There you go free and easy. You can even add second NIC to each machine to
>create an internal RFC1918 (private) net similar to what M$ NT uses for
>clustering(for just a few dollars, marks, or pesos more). I'd like to take
>credit for this but someone else clued me in in a class I took. Bob, if you
>watch this list, thanks.
>
>-Chris
>
>
>
>On Tuesday, August 03, 1999 4:30 PM, Elliot Poger [SMTP:[EMAIL PROTECTED]]
>wrote:
> >
> >
> > flippie wrote:
> >
> > > By Clustering I mean having 2 machines, that is not dependant on each
>other.
> > > Lets say the harddrive goes on the one, the other one must take over.
>These two
> > > machines must not share anything. It must be, as if these two machines
>have the
> > > same IP address, but still be mirroring between them.
> >
> > I think the newest version of TurboLinux has something like that.  I
>haven't tried
> > it yet, but I talked to some dude at LinuxWorld about it... (great show,
>by the
> > way).
> >
> > Or, if you're willing to spend the dough, you can get a hardware
> > load-balancer-failover box like BigIP and put it in front of all the
>machines.
> >
> > -Elliot
> >
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-net" in
> > the body of a message to [EMAIL PROTECTED]
>-
>To unsubscribe from this list: send the line "unsubscribe linux-net" in
>the body of a message to [EMAIL PROTECTED]

----------------------------------------------------------------------
Thorsten von Eicken                              805-964-0383 x313
Chief Architect                                  805-964-6103 (fax)
expertcity.com                                   805-403-0982 (cell)

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to