# Capacity Planning, High Availability and Disaster Recovery

> Design for failure with redundancy, load testing, capacity forecasts and recovery plans measured in RPO and RTO. Free notes, key concepts, resources and a mini...

Canonical: https://www.internhack.in/roadmaps/tracks/devops/reliability-capacity
Last updated: 2026-11-28

Design for failure with redundancy, load testing, capacity forecasts and recovery plans measured in RPO and RTO.

Advanced · about 5 hours · difficulty 4/5

Learn first: [SLIs, SLOs and Error Budgets](https://www.internhack.in/roadmaps/tracks/devops/slo-error-budgets), [Cloud Networking and Storage Design](https://www.internhack.in/roadmaps/tracks/devops/cloud-networking-storage)

Reliability is designed in, not added after an outage. This topic covers the planning side of SRE.

### High availability patterns

- Remove **single points of failure**: at least two of everything across zones, with health-checked load balancing.
- **Graceful degradation**: serve cached or partial results when a dependency fails.
- **Timeouts, retries with backoff and jitter, circuit breakers** so one slow dependency does not cascade.
- **Bulkheads** and rate limits to isolate noisy tenants.

### Capacity planning

- Know your **headroom**: how much traffic you can take before latency or errors climb.
- **Load test** with tools like k6, Locust or JMeter against realistic traffic shapes, and find the first bottleneck.
- Forecast from growth trends and planned launches; account for zone failure (N+1 capacity).
- Autoscaling helps but has limits: warm-up time, quotas, database connections.

### Disaster recovery

- **RPO** (recovery point objective): how much data you can afford to lose.
- **RTO** (recovery time objective): how long you can be down.
- Strategies from cheapest to fastest: **backup and restore**, **pilot light**, **warm standby**, **multi-site active-active**.
- Keep backups in another region and account, and codify the rebuild in IaC.
- **Test the plan**: game days and restore drills. An untested DR plan is a hope, not a plan.

**Good enough to move on:** you can load test a service to find its limit, name its single points of failure, and write a DR plan with RPO, RTO and a strategy that matches them.

## Key concepts

- **Removing single points of failure**
- **Timeouts, retries and circuit breakers**
- **Graceful degradation**
- **Load testing with k6 or Locust**
- **Capacity forecasting and headroom**
- **RPO and RTO**
- **DR strategies: backup to active-active**
- **Game days and restore drills**

## Mini project

Load test your demo service with k6 to find its breaking point, document the bottleneck and fix it, then write a DR plan with RPO and RTO and rehearse restoring it in a second region from backups.

## Check yourself

A business says it can lose at most 5 minutes of data and be down at most 1 hour. Which DR strategy fits, and what does it cost compared with backup and restore?

## Free resources

- [Addressing Cascading Failures (SRE Book)](https://sre.google/sre-book/addressing-cascading-failures/) (Google SRE)
- [Grafana k6 documentation](https://grafana.com/docs/k6/latest/) (Grafana Labs)
- [AWS disaster recovery whitepaper](https://docs.aws.amazon.com/whitepapers/latest/disaster-recovery-workloads-on-aws/disaster-recovery-workloads-on-aws.html) (AWS)

Previous: [Blameless Postmortems](https://www.internhack.in/roadmaps/tracks/devops/postmortems) · Next: [Chaos Engineering](https://www.internhack.in/roadmaps/tracks/devops/chaos-engineering)

## More in Site Reliability Engineering Practice

- [Incident Response and On-Call](https://www.internhack.in/roadmaps/tracks/devops/incident-response)
- [Blameless Postmortems](https://www.internhack.in/roadmaps/tracks/devops/postmortems)
- [Capacity Planning, High Availability and Disaster Recovery](https://www.internhack.in/roadmaps/tracks/devops/reliability-capacity)
- [Chaos Engineering](https://www.internhack.in/roadmaps/tracks/devops/chaos-engineering)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [DevOps Engineer Roadmap](https://www.internhack.in/roadmaps/tracks/devops)
