High availability and disaster recovery
Quick answer
High availability (HA) limits service interruption using redundant components and failover. Disaster recovery (DR) restores service and data after severe disruption. A replica is not an independent backup: deletion or corruption can propagate to it.
Redundant services in one failure domain may fail together. Test failover and independent recovery as separate scenarios: the first measures continuity, the second tests restoration of data and service against recovery objectives.
Prepare the practice environment
Run python3 lab-fixtures/enterprise/setup.py from the extracted root as an ordinary user. Enter the printed private path and check pwd. Use fresh fixtures, Bash with set -e -o pipefail, LC_ALL=C and umask 077. The helper reads fictional records or uses private loopback services and SQLite. No root, external network or real fleet changes are required. Optional native checks require an authorized VM.
Prerequisites
Review: Enterprise identity and access lifecycle.
How it works
Map failure domains (host, rack, site, network, identity and shared storage). A redundant service may still have a single dependency. Active-passive systems promote a standby; active-active systems distribute service across peers. Stateful services need a consistency strategy: quorum helps coordinate decisions, fencing prevents an old writer from accessing protected resources. Promoting a second writer without appropriate protection can cause split brain. Avoid manual forced promotion when the old writer's state is unknown. RPO specifies the recovery point target, expressed here as maximum acceptable recent data loss; RTO specifies a target recovery duration. Measure from the incident to validated service, not just process start. A recovery exercise must include authentication, DNS, dependencies, data integrity and application-level transactions. Store backups in an independent failure domain, protect keys and test restoration. The fixture uses minutes on a fictional timeline; the actual SQLite test uses the database backup API and restores into a fresh private directory, not a live system.
Try the examples
The last usable backup precedes the incident by 15 minutes; recovery took 50 minutes in the scenario. Each objective is independent.
Expected stdout:
RPO gap 15 min: missedRTO duration 50 min: metThe old writer is not confirmed fenced. The model does not implement a cluster protocol.
Expected stdout:
hold promotionSQLite backup API copies a consistent database to a separate destination; integrity and the expected row are checked.
Expected stdout:
database integrity and expected row verifiedCommon mistakes
Do not equate replication with backup, or service startup with recovery. Do not force a second writer without an approved coordination and fencing design.
Practice
Use recovery.json to compute both objective gaps, identify the shared failure domains of a fictional two-node service and propose a tabletop failover/restore plan. Record which application transaction establishes recovery.
Related references
Study: rsync. These are reference names, not deployed links.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
High availability and disaster recovery — Knowledge Check
Apply enterprise operations concepts to concrete local examples.
A mistaken deletion is replicated to the standby. What does this reveal?
Why fence the old writer?
A service must be restored within 30 minutes of a disruption. Which objective specifies that duration?
What establishes application recovery?