disaster recovery
**Disaster recovery (DR)** is the set of **policies, procedures, and tools** designed to restore an AI system to full operation after a major failure — such as data center outages, catastrophic data loss, security breaches, or natural disasters.
**Key DR Concepts**
- **RTO (Recovery Time Objective)**: Maximum acceptable time to restore service. RTO of 4 hours means the system must be back within 4 hours of a disaster.
- **RPO (Recovery Point Objective)**: Maximum acceptable data loss, measured in time. RPO of 1 hour means you can lose at most 1 hour of data.
- **Failover**: Automatically or manually switching to a backup system when the primary fails.
- **Failback**: Returning to the primary system once it's restored.
**DR Strategies (Cost vs. Recovery Speed)**
- **Backup & Restore**: Regularly backup data and configurations. On disaster, provision new infrastructure and restore from backups. **Cheapest but slowest** (RTO: hours to days).
- **Pilot Light**: Keep a minimal replica of the production environment running. On disaster, scale it up to full capacity. **Moderate cost and speed** (RTO: tens of minutes).
- **Warm Standby**: Run a scaled-down but fully functional replica. On disaster, scale up and redirect traffic. **Higher cost, faster recovery** (RTO: minutes).
- **Hot Standby / Active-Active**: Run full replicas in multiple regions simultaneously. On disaster, traffic shifts automatically. **Highest cost, fastest recovery** (RTO: seconds).
**DR for AI/ML Systems — Special Considerations**
- **Model Weights**: Large model files (tens to hundreds of GB) take significant time to download and load. Pre-stage weights in backup regions.
- **GPU Availability**: DR regions need GPU instances, which may have limited availability.
- **Model Registry**: Maintain a replicated model registry so the correct model version can be deployed in the backup region.
- **Vector Databases**: RAG systems need replicated vector stores — rebuilding indexes from scratch takes hours.
- **Training Checkpoints**: Store training checkpoints in durable, geo-replicated storage so training can resume from the last checkpoint.
**DR Testing**
- **Tabletop Exercises**: Walk through DR scenarios with the team without actually failing over.
- **Failover Drills**: Actually trigger failover to the DR environment and verify functionality.
- **Chaos Engineering**: Deliberately inject failures to verify resilience.
Disaster recovery is **insurance for your AI system** — the cost of not having it is orders of magnitude higher than the cost of maintaining it.