Cloud Computing•10 min read•2251 words

Zero-Downtime Cloud Failover: On-Call Engineer Checklist

Harun Barış Bulut

PlusClouds Author

Cloud & SaaS

ملخص سريع

A practical on-call checklist for building zero-downtime cloud failover with load balancers, bare metal, and multi-AZ storage, covering health checks, replication lag, split-brain prevention, and a failover rehearsal drill you can run without a maintenance window.

The On-Call Engineer's Checklist for Zero-Downtime Cloud Failover Using Load Balancers, Bare Metal, and Multi-AZ Storage
Size

The alert fires at 2:14 AM. Your primary database node stopped responding, the load balancer has pulled it from rotation, and traffic is now hitting the standby. Green checkmarks everywhere in the dashboard. Then you notice the standby is serving stale reads, the cache is cold, and checkout latency has tripled. Your failover worked on paper. It did not work for your users.

Sound familiar? Zero-downtime failover is one of those systems that looks complete in the architecture diagram and falls apart in the details: health checks that flap, replication lag nobody measured, and a runbook that exists only in someone's head. This guide is a practical checklist and rehearsal runbook for building cloud failover that actually holds, covering health-check design, active/passive versus active/active patterns across Cloud VMs and Bare Metal, replication and snapshot strategy, and a drill you can run this week without a maintenance window.

Table of Contents

Key takeaways

  • Most failed failovers trace back to three causes: health checks that test the wrong thing, unmeasured replication lag, and split-brain states with no quorum mechanism.
  • Active/passive fits stateful workloads with an RPO tolerance; active/active fits stateless tiers and read-heavy services, and most real high availability architectures mix both.
  • Your recovery point objective is only real if you have tested a restore, not just a backup; a backup you have never restored from is a hope, not a control.
  • A failover rehearsal you run quarterly, with timers and evidence, is worth more than any architecture document.

Failure modes every on-call engineer fears

Before you design failover, enumerate what you are failing over from. The Google SRE book on building secure and reliable systems makes a point that applies here: reliability work without a threat model is decoration. For failover, your threat model is the set of failure modes below.

Node death. The easy one. A VM or bare-metal host dies, the load balancer notices, traffic shifts. Most load balancer setups handle this. If yours does not, stop reading and fix that first, because everything else builds on it.

Partial failure. The node is up but the application is broken. Process running, port open, database connection pool exhausted. A TCP health check passes. Users see 500s. This is the failure mode that kills naive health-check designs, and it is why your checks must test application logic, not just socket reachability.

Zone failure. The availability zone hosting your primary goes dark. Now your failover target is not a node, it is a location, and replication lag becomes the central variable. If your standby is 45 seconds behind when the zone dies, you have a 45-second data loss window whether or not you like it. You do not get to choose your RPO during the incident; you chose it when you configured replication.

Split brain. Two nodes both believe they are primary. Two databases accepting writes, two sets of customers seeing conflicting state. This is the failure mode that turns an outage into a data-recovery project. Any active/passive design without a quorum or fencing mechanism has this as a live possibility.

The silent degradation. Nothing is down. Latency creeps from 80 ms to 400 ms over three weeks. No alert fires because nothing crossed a threshold. Then a traffic spike arrives and the whole tier collapses. Failover design and capacity headroom are the same discipline.

Config drift. The standby was configured in 2023 by someone who has since left the company. It has never received the four application updates the primary got. Failover succeeds technically, and the application crashes on a schema mismatch. Your standby is only as current as your deployment pipeline allows it to be.

Designing health checks and automatic failover

Health checks are the nervous system of load balancer failover. Get them wrong and the rest does not matter.

Check the work, not the wire

Diagram of three-layer health checks: liveness, readiness, and depth check feeding into a load balancer

A three-layer health-check model works well in practice:

  1. Liveness (TCP or ICMP): is the machine reachable? Cheap, fast, nearly useless on its own.
  2. Readiness (HTTP endpoint): can the application serve requests? This should hit a real endpoint that verifies dependencies: database connection, cache, disk space.
  3. Depth (synthetic transaction): can the application do actual work? For a checkout service, this might be a lightweight read against the database every 30 seconds.

A minimal readiness endpoint looks like this:

{
  "status": "healthy",
  "checks": {
    "database": { "status": "up", "latency_ms": 4 },
    "cache": { "status": "up", "latency_ms": 1 },
    "disk_free_pct": 41
  }
}

The endpoint returns 503 the moment any dependency fails. Wire your load balancer to that, not to a TCP probe on port 443.

Tune the thresholds deliberately

Three parameters decide how failover behaves: interval, timeout, and healthy/unhealthy threshold counts. Too aggressive and you get flapping, where a node with a momentary GC pause gets pulled from rotation and your effective capacity drops 25% for no reason. Too conservative and users experience the outage before the balancer does.

A reasonable starting point for an HTTP readiness check: 5-second interval, 2-second timeout, 3 consecutive failures to mark unhealthy, 2 consecutive successes to restore. Then adjust based on what your application actually does. A service with 8-second batch jobs needs different numbers than a stateless API.

Crucially, alert on flapping separately from alerting on failure. A node that cycles in and out of rotation every 90 seconds is telling you something, and it is not "everything is fine because the balancer is handling it."

Failover needs a decision-maker

Automatic failover without coordination produces split brain. Whatever orchestrates your promotion (Patroni for PostgreSQL, a Raft-based controller, or your load balancer's own consensus) needs a quorum mechanism that lives outside the failing pair. The rule: never let two nodes decide between themselves who is primary. Introduce a third witness, and make sure the witness is not in the same failure domain as either candidate.

Active/passive vs active/active patterns on Cloud VMs and Bare Metal

The choice between these high availability patterns is really a choice about state, and it is worth making per tier rather than per application.

Factor Active/Passive Active/Active
Best for Stateful primaries: databases, queues, session stores Stateless tiers: APIs, web frontends, workers
Failover speed Seconds to minutes (promotion step) Instant (node removed from rotation)
Cost efficiency Standby idles at 30 to 50% of spend doing nothing Every node earns its keep
Data risk Split-brain and replication lag Conflict resolution, eventual consistency
Operational complexity Lower, but promotion must be rehearsed Higher; requires stateless design discipline

The hybrid pattern most teams actually run

In practice, the strongest architecture mixes both across a hybrid footprint. Run your stateless edge and application tiers active/active on Cloud VMs, where elasticity absorbs traffic spikes. Run your stateful core (the primary database, the write-heavy services) active/passive, and consider putting the standby or the steady-state bulk workloads on dedicated hardware. This is the same steady-state-versus-burst split described in our hybrid infrastructure playbook for growing SaaS teams, and it maps well onto failover: bare metal gives the primary a predictable, non-noisy neighborhood, while Cloud VMs handle the elastic tiers where node death is routine and the balancer absorbs it silently.

With Networking & Load Balancers, you deploy the balancers and the five network types (public, private, VPN, management, DMZ) from a single control plane, which matters here for one specific reason: your health-check traffic and your production traffic should not share a network path. If your readiness probes run over the same congested public interface as your traffic, a bandwidth event looks like a node failure. Segmenting probe traffic onto the management network is a ten-minute fix that prevents an entire class of false failovers. Our guide on public, private, VPN, DMZ, and management zones covers the segmentation model in detail.

One more economic note: when your failover design spreads traffic across regions or pulls data back from a standby, egress fees can quietly become the largest line item in your HA budget. Zero-egress infrastructure like PlusClouds removes that tax structurally, which we break down in the hidden networking tax of cloud egress costs.

Replication and snapshot strategies with Cloud Storage and Automated Backup

Failover handles availability. Replication and backup handle data. They are different disciplines and they fail differently.

Match replication mode to your RPO

Replication mode Typical lag Data loss on zone failure Use when
Synchronous Near zero None Financial writes, anything with a hard zero-loss requirement
Semi-sync Milliseconds to ~1s Minimal Primary OLTP databases
Asynchronous Seconds to minutes Equal to lag Read replicas, cross-zone standbys, analytics

The critical discipline here is measuring lag, not assuming it. Export replication lag as a metric, alert when it exceeds a fraction of your stated RPO, and recognize that lag is your real RPO. If your RPO is 30 seconds and your cross-zone lag p99 is 90 seconds, your RPO is 90 seconds and your compliance documentation is lying.

Backups are the layer failover cannot replace

Failover replicates corruption. If a bad deploy truncates a table at 14:02, your shiny synchronous replica truncates it too, 40 milliseconds later. Only point-in-time backups save you, which is why the two systems must be independent.

Automated Backup handles this with explicit RPO/RTO targets, SLA tracking, and remote restore, so the recovery objectives you state in your architecture doc are the same ones the system enforces and reports on. That evidence trail also feeds audits; if you operate in Europe, the backup and recovery testing requirements in our DORA Article 11 & 12 survival guide will look very familiar.

For the storage layer itself, tier your copies. Hot replicas on NVMe for fast restore, warm copies on SSD, cold snapshots on HDD. Cloud Storage provides pooled, standards-based storage across those tiers, which lets you keep a full restore point close and a deep history cheap. For larger objects and immutable copies, it is worth reviewing the trade-offs in object storage vs. block storage before you commit a tier. And if ransomware is in your threat model (it should be), the backup layer needs immutability; our immutable, air-gapped recovery layer blueprint covers that design.

A rehearsal runbook you can run this week

Six-step failover rehearsal runbook timeline with time estimates from baseline to evidence collection

A failover design you have never rehearsed is a hypothesis. Here is a cloud load balancer failover drill that takes roughly two hours and requires no maintenance window. Run it in staging first, then in production during a low-traffic window with your team on a bridge call.

Step 1: Baseline (15 minutes). Record current state: request rate, p95/p99 latency, error rate, replication lag, disk and connection headroom on every node. Screenshot everything. This is your evidence baseline.

Step 2: Single-node kill (20 minutes). Terminate one stateless application node abruptly (do not drain it; real failures do not drain). Watch the load balancer pull it. Measure time from death to last error. Target: under 30 seconds, zero 5xx spike visible to users. Record the number.

Step 3: Dependency failure (20 minutes). Block network access from one app node to the database (firewall rule, not process kill). Confirm the readiness endpoint flips to 503 and the node leaves rotation before users notice. If users saw errors first, your health-check thresholds are too slow.

Step 4: Primary promotion (30 minutes). In staging, kill the database primary. Measure: detection time, quorum decision time, promotion time, application recovery time, and replication lag at the moment of failure (this is your real, observed RPO). Total time from kill to first successful write is your measured RTO. Compare both against your documented targets. Most teams find their documented numbers were fiction.

Step 5: Restore from backup (30 minutes, quarterly). Restore a backup to a fresh instance and verify application-level correctness, not just file checksums. Time it. This is the only way to know your restore RTO, and it is the step almost everyone skips.

Step 6: Evidence and follow-ups (15 minutes). Write up the measured numbers, every gap between target and observed, and owners for each gap. This document is your next drill's baseline and, if you face a DORA or NIS2 review, part of your test evidence.

Run the full drill quarterly. Run steps 2 and 3 monthly; they are cheap and they catch config drift on your balancers before an incident does.

Conclusion: failover that holds at 2 AM is built in daylight

Back to the 2:14 AM page. In the version of this story worth having, the standby was not stale because lag was monitored and alerting at 15 seconds. The health checks tested real work, so the broken node left rotation before users saw a single error. The promotion took 40 seconds because it had been rehearsed three times, and the measured RPO in your evidence doc matches the one in your architecture document because both come from the same drill. None of that required heroics at 2 AM. It required a checklist executed in daylight, four times a year.

If you are building this on greenfield infrastructure or hardening an existing stack, it is worth evaluating a platform where the load balancers, network zones, tiered storage, and backup with explicit RPO/RTO tracking come from one control plane; you can explore PlusClouds' infrastructure and see how the pieces fit against the checklist above.

Leo Cloud

هل ما زلت تدفع مبالغ زائدة للخوادم؟

النشر في 60 ثانية — ابتداءً من 5 دولارات/شهريًا

النشر المجاني →

No credit card · Cancel anytime

#high availability#load balancers#failover#backups#SRE#cloud infrastructure

الأسئلة الشائعة

What is zero-downtime failover in the cloud?

Zero-downtime failover is the ability of a system to continue serving users when a node, application process, or availability zone fails, without an observable outage. It relies on load balancer health checks, replicated standby infrastructure, and rehearsed promotion procedures so traffic shifts automatically before users notice errors.

What causes most failover failures despite a correct architecture?

Three causes dominate: health checks that test only network reachability instead of application logic, unmeasured replication lag that turns a standby into stale data, and split-brain states where two nodes both act as primary because no quorum or fencing mechanism exists. Rehearsal drills surface these problems before a real incident does.

Should I use active/passive or active/active for high availability?

Use active/active for stateless tiers like APIs, web frontends, and workers, where any node can serve traffic and a failing node is simply removed from rotation. Use active/passive for stateful primaries such as databases and queues, where a promotion step is required. Most production architectures mix both per tier.

How do I set load balancer health check thresholds to avoid flapping?

A reasonable starting point for an HTTP readiness check is a 5-second interval, a 2-second timeout, 3 consecutive failures to mark a node unhealthy, and 2 consecutive successes to restore it. The health check should hit an application endpoint that verifies dependencies like the database and cache, not just a TCP probe on a port. Alert on flapping separately from outright failure.

What is my real RPO if replication lag is high?

Your real RPO equals your observed replication lag, not the number in your documentation. Export replication lag as a metric, alert when it exceeds a fraction of your stated RPO, and measure it during failover drills. If your target RPO is 30 seconds but cross-zone lag p99 is 90 seconds, your actual RPO is 90 seconds.

How often should failover be rehearsed or tested?

Run a full failover drill quarterly, including primary promotion and a restore from backup, with timers and documented evidence. Run lightweight drills like single-node kills and dependency failures monthly, since they are cheap and catch configuration drift on load balancers and standbys before a real incident does.