Database Management · Advanced level

Advanced level · Module 4: Replication, Availability and Recovery · Lesson 2 of 4

High Availability and Failover

Plan how a standby takes over when the primary fails, and avoid split-brain.

In this lesson you will

  • Perform a planned failover
  • Explain automatic failover and split-brain risks

Key concepts

promotionplanned vs unplanned failoversplit-brainfailover tools

The lesson

Failover promotes a standby to become the new primary. In a planned failover — for maintenance — you stop writes, let the standby catch up and promote it.

Automatic failover tools detect a failed primary and promote a standby, but must avoid split-brain: two servers both accepting writes, creating conflicting data. That is why they use quorum and fencing.

Applications need to find the new primary, through a changed address, a proxy or connection settings listing several hosts. Practise failover regularly so it is routine.

Step by step

  1. Plan a maintenance failover step by step.
  2. Promote the standby.
  3. Repoint the application to the new primary.
  4. Rebuild the old primary as a standby.

Practice activity

Perform and document a planned failover of the health database.

Expected result: A completed failover with the steps, timings and any problems recorded.

Check your understanding

  1. What is split-brain?

    Show answer

    Two servers both acting as primary and accepting writes.

  2. What must happen to applications after failover?

    Show answer

    They must connect to the new primary.

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.