Hyperce Knowledge Base
Runbooks

Database Failover

Runbook for handling database failover scenarios.

When to Use

Use this runbook when the primary database becomes unresponsive or shows degraded performance that cannot be resolved by restarting the service.

Prerequisites

  • Database admin access
  • Access to the cloud provider console
  • Familiarity with the replication setup

Steps

  1. Confirm the primary database is unhealthy via monitoring.
  2. Check replication lag on the replica.
  3. If lag is acceptable (< 5 seconds), initiate failover.
  4. Update the connection string in the application config.
  5. Restart affected services.
  6. Verify application connectivity to the new primary.
  7. Investigate the root cause of the original failure.

Post-Failover

  • Monitor the new primary for stability.
  • Rebuild the old primary as a new replica.
  • Update documentation if the topology changed permanently.

On this page