Active-passive is a high availability architecture in which one node serves all production traffic while one or more standby nodes stay idle or semi-idle, ready to take over through failover when the active node fails. In the reliability practice of servers, it is the most common way to remove a single point of failure without changing how the application itself handles requests.
The design trades unused standby capacity for simplicity: because only one node writes data or accepts sessions at a time, it avoids most of the consistency problems that make multi-writer systems difficult. Its effectiveness depends almost entirely on how quickly and safely the standby can detect failure and assume the active role.
How an active-passive cluster operates
An active-passive cluster consists of an active node, at least one passive node, a mechanism that keeps state synchronized between them, and a health monitoring layer that decides when to switch. Clients reach the service through a stable endpoint, typically a floating virtual IP, a DNS name or a load balancer target, so that a failover does not require client reconfiguration.
The passive node continuously receives data from the active one through replication: database log shipping, block-level storage replication, or a shared storage volume that only one node mounts at a time. Health checks, often implemented as heartbeat messages every one to a few seconds, tell the passive node whether its partner is alive.
The following table summarizes the components and the role each plays.
| Component | Role | Typical implementation |
|---|---|---|
| Active node | Serves all reads and writes | Primary database or application server |
| Passive node | Holds synchronized state, stays ready | Replica or standby server |
| Replication channel | Copies data from active to passive | Log shipping, DRBD, storage mirroring |
| Heartbeat and monitor | Detects failure of the active node | Corosync, keepalived, cloud health checks |
| Client endpoint | Hides which node is active | Virtual IP, DNS record, load balancer |
Standby temperature and its effect on recovery
Active-passive designs differ mainly in how ready the passive node is, often described as its temperature. The warmer the standby, the shorter the recovery time objective (RTO), and the higher the cost of keeping it running.
| Variant | State of passive node | Typical RTO | Relative cost |
|---|---|---|---|
| Hot standby | Running, data replicated continuously | Seconds to about one minute | High |
| Warm standby | Running at reduced scale or partly loaded | Minutes | Medium |
| Cold standby | Provisioned but stopped, restored from backup | Hours | Low |
The recovery point objective (RPO) depends on the replication mode rather than the temperature. Synchronous replication confirms each write on both nodes and can achieve an RPO of zero, at the cost of added write latency. Asynchronous replication keeps writes fast but may lose the last seconds of transactions when the active node fails abruptly.
Active-passive compared with active-active
The main alternative is active-active, where every node serves traffic simultaneously. Choosing between them is a question of consistency requirements, budget and operational maturity, not of one design being universally better.
| Aspect | Active-passive | Active-active |
|---|---|---|
| Capacity use | Standby resources mostly idle | All nodes carry load |
| Data consistency | Single writer, simple | Conflict handling or coordination required |
| Failover impact | Brief interruption during switch | Remaining nodes absorb load |
| Scaling | Limited to one node’s capacity | Scales horizontally |
| Operational complexity | Lower | Higher |
Active-passive remains the default for stateful systems with a single writer, such as relational databases, message brokers and file servers. Active-active fits stateless web tiers and globally distributed services, where the extra complexity buys both capacity and availability.
Failover, fencing and split-brain prevention
The most dangerous failure in an active-passive cluster is split-brain: both nodes believe they are active and accept writes independently, which corrupts or diverges data. It usually happens when the heartbeat network fails while both nodes remain healthy.
Mature clusters prevent split-brain with two mechanisms. Quorum requires a majority vote, often supplied by a third witness node or arbiter, before any node may become active. Fencing, also called STONITH (shoot the other node in the head), forcibly powers off or isolates the old active node through an out-of-band interface before the passive node takes over.
- Automatic failover reduces downtime but must be tuned to avoid flapping on transient network glitches.
- Manual failover gives operators control and suits systems where a false switch is costlier than a few minutes of delay.
- Failback to the original node should be a deliberate, planned operation, not an automatic reflex.
Limitations and common mistakes
An active-passive design only delivers its promised uptime when the standby is regularly proven to work. Many outages occur precisely at failover, because the passive path was never exercised.
| Mistake | Consequence | Remedy |
|---|---|---|
| Untested standby | Failover fails when needed | Scheduled failover drills or chaos engineering |
| Shared dependency | Both nodes fail together | Separate power, network and storage paths |
| No fencing | Split-brain and data divergence | Configure STONITH and quorum |
| Configuration drift | Standby cannot run current release | Deploy to both nodes from one pipeline |
| Undersized standby | Degraded service after switch | Match passive capacity to peak load |
A further limitation is cost efficiency: an idle hot standby doubles infrastructure spend for a node that serves no traffic most of the time. Some teams offset this by sending read-only queries or backups to the replica, which preserves the single-writer model while putting the standby to use.
A plain-language summary
Active-passive works like a backup goalkeeper sitting on the bench in full kit. Only one goalkeeper plays at a time, but if the first one is injured, the second steps in within moments and the match continues.
The bench player costs money while doing nothing most of the time. The payoff is that the game never stops for long when something goes wrong, and there is never confusion about who is guarding the goal.
An example from practice
A regional online retailer runs its order database as an active-passive PostgreSQL pair in two availability zones. The primary handles every order; a hot standby receives the write-ahead log through synchronous streaming replication, so no confirmed order can be lost. A cluster manager monitors both nodes with heartbeats every two seconds, and a small witness node in a third zone provides quorum.
One evening the primary’s storage controller fails. Within about 30 seconds, the cluster manager fences the old primary, promotes the standby and moves the virtual IP. Shoppers see a short pause at checkout, and the team confirms an RPO of zero and an RTO under one minute. The failed node is repaired the next morning and rejoins as the new standby during a planned maintenance window.