LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

LVS, DBBalancer and PGReplication

To: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: LVS, DBBalancer and PGReplication
From: "Alessandro Bottoni" <abottoni@xxxxxxxxxxxxx>
Date: Wed, 26 Sep 2001 12:54:55 +0200
I'm studing LVS and PGReplication (was Postgres-R, see:
http://gborg.postgresql.org/project/pgreplication/projdisplay.php ) in order
to create a high-available, multi-machine web server (not really a "cluster"
of homogeneous servers...).

Regarding replicated databases, the LVS-HowTo reads:

"When used with LVS, a replicated database is still a single database. The
MySQL service is not load balanced. HOWEVER, it is possible to put some of
your databases on one server and others on another. Replicate each SET of
databases to the OTHER server and only access them from the other server
when needed (at an application or at some fail-over level)."
(See:
http://www.linuxvirtualserver.org/Joseph.Mack/HOWTO/LVS-HOWTO-11.html#ss11.2
4 )

I wonder if it could be possible to use DBBalancer (see:
http://dbbalancer.sourceforge.net/) for having a pair of replicated,
load-balanced database servers at the back-end of the cluster.

DBBalancer seems to be able to create a load-balancing, read/write,
connection pool for all the available DB servers. This feature, together
with the pgReplication ability to keep the two DB servers aligned, seems to
be all we were missing for having a completely redudant system without any
single point of failure.

The whole cluster could look like this:
1) two load balancers (this front-end configuration is proposed by
ultramonkey, actually. See:
http://www.nl.ultramonkey.org/ultramonkey-1.0.2/configuration/example-ha-lb-
4.html )
2) two (replicated) web servers (with PHP or Perl engine)
3) two (replicated) DB servers
Connections could be as follows:
a) Between layer 1 and 2 there would be a regular load-balancing,
fault-tolerant mechanism: LVS directors.
b) Between layer 2 and 3 there would be DBBalancer's connection pool.
Actually, there should be two instances of DBBalancer and two connection
pools, one for each web server. I still do not know if they could connect to
the two databases as two different users.

As a result, each single machine of a given layer could rely on *both*
machine of the following layer. Of course, each machine of a layer would be
connected in a fail-safe pair with the other machine of the same layer.

Did anybody try this before? Does anybody can see any pitfall? What's your
feeling about this dream/nightmare?

-----------------------------------
Alessandro Bottoni
abottoni@xxxxxxxxxxxxx
Quadrante SRL
http://www.quadrante.com
Piazza Galileo, 6
40123 Bologna (Italy)




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