High availability & disaster recovery
RTO/RPO, multi-AZ vs multi-region, backup/restore testing, failover drills, pilot-light vs warm-standby vs active-active — and what each costs.
The mental model
You keep a spare tyre in the boot of your car. You do not keep a spare car in the driveway. Both protect you from a flat, but one costs a few thousand rupees and five minutes, and the other costs a second car.
That is the whole of high availability and disaster recovery. HA is the spare tyre: the failure is expected, frequent, small, and the recovery is automatic — a node dies, the load balancer stops sending it traffic, nobody files a ticket. DR is the spare car: the failure is rare, large, and recovery is a deliberate, practised procedure — an entire region goes dark, or someone drops the production database.
Two numbers turn this from philosophy into engineering:
- RTO — Recovery Time Objective. How long can you be down? "Four hours" means a plan that takes six hours fails the requirement.
- RPO — Recovery Point Objective. How much data can you lose? "15 minutes" means backups every 15 minutes at worst; "zero" means synchronous replication and a much larger bill.
The trap beginners fall into: quoting RTO/RPO without a price tag. Every executive says "zero and zero" until you show them the invoice. Your job is to present tiers with costs and let the business choose.
And the hardest truth in this topic: a backup you have never restored is not a backup. It is a hope stored on S3.
- Deep dive
- Internal architecture
- Real-world use cases
- Best practices
- Common mistakes
- Performance
- Security
- Production troubleshooting
- Advantages & disadvantages
- Alternatives
- Interview expectations
- Interview questions
- Facts to remember
- Cheat sheet
- Quick revision