On Fri, Feb 15, 2002 at 09:43:28AM +0100, Wolfgang Pichler wrote:

> I have to set up a HA-Linux Server with Apache and mysql running on
> two machines over load balancing. Apache isn't a problem. But mysql.
> AFAIK it is impossible to cluster mysql - it "only" supports
> replication. As I've said already, we have only two machines, and
> two firewalls of course, for web and mysql server - but this two
> machines should for the best work load balanced and failsafe. So, if
> one machine fails because of a hardware fault - the other machine
> must be able to overtake the whole work. So it is necersary to
> install Apache and mysql on both server's.

So far, so good.

> And, to get the best performance out of it, I've got the following
> idea: The whole WebApplication has an own db interface so that it
> should be possible to...

> First Server runs: apache and mysql master <- all write Operations are
> done one the master <- read operations from the first server are also
> done one the master.

Yep.

> Second Server runs: apache and mysql slave <- gets synchronized by the
> master <- read operations from the second server are done on the slave
> <- write operations are getting directed to the master -> which then
> synchronize the slave.

Makes sense.

> Because of dynamic load balancing this should get a nice average
> load.
> 
> If then one machine fails - then you have on both machines everthing
> you need to work in standalone mode.

Exactly.

> The only thing is, that you need some scripts which switches the
> databases from slave to master mode, doing synchronization after the
> are working again, redirecting all the read/write operations to one
> machine, and some additional work.

If you can guarantee that writes will only ever go to a single
machine, set the MySQL servers up as dual-masters and it'll simplify
things quite a bit.

Jeremy
-- 
Jeremy D. Zawodny, <[EMAIL PROTECTED]>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

MySQL 3.23.47-max: up 10 days, processed 328,139,757 queries (378/sec. avg)

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to