Re: High Availability questions
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? One thing I have done with a PHP/MySQL web site that is heavily DB driven for fail over is the following. I mirror all the PHP code to a second server. The second server is a replication slave for the database. If the database fails or has issues then a redirect is given, sending the user to the backup server. Some tracking is lost, but for me that is okay right now. Two way replication would solve this by sending any changes back to the master when it comes up. This now makes the problem simpiler by only have to detect when the webserver is down. Jim -- /\ ASCII Ribbon Campaign . \ / - NO HTML/RTF in e-mail . X - NO Word docs in e-mail . / \ - [EMAIL PROTECTED] http://www.FreeBSD.org The Power to Serve [EMAIL PROTECTED] http://www.TheHousleys.net [EMAIL PROTECTED] http://www.SimTel.Net - Your mouse has moved. Windows NT must be restarted for the change to take effect! Reboot now? [OK] - 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
Re: High Availability questions
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
Re: High Availability questions
On Tue, Mar 19, 2002 at 10:13:09PM -0500, Young Sul wrote: 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? Build a database server big enough and bad enough to handle any load. If that was no longer possible (financial constraints or otherwise), I think we'd start looking to divide the dataset across multiple servers. Our site services users by region, so we could probably get away with it without too much of a hassle. We're years away from this, if ever, though. We keep expecting to hit a limit any day now, but MySQL has continued to perform beyond our expectations for years. We haven't even switched to InnoDB tables yet. -- Michael Bacarella | Netgraft Corporation | 545 Eighth Ave #401 Systems Analysis | New York, NY 10018 Technical Support | 212 946-1038 Managed Services | [EMAIL PROTECTED] - 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
Re: High Availability questions
At 22:13 2002-03-19, 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? TIA, -y Check here: http://oss.sgi.com/projects/failsafe/ It doesn't specifically mention MySQL, but I just had a look at the other database failover scripts, and it shouldn't take You long to change them for MySQL. Once You do, You may want to put them up for others to use. Other than that it works like a charm. -- sql, query Tomasz Korycki [EMAIL PROTECTED] - 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