System Scalability — Database failover strategy

Cold standby — periodically backup

We have a primary database running, and a standby database idling sideway.

  • To provision a new server and restore database from backup file takes time, especially if there is a lot of data.
  • The data that happened after the last backup will be lost.
  • So we need to prepare to tolerate a certain amount of downtime and data loss.

Warm standby — replication

Again, we have a primary database, and a backup database.

Hot standby — simultaneously write/Read

Instead of doing replication, we are actually writing data simultaneously to every database instance, so both primary and backup database hold the same data at the same time.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store