Back to Engineering Blog
Systems Design 3 min read

A Warm Standby for the Control Host: Sync, a Role Guard and a Safe Promotion

The management host is a single point of failure, so we built an N+1 warm standby on the second hypervisor. A tiered one-way sync runs on a fifteen-minute timer, a role guard keeps the standby passive, and a promote script refuses to run while the primary still answers.

Jason NevillBy , Houston, TX
#DisasterRecovery#HighAvailability#Proxmox#Runbook

Key Architectural Takeaways

  • Make the sync one-way, tiered and loud on failure, with a staleness alert if it stops.
  • A role guard keeps a standby passive so it cannot act as a second primary.
  • Promotion should refuse while the primary still answers, and document the credentials that cannot be copied.

The challenge

The lab's management host holds the automation, the repository checkout and the day-to-day tooling. If it died, getting back to work would depend on restoring a backup. We wanted a warm standby on the second hypervisor, with the backups from the second backup target as the second layer behind it (N+1 warm standby, N+2 backup restores).

The pieces

A tiered, one-way sync. A script copies the primary's working state to the standby on a 15-minute systemd timer. It has --plan, --dry-run and --check modes, fails loudly, and raises a staleness alert if the sync stops. One-way matters: nothing flows back, so a bad standby cannot corrupt the primary.

A role guard. The automation checks which role a host holds. A standby can never run the primary's automated jobs, so the two cannot both act on the same work.

A promote script. It refuses to run while the primary still answers. Promotion is the dangerous moment in any failover design, because two active primaries is worse than none. The script also lists the credentials that cannot be copied to the standby at all (the most sensitive logins), so they are a documented human step during a real failover.

A runbook (the standby sync and promotion runbook) covering the sync, the guard and the promotion, plus Terraform for the standby's disk (16 GB to 24 GB).

What was left as a human step

The live setup, a pre-change backup, the disk resize, installing the sync tools and the first sync, was blocked by the safety controls on the first attempt, and is listed in the runbook as an explicit human step. The code and tests shipped; the live enablement waited for a person.

Tests

Unit tests cover the role guard and the orchestrator's guard behaviour, and they passed.

Takeaway

Design the failover around what should be impossible: two active primaries, a standby that acts early, and a promotion that happens while the old primary is merely slow. Then make the safe behaviour the default and the dangerous one explicit.

Some of what's described here is a design that hasn't been fully tested yet; those parts say so in the text.

Follow the build on LinkedIn or by RSS.

All Articles

Follow the build

Questions about the build, or spotted something we got wrong? Find us on LinkedIn and GitHub.