List:General Discussion« Previous MessageNext Message »
From:barries Date:November 17 2000 2:59am
Subject:Re: Load balancing queries?
View as plain text  
On Thu, Nov 16, 2000 at 04:46:26PM -0700, Eric Thelin wrote:
> Lets say I have 4 slaves replicating
> off of 1 master and 3 webservers that I want to use to pull queries on
> the database cluster.  Is there any existing way to make those 4 slaves
> look like one very high performance database server (by sending
> alternating queries to different servers)?

You could pretty easily have your web server processes open 1 connection
to each of the 4 and just rotate which connections you use.  Your
db servers would need more RAM.

Why won't load balancing the web servers and connecting each web server to
one database server work for you?  Roughly speaking, that should deliver
the average load across 3 of your db servers.

I'm planning a similar setup, but I'm planning on having a mysql server
coresident with Apache + mod_perl on a 2GRAM, 2 CPU front end boxes
then putting the master server on it's own box.  All writes (and
a few reads that are intermingled with writes) will be against the
master server--over TCP--while all (>95%) of the reads will be against
the local server--over Unix sockets.  One way replication from master
server to slave servers.

The (untested as yet) concept being that the Unix domain socket will
be lower overhead than using the network, overall, and that it's a bit
cheaper to load up a chassis with multiple CPUs and more RAM than it is
to but 2 chassis, disks, net cards, etc.

So in your situation, I could end up with say 4 combined servers rather
than 3+4 split up and, I hope, serve at least the same throughput and
have a simpler config.  I hope :-).

The front end loadbalancing should distribute my requests among the
various web servers.

I'll know more when I get to buy enough hardware to test it all:
if anyone's experimented with such a setup, I'd love to hear about it!

Not that I know of anything that fits your needs, though.

- Barrie
Thread
Load balancing queries?Eric Thelin17 Nov
  • Re: Load balancing queries?barries17 Nov
  • Re: Load balancing queries?Bogomolnyi Constantin18 Nov
Re: Load balancing queries?Andreas Vierengel20 Nov