Lets say you have a large, popular database-driven website. There are people on the site all day and all night. They access pages that both read and write to the database.
When implementing a daily database backup plan, it involves doing cold backups, which means that you temporarily shutdown the database or lock tables while the backup is in progress. This ensures that new data is not inserted into the database while the backup is happening.
What are some good approaches to coding your site controllers and models so that they don't fail due to table locks or the database being offline? Do you need to implement some sort of database write queue system or something like that? Or just take the whole site offline temporarily? Or just do live backups without locking or shutting down anything? What is a good approach?
Use replication, here is a simple scenario
1 master A, 2 slaves B, C
For Day 2, just repeat the whole cycle, of course master is now B.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With