A hot standby is a secondary system that runs continuously, stays synchronized with the primary, and is ready to serve traffic almost immediately if the primary fails. It sits idle (or serves only reads) until a failover promotes it.
Why it matters
Hot standbys give the shortest recovery time of the standby styles, often seconds to a minute, at the cost of paying for capacity you rarely use. They are common for databases, where a replica streams changes from the primary and can be promoted on failure. How much data you lose depends on whether replication is synchronous (no loss, slower writes) or asynchronous (faster, but recent writes may be missing).
Example
A PostgreSQL primary streams its write-ahead log to a replica. When health checks fail, a tool or an operator promotes the replica:
pg_ctl promote -D /var/lib/postgresql/data
Traffic is then pointed at the new primary through a virtual IP, a DNS change or a proxy. The old primary must be fenced off before it comes back.
Common mistakes
- Never testing promotion, so the first real failover is also the first rehearsal.
- Allowing the old primary to rejoin and accept writes, creating split brain.
- Forgetting that a standby copies mistakes too. A bad delete replicates instantly, so you still need backups.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.