This article, an excerpt from Sam Newman's "Building Resilient Distributed Systems," explores critical concepts in disaster recovery (DR) planning, including Recovery Point Objective (RPO) and Recovery Time Objective (RTO), and various DR patterns like backup-and-restore and pilot light. It also touches on unique resiliency challenges for AI-powered software, such as managing model provider reliability and handling inherent uncertainties through multi-model and multi-vendor strategies.
Read original on The Pragmatic EngineerDisaster Recovery (DR) involves strategies and procedures to recover from catastrophic failures that impact large parts of a system, such as cloud region outages, data center failures, or widespread infrastructure issues. Unlike localized service instance failures, DR addresses "widespread outages" that can render typical robustness measures ineffective. The core challenge in DR is balancing the trade-offs between desired recovery targets (minimal data loss and downtime) and the associated costs and complexities.
Defining clear objectives is crucial for any DR strategy. Two fundamental metrics guide this: Recovery Point Objective (RPO) and Recovery Time Objective (RTO).
Trade-offs in RPO and RTO
While a zero RPO and RTO are ideal, they are practically impossible to guarantee and prohibitively expensive to approach. System designers must engage with stakeholders to balance business needs, regulatory requirements, and the cost/complexity of achieving specific RPO/RTO targets. Different workloads within a single system may also have varying RPO/RTO requirements (e.g., critical payment processing vs. new user sign-up).
Various architectural patterns can be employed to achieve different RPO and RTO targets. These patterns often build upon each other in terms of complexity and cost, offering a roadmap for incremental DR improvement. All patterns typically require cross-site data replication and traffic rerouting capabilities.
| Pattern | Description | RPO/RTO Characteristics | Key Requirements |
|---|
This is the most basic DR pattern. Data is periodically backed up to an offsite location. In a disaster, new infrastructure is provisioned at a failover site, data is restored from backups, and traffic is rerouted. Automation of infrastructure provisioning is critical for reducing RTO and minimizing errors. Reusing infrastructure-as-code (e.g., Terraform scripts) across primary and failover sites is highly beneficial.