Bookmarks

Failover

Automatic transfer of a service from a failed node to a standby: the system detects the failure on its own and hands the load over to the backup without waiting for a human.

Also: fail-over, failover switching

checked 9 Nov

All terms

Failover is a high availability mechanism: when a primary server, cluster node or network link goes down, a prepared standby takes over its job. The point is for the system rather than the user to notice the failure, and for the downtime to be measured in seconds.

How a failover happens

Behind the automation is a standard sequence of steps:

  • Nodes monitor each other: they poll health checks or exchange heartbeat signals over the network.
  • If responses stop for longer than the threshold — for example, several intervals in a row — the node is considered failed.
  • The standby assumes the role: it claims the virtual IP address, promotes the database replica to primary and picks up the traffic.
  • A quorum — the vote of a witness or an arbitrator — prevents two nodes from simultaneously deciding that they are the primary (split-brain).

Failover, switchover and failback

TermWhat happensWhen
Failoverautomatic switch to the standbythe node has failed
Switchovera planned, controlled switch — usually at a person’s commandmaintenance, node update
Failbackswitching back to the restored primary nodeafter the repair

Where it is used

  • Database clusters: the standby replica of PostgreSQL or MySQL is promoted to primary — in PostgreSQL this is the pg_ctl promote command; automatic failover is usually performed by a separate cluster component.
  • Networks: the VRRP and HSRP protocols maintain a virtual IP address that moves from the primary router to the backup.
  • Virtualisation and clouds: virtualisation clusters restart virtual machines on healthy hosts, and load balancers take a failing zone out of rotation.

Manual switching is used not only for maintenance: it also proves that the standby actually works. A planned switchover exposes problems in advance — otherwise you find out during an outage that the real failover never happened.

Sources

the term is written from these pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

  • DRdisaster recovery

    Failover moves the load to a standby within one site in seconds, while disaster recovery is the plan for when an entire data centre is unavailable.

In depth in the references

where the topic is covered in detail