Skip to content
Tech Interview Prep
Technical interview guide

High Availability & Disaster Recovery

Designing for component failure as the expected case, and the RTO/RPO trade-off that shapes disaster-recovery strategy.

Minutes to read
3
Practice MCQs
25
Interview Q&A
25
Edition
v7
Editorial status
Reviewed

Scope: AWS Well-Architected reliability and DR guidance, Google Cloud DR architecture, and Azure reliability guidance accessed 2026-08-30..

Overview

Curated: · Written: · Reviewed:

High Availability & Disaster Recovery

In one line

HA keeps a business function running through the component failures the design expects. DR restores it after a disruption the design did not absorb. Fix RTO and RPO per declared scenario first, because they decide which replication, backup and failover pattern you need.

Key definitions

  • RTO: maximum acceptable time from disruption to restored service, measured against a stated definition of 'restored' (serving, or serving normally).
  • RPO: maximum acceptable gap between the last recoverable write and the disruption.
  • Failure domain: the scope one fault takes down together: host, zone, region, account, identity provider, DNS control plane, deployment wave.
  • Fencing: rejecting writes from a stale leader, usually by a monotonic token that the storage layer checks.
  • Split brain: two nodes accepting writes as primary at the same time.
  • Correlated failure: redundant copies that fail together because they share a domain or dependency.

Formulas and complexity

Availability=uptimetotal time\text{Availability}=\frac{\text{uptime}}{\text{total time}}

Quote downtime budgets on one basis only. 99.9% is about 8h 46m per 365-day year, or 43m 12s per 30-day month. The two bases do not reconcile.

90,000 rps3−1=45,000 rps per surviving zone\frac{90{,}000\ \text{rps}}{3-1}=45{,}000\ \text{rps per surviving zone}

Sizing for one zone loss in a three-zone service: each survivor must carry peak divided by two. At 1,000 rps per instance, that is 45 instances per zone.

How it works

  • Spread stateless capacity across zones, sized so the survivors carry peak without the lost zone.
  • Synchronous replication bounds acknowledged-write loss to zero but adds commit latency. Asynchronous replication adds lag, and that lag is the RPO.
  • Replicas copy deletes and corruption. Backups must be isolated, versioned and restore-tested.
  • Promotion needs fencing, a replication-position check against RPO, dependency health and capacity before traffic moves.
no yes Health signals per zone or region Corroborated failure? Keep serving and alert Fence the old writer Check replica position against RPO Check dependencies and capacity Promote and shift traffic

When to use and when not to

PatternUse whenAvoid when
Backup and restoreRTO and RPO in hours, low steady costRTO in minutes
Pilot lightData replicated, app tier created on declarationServing needed within minutes without scale-up
Warm standbyFull stack at reduced capacity, scale-up acceptableStandby capacity cannot be funded
Active/activeFast failover and conflict resolution designed inSingle-writer data with no conflict rule
Synchronous replicationRPO of zero, cross-site latency acceptableCommit latency budget is tight
Asynchronous cross-regionDistance matters, availability firstRPO near zero is required

Traps interviewers probe

  1. Starting the RTO clock at declaration or detection. Fix: start at disruption and report each step's timestamp, because the MCQ timeline runs from 09:00 onward.
  2. Treating HTTP 200 as availability. Fix: measure the business operation with correctness checks. Stale balances served with 200 still fail the function.
  3. Counting replicas in one zone as HA. Fix: place copies in independent zones and check shared power, network, control plane and deploy wave.
  4. Assuming synchronous replication meets the downtime target. Fix: state RPO and RTO separately. A scripted 45-minute failover misses a 30-minute downtime budget even with zero data loss.
  5. Promoting without fencing. Fix: take the lease through the quorum and let storage reject the old writer's lower token. A local promote command does not consult the quorum.

Interview tips

Open with: 'HA absorbs expected failures inside the design. DR recovers after the design is exceeded. I would fix RTO and RPO per scenario before choosing a pattern.'

Expect these follow-ups: how you prove the RPO (the replication lag at failover, measured); how you prevent split brain (leases, fencing tokens, quorum); what happens when the control plane is down (use data planes that are already running); how you fail back (reconcile, then shift traffic progressively).

30-second outline: define the failure scope; state RTO and where it is measured; state RPO and the replication mode that sets it; name the promotion gate (fence, check position, check dependencies); say how you test it and which numbers you record.

Feedback on this overview

Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.