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
| Term | What happens | When |
|---|---|---|
| Failover | automatic switch to the standby | the node has failed |
| Switchover | a planned, controlled switch — usually at a person’s command | maintenance, node update |
| Failback | switching back to the restored primary node | after 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 promotecommand; 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- NIST Glossary — failovercsrc.nist.gov/glossary/term/failover(opens in a new tab)
- RFC 5798 — Virtual Router Redundancy Protocol (VRRP) Version 3rfc-editor.org/rfc/rfc5798(opens in a new tab)
- PostgreSQL — High Availability, Load Balancing, and Replicationpostgresql.org/docs/current/high-availability.html(opens in a new tab)
Verified 9 Nov