LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: HA LAMP

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: HA LAMP
From: "Thomas Champagne" <lafeuil@xxxxxxxxx>
Date: Wed, 11 Apr 2007 09:16:59 +0200
On 4/10/07, Joseph Mack NA3T <jmack@xxxxxxxx> wrote:
On Tue, 10 Apr 2007, Thomas Champagne wrote:

> Hi
> I would like to create a high availability LAMP. But I have only two
> machines.

that's plenty

> There are two services on each servers : Apache and Mysql.
> Each service have its IP and have a VIP address :

> The problem : Accessing services from a remote client
> (outside the cluster) to the VIP is ok. But when the
> client is the cluster, it always connects on the local
> machine.
>
> For example, when Apache connects to the VIP Mysql with
> PHP script, it always connect to the local Mysql. So if
> Mysql is down on the local but up on the other, Apache
> can't connect to Mysql.

people coming to this mailing list are always trying to
balance the 3rd-tier (in your case, mysql). If this was easy
to do, that would be one thing, but with the current design
of LVS, it's next to impossible.

I continue to point out (to no avail apparently) that the
first connection (here to apache) is balanced, so that the
connection to the 3rd-tier (here to mysql) will be (at least
reasonably) balanced. So you have the balanced apache on
your realserver connect to the local mysql.

To have a valid realserver, both apache and mysql have to be
up. Maybe people think then that there's twice the chance of
the realserver going down and for the same hardware their
99% uptime realserver is now a 98% uptime realserver. So
they have to be prepared for apache_1 to connect to mysql_2.
That would be true if the only failures on the machine were
the demons dying and that they died independantly. I don't
run a production internet site, so I don't have any numbers
on failures in those situations, but it's not often that
demons for no reason at all just die or stop answering. Most
failures seem to be disks and fans dying, memory chips going
bad resulting in corrupt files being written, loss of
network connectivity to the outside world (the backhoe
problem) and surprisingly routers dying. Rarely does the
demon die. In which case requiring two demons to have a
functioning realserver may not change the downtime a whole
lot. There's many other demons running on the realserver
which are part of unix, and which are required for a running
machine, so you actually need maybe 10-20 demons for a
functioning realserver, in which case an extra one (mysql)
isn't going to make a whole lot of difference.

But let's say a functional realserver will have twice the
downtime because it requires two functioning realservsers.
Well that's high availability life when you have a service
that requires multiple demons. You have to fail out the
realserver when either service goes down. That's all.

Last exchange I had on this subject, the person didn't have
any technical reason why they needed to balance the
3rd-tier. They just wanted it. So I haven't been convinced
that you must have a balanced 3rd tier.

Ok, I agree.

> This command returns nothing :
> ls /lib/modules/2.6.18-4-686/kernel/net/ipv4/netfilter/ | grep ROUTE
>
> So, I can't use the target ROUTE.

sure you can. Just use google to find it.

I have googled before posting but I didn't find anything. I'm not very
good with iptables and iproute2.
I'd just like to know, for my personnal knowledge.
Thanks

Joe

--
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!
_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://www.in-addr.de/mailman/listinfo/lvs-users


<Prev in Thread] Current Thread [Next in Thread>