[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Multiple servers for 1 domain name?

Eric Jennings wrote:
> On Monday, February 10, 2003, at 02:24 PM, Thomas Lamy wrote:
> > Eric Jennings wrote:
> >>> On Mon, 2003-02-10 at 16:28, Jason Lim wrote:
> >>>> Hi All,
> >>>>
> >>>> I was wondering if you guys are aware of any solution 
> for multiple
> >>>> servers
> >>>> to server 1 domain name?
> >>>>
> >>
> >> If you start implementing the server farm architecture, 
> and have the
> >> problem of PHP sessions, SSL sessions, etc... Then you may want to
> >> invest in a hardware web switch, like an F5 or Foundry.  
> > One may also use LVS (http://linuxvirtualserver.org/) for 
> that. It's 
> > free,
> > and it runs like a charm. There is also connection 
> persistence, one may
> > choose between different weighting algo's, etc etc. And 
> with keepalived
> > (http://keepalived.sourceforge.net/) you may set up two LVS 
> directors 
> > in a
> > high available fashion, and have full control of how and 
> how often the
> > server's health is being checked (stoopid thigs like tcp 
> connect only, 
> > or
> > md5-hashes of different pages, or ...).
> >
> > We have taken this approach, and are very happy with it.
> >
> > [....]
> Interesting to hear about this approach.  I tried to deploy 
> LVS around 
> three years ago, and it seemed like a huge unstable mess, and at that 
> time it made sense to go ahead and purchase the Foundry.  
> It's good to 
> hear that you have it running successfully in a production 
> environment.
One of our clients started with LVS around 2 years ago for his community
sites (serving ~500GB / month). I did a complete rebuild last year, with 2.4
kernels and LVS releases around 1.0. It's much more stable since 0.95 (?),
and the directors operate like a charm with 2.4's new SMP-able networking
> My question though, is how would you set up redundant LVS directors?  
> Could you offer a simple schematic?
This is keepalived implementing VRRP (Virtual Router Redundancy
Protocol, see <ftp://ftp.isi.edu/in-notes/rfc2338.txt>,
or, more readable,

[Note: I'll use both the terms "director" and "router", as this 
applies to both routers and LVS directors]

Basically, you have two (or more) machines running, and keepalived
(http://keepalived.sf.net/) assigns a virtual IP address to the
external interface of the current "master" server.
All of your Routers/Directors announce their availabilty to an IP
multicast address (, along with their priority, and all
of the routers also listen to those announcements.
If the current "master" goes down, the remaining router with the
highest prority takes over the virtual IP address of the failed one
doing some ARP magic, and you're online (again).

There is also other software which mimicks this ("fake", "mon",
"heartbeat", used in the redhat HA project named "piranha"), but
thei're messy to set up, while VRRP is kinda standard.
I also set up an ipchains-based accounting gateway w/ failover (in lab only)
using VRRP one day, and the results were promising.

> And how often does your rsync run to sync the web servers to 
> the master 
> server?  Seems with the amount of clients we have FTPing 
> things up and 
> down, that this would be a big problem if rsyncs were anything other 
> than immediate.  (A lot of our clients are web developers who do the 
> whole "upload-test-debug-repeat" development cycle with PHP, and if 
> they have to wait 5 minutes after each upload for the files 
> to rsync to 
> the web servers, then they're unhappy customers.  And you know what 
> they say about unhappy customers... :)
As this is for a customer's web site, we have scheduled updates two times a
day, which isn't really an option in your case. But you can monitor
/var/log/xferlog, and rsync only updated files. Or really try NFS.

> Your thoughts?
> Eric

Reply to: