On Tue, 19 Mar 2002, Young Sul wrote:

> Hi,
>
> I've got a website that uses a mysql backend database. Due to the way in
> which
> the database and development has been architected, I'm unable to
> load-balance
> the database between multiple DB servers, taking advantage of replication
> inherent
> in mysql. (this is due largely to developmental constraints, and heavy use
> of write
> only session-management)
>
> I *need* to somehow mirror and create a decent failover environment for my
> database.
>
> Currently, I mirror the master DB on another server, and can switch over
> ...manually...
> if the master dies.
>
> I'm wondering if others on this list have encountered a similar situation --
> how did
> you finally architect your DB environment?

I run a number of web servers all of which are mirrored by a second
identical failover server. During normal office hours when the sites are
busiest, the main server dumps all databases every hour to an NFS share
and the failover server first drops all the backup databases and then
imports them from the share. (The two servers have a private dedicated
netwotk conection between them for this, separate from the main public
Internet connections). The sites themselves, httpd configuration files,
clinet FTP account info, etc are mirrored every night by simply updating
all the files that have changed during the previous 24 hours.

The failover server simply pings the main server every minute - if it
fails to get a response for 2 minutes, then it stops Apache, Cold Fusion
servers, etc, areconfigures its network interfaces to use the IP addresses
of the failed server, replaces the Apache httpd.conf with the last one
from the main server and restarts Apache.

Outside of normal office hours and at weekends, the MySQL databases are
synchronised every 3 hours and all changes made to the databases are
logged using the NySQL logging feature. This can be 'played' back from the
last update to reflect any changes made since the previous update.

Simple but effective. Now that version 4.0.x is here, we might look at
using the master/slave replication features this offers but there's no
great rush and we need to do it in such a way that downtime on existing
servers is minimised.

Andy


---------------------------------------------------------------------
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