-
-
Save sreeix/1151052 to your computer and use it in GitHub Desktop.
How to run large schema changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Schema Migrations | |
* Master for writes Passive master(slave) for reads | |
* Kill all slave db connections. | |
* Mark slave readonly.(safety) | |
* Mark slave offline(for the application) | |
* Should make the application transparently/otherwise switch reads to master | |
* Run schema migration on slave. Have some coffee(hours) | |
* Let Slave Catch up with the master.(some hours) | |
* Bring the site down | |
* Kill all master db connections. | |
* | |
* Make slave the master. | |
* Bring the site up. | |
* Old master replicates from the new master(But still not online) | |
* Mark new Slave Online | |
* App now seamlessly/otherwise reads from slave |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment