|
Improve Availability and Performance Using Database ReplicationDatabase replication is the capability of a database to automatically maintain a copy of itself at a separate location. That other location could be another server in the rack, or a server on the other side of the globe. Regardless of the location of the replicated database, most databases attempt to replicate the data in real time, or close to it. (Real time means at the same time.) Since you can count on the replicated data to be the same or almost the same as the "real" data at any given time, you can leverage your "hot spare" in a variety of ways. For this discussion, the master server is the database containing the primary copy of the data, and the slave server is the database containing the replicated copy.
How does it work?
Why do we need replication?
Using replication to improve system availability. Less obviously, replication provides a great way to do system backups to tape without having to bring the system down. Just leave the master database running, temporarily stop replication, shut down the slave database and make a clean backup of your data. Re-start the slave and replication, and the slave will "catch up" to the master in short order - your users will greatly appreciate the increased uptime of your system. And think about this: You will be more likely to make good backups often, since doing so won't impact the availability of the system to your users. If you use UNIX or LINUX, you might consider setting up a CRON job to stop your slave(s), backup the data, and re-start the slaves - this gives you a hands-off, regular backup system, with no system downtime - what a deal! You may be asking, "Why do I still need to do backups if I have replication in place?" A lot of reasons, but one quick example should put that issue to rest: If you mean to enter the SQL statement "drop table tempLog;", but instead type "drop table allMyCustomerDataSinceTheDawnOfTime;" by mistake, your eager-to-please database will happily replicate the command on the slave, and you can say bye-bye to all that critical data. Unless you're using transactions and can "roll it back", your only recourse will most likely be your last tape backup. For added Web site availability, use replication to implement an automatic failover system. Set up your HTTP server on its own server and have it direct queries to the master database server. If the master stops responding, the HTTP server can start sending queries to the slave instead.
Using replication to improve system performance. |
Not logged in. |
|
Web Site Monitoring · Security Scan · Features · FAQ · Pricing · About Us · Contact Us · Site Map |
|
Copyright © 2000-2010 Alertra, Inc. All rights reserved. Please read our privacy statement and our terms of service.