Vezi pagina în română

IT Glossary

What is failover (automatic switch to standby)?

The mechanism by which a standby system automatically takes over the work when the primary one fails.

6
sections
6
questions answered

Failover is the mechanism by which a server, database, internet connection or application switches automatically to a standby component when the primary one fails or stops answering health checks. When the same switch is started by a person at a chosen moment it is called switchover, and moving back to the primary once it has been repaired is called failback.

Two numbers describe any failover: how long recovery may take before it hurts the business (RTO) and the point in time to which data must be recovered, i.e. how many unreplicated writes from before the failure you can afford to lose (RPO). The distinction that matters commercially is between failover and backup, which are frequently confused in vendor proposals. Backup protects the data and is measured in how much you can afford to lose and how long restoring takes. Failover protects availability and is measured in how many seconds the takeover costs. You need both, they cost different amounts, and buying one while believing you bought the other is the most expensive misunderstanding in the whole area of business continuity.

Why it matters for your business

Continuity without human intervention

The switch happens automatically at the moment of failure, rather than after someone notices, finds the runbook and reaches a keyboard.

Maintenance with shorter interruptions

Upgrades can run on one side while the other serves traffic. Some updates trigger a switch themselves, so they belong in a planned maintenance window.

A verifiable commercial argument

Availability commitments to enterprise customers become demonstrable with test evidence rather than asserted in a proposal.

How failover works

The primary is monitored continuously. A periodic heartbeat or health check asks the primary whether it is working. When the answers stop, the system declares a failure, promotes the standby to primary and redirects traffic to it through DNS, a floating IP address or a load balancer. Failback follows: once repaired, traffic returns to the original component, usually at a planned moment.

A documented example: Amazon RDS Multi-AZ keeps a synchronised standby database in another Availability Zone and fails over automatically. AWS documentation puts a typical failover at 60 to 120 seconds, not instantaneous. The switch repoints the database DNS record, so applications must reconnect, and AWS recommends a JVM DNS cache TTL of no more than 60 seconds.

Active-passive vs active-active (and cold, warm, hot standby)

In active-passive, one component serves traffic while the standby waits. It is simpler, and the switch costs a short interruption. On Amazon RDS, for instance, the standby cannot even serve reads. In active-active, all nodes serve traffic and losing one only reduces capacity. The hard part is keeping writes consistent between nodes.

The AWS disaster recovery whitepaper orders the options by cost and recovery speed: backup and restore, pilot light, warm standby, then hot standby or multi-site active-active. The last is described as the most complex and costly, with recovery time near zero for most disasters. Cold standby is a spare that must be started and loaded with data only at the incident (cheapest, slowest); warm standby already runs at reduced capacity; hot standby runs at full capacity but receives no traffic. Choose the level by the loss you can accept, not by what sounds best in a proposal.

Want an estimate for your project?

Message us on WhatsApp. We reply the same working day, and the first 30-minute call is free.

Book a free call

RTO, RPO and how failover differs from backup

NIST SP 800-34 defines RTO as the overall length of time an information system's components can be in the recovery phase before negatively impacting the organization's mission or mission/business processes, and RPO as the point in time to which data must be recovered after an outage. Synchronous replication brings RPO close to zero at the price of higher write latency. Asynchronous replication is faster, but the last seconds of writes can be lost.

Failover protects availability, backup protects data. Replication copies deletions, corrupted data and ransomware encryption too, and AWS warns that continuous replication may not protect against corruption or malicious deletion. You need both.

Failover for a small business: managed service or self-installed

A managed cloud service offers failover as an option you enable and pay for (on Amazon RDS, a Multi-AZ deployment); a database you install yourself has none. The PostgreSQL documentation states plainly that it provides no software to detect a failure of the primary. Promotion is done with pg_ctl promote or pg_promote(), and the old primary must be shut down by force (STONITH), otherwise both servers believe they are primary and data is lost.

AWS also warns that automatic failover triggered by a false alarm costs availability and data, which is why many teams start it manually with every step automated. For a small business the practical questions are who monitors, who decides and who has rehearsed the scenario, not how many servers you own.

Frequently asked questions

What does failover mean?

Failover is the automatic takeover of work by a standby component (server, database, connection) when the primary one fails or stops answering health checks. The aim is to keep the service available without waiting for a person to notice, diagnose and act.

What is the difference between failover, failback and switchover?

Failover is the automatic switch to the standby after a failure. Failback is the return to the primary once it has been repaired. Switchover is the same switch started by a person, usually planned for maintenance or testing.

What does active-passive mean compared with active-active?

In active-passive, one system serves everything while the standby idles, ready to take over; the switch costs seconds to minutes. In active-active, both handle live traffic and losing one merely reduces capacity. It is the most complex and costly option, particularly around keeping data consistent between the two.

Is data lost during a database failover?

It depends on how replication is configured. Synchronous replication confirms each write on both nodes before acknowledging it, so nothing is lost but every transaction pays a latency cost. Asynchronous replication is faster and can lose the last few seconds of writes. Decide against the value of a transaction and write the chosen RPO into the continuity plan.

What is split-brain in failover?

Split-brain happens when two nodes both believe they are the primary and accept writes in parallel, leaving divergent or lost data. It is prevented by forcibly shutting down the old primary before promoting the standby (fencing, STONITH), as the PostgreSQL documentation requires.

How often should failover be tested?

Through a real planned switch (on Amazon RDS, for example, reboot with failover), repeated regularly and after every infrastructure change, with the results written down. AWS guidance asks for regular assessment and testing. The failures are mundane: an expired certificate on the standby, a firewall rule nobody replicated, configuration drift.