Designing Resilient Architectures

Learn how to design cloud workloads that keep running when parts of them fail and recover when disaster strikes. Calculate availability and set recovery targets, spread compute and data across availability zones, and decouple components with queues, topics and events. Compare the four disaster recovery strategies against recovery time and recovery point objectives, design backups that survive deletion and ransomware, and prove it all with restore tests and failover drills. Examples use AWS, Microsoft Azure and Google Cloud.

IntermediateLesson 5 of 8 in Cloud Architecture and Administration Course

What you will learn

  1. Explain what makes a cloud workload resilient, find the weak points in a design and turn business needs into availability targets you can calculate and compare.
    • Explain high availability, fault tolerance and resilience
      Tell apart the main resilience terms, find single points of failure and use redundancy and fault isolation to limit what a failure can break.
    • Calculate availability and choose targets
      Express availability as a percentage and as allowed downtime, combine the availability of chained and redundant components, and estimate availability from failure and repair times.
  2. Use regions and availability zones to spread every tier of a workload, so that the loss of a server, a data center or a whole zone does not stop it.
    • Use regions, availability zones and fault boundaries
      Describe how cloud providers organize regions and zones, compare zonal, zone-redundant and global resources, and decide where to place a workload.
    • Build a multi-zone compute tier
      Run stateless servers or containers in several zones behind a load balancer with health checks, size them so a zone loss is absorbed, and replace failed parts automatically.
    • Keep data available across zones
      Choose replication, standby and storage options that keep databases, files and objects available when a zone fails, and know what each option does and does not protect.
  3. Replace fragile direct calls with queues, topics and events so that components can fail, slow down or scale on their own, and make every call safe to retry.
    • Decouple components with message queues
      Explain tight and loose coupling and use a queue to buffer work, absorb load spikes and survive consumer failures.
    • Design publish/subscribe and event-driven architectures
      Fan out events to several independent consumers with topics and event buses, choose between queues, topics, event buses and streams, and coordinate multi-step workflows.
    • Make calls safe under partial failure
      Use timeouts, retries with backoff and jitter, idempotency, circuit breakers, throttling and graceful degradation so that one failing dependency does not take down the whole system.
  4. Set recovery objectives from business impact, compare the four standard disaster recovery strategies, and design the replication and traffic failover that let a workload recover in another region.
    • Set recovery time and recovery point objectives
      Define RTO and RPO, derive them from a business impact analysis and see how they drive design and cost.
    • Compare the four disaster recovery strategies
      Describe backup and restore, pilot light, warm standby and multi-site active/active, including what runs in the recovery region, typical recovery times and relative cost.
    • Replicate data and fail over traffic between regions
      Design cross-region data replication and traffic routing, plan failover and failback, and avoid recovery steps that depend on services that may be impaired.
    • Choose and justify a disaster recovery design
      Match a workload's RTO, RPO, budget and constraints to the cheapest strategy that meets them, and justify the choice with numbers.
  5. Design backups that meet the recovery point objective and survive deletion and attacks, then prove with restore tests and failover drills that recovery works within the targets.
    • Design backup and restore
      Choose backup types, frequency, retention, location and protection so that data can be restored to the right point in time within the recovery targets.
    • Test restores and failover
      Plan and run restore tests, failover drills and game days, measure actual recovery times against RTO and RPO, and improve the design and runbooks from the results.

Designing Resilient Architectures study guide

5 chapters

1

Resilience requirements and availability

Cloud failures become business failures when a request loses a component it needs. Start by deciding what must remain usable, which disruptions the design should absorb, and how much interruption is acceptable. Availability calculations help compare designs, but their value depends on the failure boundaries and dependencies behind the numbers. The same review also separates live service from the survival and recovery of its data.

1.1 Resilience starts with the whole request path

A workload is the code and components that deliver a business function, such as checkout. Resilience is its ability to keep doing that job through failures and recover after disruption. Hardware faults are only one cause: software bugs, overload, mistakes, and loss of a data center matter too.

Availability, fault tolerance, and recovery
PropertyWhat it meansExample
High availabilityInterruptions are rare and briefA standby database takes over in one to two minutes
Fault toleranceA covered failure causes no interruption users noticeRunning spare capacity absorbs failure and interrupted requests are retried safely
Disaster recoveryThe workload is restored after a disruption its HA design cannot absorbRestore clean data after widespread corruption

Fault tolerance generally needs more running spare capacity and costs more. Six web servers across three zones may have enough capacity after losing two servers, yet requests on those servers can still fail. Safe, transparent retries are needed before calling that behavior fault tolerant. A backup is a point-in-time data copy used in recovery; a DR plan also needs infrastructure, access, decisions, and tested steps.

Find what can stop the workload

Trace a request from the user through DNS, networking, the load balancer, application, cache, and database. Ask at each step, "What happens if this fails?" A single point of failure, or SPOF, stops the workload when it fails. One database is obvious; a lone NAT gateway, VPN tunnel, expiring certificate, or recovery procedure known by only one person can be just as important.

Redundancy provides another component that can do the job. If peak demand needs N units, N+1 supplies one spare; N+2 supplies two. The second spare can cover two failures or a failure during maintenance. Check the capacity after failure, not just the number of copies.

Two copies can share a cause of failure. Servers on the same power feed may fail together, and the same bad configuration can break every zone. This is correlated failure. Fault isolation limits the blast radius: the set of resources a failure can affect. Separate hosts, zones, regions, and accounts provide different boundaries. Choose boundaries that separate the failures you need to survive.

Protect both access and data

Availability asks whether data or a service can be used now. Durability asks whether stored data survives without loss or corruption over time. Storage designed for eleven nines of durability can still be temporarily unreachable. A service that answers every request can still faithfully serve a mistaken deletion.

Cloud resilience is shared work. Providers maintain the data centers, hardware, and underlying network. Customers choose deployment across zones, replication, backups, capacity, recovery tests, and failure handling in code. A virtual machine and its attached disk usually occupy one zone. Managed object storage may spread copies automatically. Inspect each service's deployment model; the provider's resilient infrastructure does not remove a workload's SPOFs.

Key Takeaways

  • HA allows brief interruptions; fault tolerance hides the covered failure from users.
  • Trace the business request path to find single points of failure, including access and people.
  • Redundant copies need enough capacity and separate failure boundaries.
  • Availability, durability, and recoverability answer different questions.
  • The customer must configure and test resilience within the cloud.

1.2 Availability targets and calculations

An availability target needs a function and a measurement period. A shop with working pages but broken checkout is unavailable for ordering. Measure the agreed business outcome, using available time divided by total time, or successful requests divided by valid requests.

Turn a percentage into downtime

Write availability A as a fraction before calculating:

Allowed downtime=(1−A)×period

A 30-day month contains 43,200 minutes. At 99.95%, the unavailable fraction is 0.0005, so the budget is 21.6 minutes, or 21 minutes 36 seconds. At 99.9%, it is 43 minutes 12 seconds. Each extra nine divides the permitted downtime by ten.

AvailabilityAllowed downtime in a 365-day year
99%3 days 15 h 36 min
99.9%8 h 45 min 36 s
99.95%4 h 22 min 48 s
99.99%About 52 min 34 s
99.999%About 5 min 15 s

Count planned maintenance when users need the service during it. A high percentage can conceal a long outage if the period is not stated.

Combine dependencies

For serial dependencies, every component must work. Under an independent-failure model, multiply availability fractions:

Apath=A1A2A3

A load balancer at 99.99%, server at 99.9%, and database at 99.95% give 0.9999 × 0.999 × 0.9995 ≈ 0.99840, or 99.84%. Taking the average or just the weakest figure overstates this model's result.

For two independent redundant components, each able to carry the job, both must fail to stop service:

Apair=1−(1−A1)(1−A2)

Two 99% servers give 99.99%. Put that pair into the path with the same load balancer and database: 0.9999 × 0.9999 × 0.9995 ≈ 99.93%. The database now offers the largest unavailability to remove. Two 99.9% servers alone give 99.9999% under the same ideal model.

These calculations assume independent failures and instant failover. Shared DNS, shared identity, a faulty release, or a delay in switching reduce actual availability. Treat the result as an optimistic design estimate, then test the real request path.

Improve recovery and choose a useful target

When failure and recovery averages are known:

A≈MTBFMTBF+MTTR

MTBF is mean time between failures; MTTR is mean time to recover. With 1,000 hours and 2 hours, availability is about 99.80%, roughly 17.5 hours down per year. Reducing recovery to 0.5 hours gives about 99.95%. Automatic detection and recovery can be cheaper than trying to eliminate every failure.

Choose targets from business impact. More nines require more capacity, automation, testing, and change discipline. A provider SLA is a contract, often backed by service credits, not a promise that failure cannot happen. Check all hard dependencies before promising a stronger workload target. Measure successful business transactions, errors, and response times; distributed tracing follows requests through dependencies to locate the failing part.

Key Takeaways

  • Always state the business function and the period for an availability target.
  • Downtime equals the unavailable fraction multiplied by the period.
  • Multiply serial availability fractions; redundant pairs fail only when both copies fail.
  • Independence and instant switching are idealizations, so verify the complete design.
  • Reducing MTTR can improve availability without increasing MTBF.
  • An SLA offers contractual remedies; business outcome measurements show actual service.
2

Design across availability zones

A multi-zone design has to spread more than web servers. Routing, user sessions, spare compute capacity, databases, caches, and storage all affect what happens when a location disappears. Placement gives copies separate failure boundaries; health checks and failover decide which copies serve requests. The design must also preserve enough working capacity while failed resources are being replaced.

2.1 Place resources across failure boundaries

Placement decides which failures redundant copies share. A region is a geographic area containing data centers. An availability zone is one or more separate data centers within a region, with independent power, cooling, and networking. Zones connect over fast links, making them useful partners for synchronous replication.

Scope does not tell you redundancy
Resource scope or placementMeaningResilience check
ZonalLocated in one zoneDeploy a copy elsewhere for zone loss
RegionalBelongs to one regionCheck whether it actually spans zones
Zone-redundantCopies span zones within a regionCheck remaining capacity and failover behavior
GlobalService spans regionsCheck its back ends and data placement too

An Amazon EC2 instance and an EBS volume are zonal. S3 Standard, Azure zone-redundant storage (ZRS), and Amazon SQS spread data across zones. DNS and global front doors, such as Azure Front Door and Google's global external Application Load Balancer, can route across regions. A regional label alone promises no zone resilience: Azure can place a nonzonal regional resource without protection from zone loss.

Choose the right distance

Zones balance separation with short network delay. AWS places zones up to about 100 km apart; Azure aims for interzone round-trip latency below about 2 ms. Regions offering zones usually have at least three, although some Azure regions have none. Nearby zones support synchronous writes; replication between more distant regions is usually asynchronous so that each write does not wait for a long round trip.

Start with a primary region that meets user latency, data residency, compliance, service availability, and price requirements. Spread production across at least two zones, preferably three. Three zones reduce the spare capacity needed to survive one zone loss. Add another region when disaster recovery targets, required geographic separation, or global user latency justify it. Verify that the second region is permitted to hold the data.

Multi-zone deployment keeps its regional copies in one region. It handles a zone failure, but a regional outage can affect every copy. A bad release or deletion can also cross all zones through normal deployment or replication. Protected backup history and regional DR address different hazards from zone separation.

Provider details that affect placement

An Azure availability set separates virtual machines across fault domains, such as racks and power supplies, and update domains, which receive maintenance at different times. It protects against local hardware and maintenance failures within a data center. Zone deployment protects against a larger location failure. Virtual Machine Scale Sets can span zones.

Some Azure regions have a paired region in the same geography. Geo-redundant storage can use that pair; planned updates are staggered, and one region in each pair receives recovery priority during a broad outage. Many newer regions are unpaired. Pairing does not deploy your application or fail it over for you.

Logical zone names also need care. AWS can map a name such as us-east-1a to different physical zones in different accounts; zone IDs identify the same physical location across accounts. Azure logical zones map to physical zones per subscription. Compare physical mappings when coordinating placement across accounts or subscriptions.

Key Takeaways

  • Check redundancy separately from zonal, regional, or global scope.
  • Use zones for nearby fault isolation and regions for larger geographic separation.
  • Region selection must satisfy latency, data location, service, and price needs.
  • Availability sets and region pairs do not replace multi-zone deployment or a DR plan.

2.2 Keep compute serving after a zone fails

A resilient compute tier combines healthy traffic routing, replaceable instances, and capacity already available outside the failed zone. The usual path is a multi-zone load balancer, a group of instances spread across zones, and a separately resilient data tier.

Route to healthy instances

An AWS Auto Scaling group, Azure Virtual Machine Scale Set, or Google Cloud regional managed instance group maintains instances across zones and replaces unhealthy ones. The load balancer probes each target, for example at /health every 10 seconds. Consecutive failure and success thresholds determine when a target leaves or rejoins routing.

A shallow health check tests whether the process responds. A deep check also tests dependencies. If a shared database fails, a deep check can mark every otherwise working application instance unhealthy. Some load balancers, including AWS's Application Load Balancer, fail open when all targets are unhealthy and send traffic to them all. Use routing checks suited to the instance's own health, with separate monitoring for shared dependencies.

Make any instance able to serve the user

A stateless instance holds no unique user state between requests. Put sessions in a shared store or a signed client-held token. After a failure, another instance can continue the session. Sticky sessions only keep a user routed to one instance; they do not copy its memory. If that instance alone holds the session, losing it loses the session.

Size surviving zones before the outage

Static stability means the workload survives without launching or changing resources during the failure. If peak demand needs N instances and you use Z equal-sized zones, each zone needs:

Instances per zone=NZ−1

Round up when the result is not a whole number. Peak load needing 6 instances requires 3 per zone across 3 zones: 9 total. Losing one leaves 6. Two zones need 6 each, or 12 total; four need 2 each, or 8 total. More zones reduce spare capacity for this one-zone-loss requirement.

Automatic scaling can restore headroom later. Depending on it for immediate survival is risky when the remaining zones have limited spare capacity or the provider's management systems are impaired. Check regional quotas in advance, including vCPU limits for the chosen instance family and quotas in recovery regions.

Replace and remove instances safely

With immutable infrastructure, build a new machine or container image for each change and replace instances. This limits configuration drift and makes rollback a deployment of the earlier image. Infrastructure as code supplies the reproducible environment. Avoid changing individual instances by hand, which makes their behavior diverge.

During scale-in or replacement, connection draining stops new requests and gives existing ones a bounded time to finish. AWS calls this a deregistration delay. It prevents routine removals from cutting off work in progress.

Older applications still benefit from automatic restart, recovery, backups, managed multi-zone databases, and a database proxy. Run multiple copies behind a load balancer when the application supports it. Managed compute also needs inspection: Lambda and Cloud Run distribute execution across zones, while some Azure Functions and App Service plans require zone redundancy to be enabled.

Key Takeaways

  • Health checks control routing; replacement groups restore the intended instance count.
  • Shared sessions or client-held tokens let surviving instances continue user sessions.
  • Provision N ÷ (Z − 1) instances per zone, rounded up, for equal-sized one-zone-loss capacity.
  • Immutable images make replacement and rollback repeatable.
  • Connection draining protects requests during planned removal.
  • Check quotas and the zone behavior of managed services before relying on them.

2.3 Keep the data tier available

A web tier can survive a zone failure while its database or cache stops the workload. Trace where each kind of state lives, how it is copied, and what the application must do when the active copy changes.

Replication controls confirmed-write loss
Copy methodWhen a write is confirmedEffect at failover
SynchronousAfter the primary and replica store itConfirmed writes survive loss of the primary
AsynchronousAfter the primary stores itRecent confirmed writes may be missing from the replica

The delay behind the primary is replication lag. Synchronous replication adds a round trip to writes and suits nearby zones. Asynchronous replication is usual across regions, where waiting for every write would add more delay.

A multi-zone database maintains a standby in another zone. RDS Multi-AZ DB instances, zone-redundant Azure SQL Database, and Cloud SQL HA provide this pattern. On failure, the service promotes a standby and updates the endpoint. RDS Multi-AZ failover commonly takes one to two minutes; its single standby does not serve reads.

Many read replicas instead provide asynchronous read scaling and need manual promotion. They can support DR, but do not imply automatic lossless failover. Aurora differs: readers share cluster storage, generally lag well under 100 ms, and can be promoted automatically. Inspect the engine and deployment type.

Applications need to reconnect after dropped connections, retry transactions only when safe, and respect the database DNS TTL. A database proxy or pooler can reduce connection disruption. A resilient endpoint name does not make existing connections immune to failure.

Match storage to the failure boundary

S3 Standard, Azure ZRS, and Google Cloud regional buckets distribute object data across zones. S3 One Zone-IA and Azure LRS keep copies within one zone or data center, so location loss can remove access or destroy data. Use single-location storage for data that can be recreated.

Block disks such as EBS are normally zonal. EBS snapshots are regional recovery points that can create a volume in another zone; a snapshot is not an already running replacement disk. Regional file services, such as EFS Standard, Azure Files with ZRS, and Filestore's regional tier, offer file redundancy across zones. DynamoDB spreads tables across zones automatically; other NoSQL services may need an explicit setting.

Follow the failure through a shop

A shop has 9 web instances, 3 in each of 3 zones, with a peak need of 6. It uses a multi-zone load balancer, an RDS Multi-AZ database, a cache replica in another zone, and S3 Standard images. Losing the zone with the database primary leaves 6 web instances. Database writes pause during promotion, the application reconnects and retries safely, the cache replica takes over, and object storage continues serving. This is HA with a short write interruption.

A cache is also a capacity dependency. If every request suddenly misses the cache, the database may overload. Add cross-zone cache replicas and automatic failover, and limit request rates while a cold cache refills.

Replication does not supply protected history. A dropped table or bad update can reach every database copy. Object deletion behavior varies by service and settings: S3 does not replicate permanent deletion of a specific version, and delete-marker replication is optional. Keep separate point-in-time backups for recovery before damage.

Key Takeaways

  • Synchronous copies protect confirmed writes; asynchronous copies can lose data up to their lag.
  • A read replica and an HA standby can have different promotion and read behavior.
  • Applications must reconnect and handle interrupted transactions safely.
  • Check the zone scope of object, block, file, and cache storage.
  • Plan for the database load caused by a cold cache.
  • Replication supports availability; protected backups supply recovery history.
3

Independent services and safe calls

A slow downstream service can hold up every caller that waits for it. Queues and events let components accept work independently, while timeouts and isolation limit the damage from calls that still need an immediate response. Asynchronous work brings its own design questions: who receives each message, how duplicates are handled, how long work may wait, and how users learn whether processing has finished.

3.1 Buffer work with durable queues

A direct call makes the caller wait for the receiver. If the receiver is slow or unavailable, that failure can spread back through the calling services. A message queue inserts a durable buffer so producers can submit work and consumers can process it later.

Separate acceptance from completion

The queue acknowledges that it stored a message. It does not say the business work has finished. An order screen can show "Order received; processing is underway." A password check or a price needed immediately still calls for a synchronous response with timeouts and redundant targets.

SQS, Azure Queue Storage, Azure Service Bus queues, and RabbitMQ are queue examples; a Google Pub/Sub pull subscription can play this role. Queues retain work while consumers fail, absorb arrival spikes, allow consumer scaling independent of producers, and support retries without resending from the producer.

Calculate backlog and useful capacity

Orders arrive at 600 per minute for 10 minutes while consumers complete 200 per minute. The queue grows by 400 per minute, reaching 4,000 messages. Arrivals then drop to 100 per minute. Consumers now clear only 100 waiting messages per minute after handling new arrivals, so the backlog takes 40 minutes to drain.

For scaling, use backlog per instance. If an instance processes 10 messages per second and acceptable waiting time is 30 seconds, it can have 300 messages waiting. A backlog of 4,500 needs 15 instances. CPU alone may not reveal waiting work, especially when processing waits on an external service.

Receive, process, and acknowledge safely

In SQS, receiving hides a message for its visibility timeout; it does not delete it. Delete only after successful processing. If a consumer crashes, the message becomes visible again and another consumer can retry. The default timeout is 30 seconds and the maximum is 12 hours. Set it above normal processing time or extend it during longer work. Otherwise another worker can receive the message while the first still processes it.

Most queue designs offer at-least-once delivery. Standard SQS can duplicate and reorder messages. FIFO queues preserve order within a message group; SQS FIFO deduplicates sends within a five-minute interval. FIFO has different throughput limits, and it does not remove the need for idempotent business handling after failures.

Keep failures and large payloads manageable

A dead-letter queue, or DLQ, collects messages that exceed a retry count. SQS uses maxReceiveCount. Choose enough attempts to survive brief failures, often 3 to 5, and alarm on DLQ arrivals. Fix the cause before redriving messages. A poison message that can never succeed should not consume workers forever. Standard SQS messages retain their original enqueue time in the DLQ, so its retention should be longer than the source queue's.

Retention limits how long work can wait. SQS keeps messages for 4 days by default, up to 14 days. Capacity must clear work within that window. Its message size limit is 1 MiB; the claim-check pattern stores a larger payload in object storage and queues a reference. Keep that referenced object available until processing and retries have finished.

Key Takeaways

  • A queue confirms durable acceptance; business completion happens later.
  • Backlog grows by arrivals minus completions and drains only by surplus processing capacity.
  • Scale on backlog per instance and acceptable waiting time.
  • Visibility hides work temporarily; successful processing must be followed by deletion.
  • Use idempotent handlers, bounded retries, and a DLQ for poison messages.
  • Retention and payload limits remain constraints on a buffered design.

3.2 Send events to independent consumers

Some work needs one worker; other work needs several services to react independently. Publish/subscribe lets a publisher send a message to a topic, and each subscription receives its own copy. The publisher does not need to know the subscribers, so another consumer can be added without changing it.

Pick the right message model

An event records a fact that happened, such as "OrderPlaced". A command asks a receiver to act, such as "ChargeCard". Event-driven services react to facts. Keep that distinction clear: announcing an event does not prove that every downstream action succeeded.

PatternMain behaviorUseful purpose
QueueWorkers compete for work; successful work is deletedDistribute tasks
Topic or event busSubscribers receive notifications; rules can select targetsTrigger independent reactions
StreamConsumers retain separate reading positions in a retained logReplay high-volume ordered records

Amazon SNS, Google Pub/Sub, Azure Service Bus topics, and Event Grid support pub/sub patterns. EventBridge and Event Grid route events by content rules. A router can send only high-value orders to an extra review service. EventBridge can archive and replay events to help repaired consumers catch up.

Give each subscriber its own buffer

In fan-out, a topic feeds one queue per consumer. An "OrderPlaced" event can reach separate payment, inventory, email, and analytics queues. If email is down for 2 hours, its queue grows while the others continue. Each service gets its own retry settings and DLQ. Several workers on one shared queue would divide the messages, so they would not each receive every order.

A push subscriber without a durable buffer depends on the topic's delivery retries and any subscription DLQ. Once retries are exhausted, delivery can be lost. Independent queues make waiting work and recovery visible.

A stream, such as Kafka, Kinesis, or Event Hubs, retains records and lets consumers reread them. Ordering belongs to a partition or shard, not automatically to the entire stream. Consumers can process the same history at different speeds.

Coordinate a business process

With choreography, services react to each other's events without a central controller. This is loosely coupled, but following the whole process is harder. With orchestration, Step Functions, Durable Functions, or Cloud Workflows controls the steps, retries, timeouts, and error paths. A failed shipping step may trigger a compensating refund. Orchestration helps when progress and failure handling must be explicit.

An API gateway supplies a front door for routing, authentication, caching, and throttling. Excess traffic can receive HTTP 429. An API that queues work can return HTTP 202 Accepted and expose later status; it must not imply completion.

Independent microservices own their data and scale separately. Their views may be eventually consistent: inventory can update after the order is accepted. Pass a correlation ID through messages and traces to follow the process. Monitor queue depth, oldest-message age, and DLQ arrivals, because decoupling often changes an immediate error into delayed work.

Key Takeaways

  • Events announce facts; commands request actions.
  • Fan-out needs a separate subscription or queue for each independent consumer.
  • Streams support retained replay with ordering within partitions.
  • Orchestration makes workflow progress and error paths explicit.
  • Asynchronous services need useful status, correlation IDs, and backlog monitoring.

3.3 Handle slow calls and repeated work safely

Distributed systems experience partial failure: one dependency can fail while the rest keeps running. A slow service can exhaust callers' threads and connections as they wait. Bound the time and resources each dependency can consume, and decide which operations can safely be repeated.

Stop waiting and retry selectively

A timeout sets the longest wait for a remote response. Choose it using normal slow responses, such as the dependency's 99th percentile, with a little margin. Too short creates unnecessary retries; too long holds resources during an outage.

Retry transient failures such as brief network errors, throttling, and failover. A malformed request or permission error, such as HTTP 400 or 403, needs correction. Retrying it unchanged adds load without fixing the cause. Put retries at one layer: if three layers each make 4 attempts, one user action can cause 64 calls to the lowest service.

Exponential backoff increases waits, with a cap:

Wait before retry n=min⁡(cap,base×2n−1)

Starting at 200 ms, five waits are 200, 400, 800, 1,600, and 3,200 ms: 6,200 ms total. A 1,000 ms cap changes the last two to 1,000 ms, giving 3,400 ms total. Jitter randomizes each wait so clients do not all return together. Bound the attempt count or total elapsed time as well.

Make an uncertain outcome safe to repeat

A timeout does not tell you whether the receiver finished. Idempotency means repeating an operation has the same effect as doing it once. "Set order 42 to shipped" is idempotent; "add ten dollars" is not. A payment request can include an idempotency key that the server records with the result. A repeat with the same key returns that result instead of charging again. This also protects work delivered more than once by a queue. For a database task, commit its update and completion record in one transaction so a crash cannot leave only one committed.

Limit the spread of trouble

A circuit breaker stops contacting a failing dependency after a threshold. It opens during a cool-down, becomes half-open to try a few calls, and closes when recovery is demonstrated. Unlike a timeout, an open breaker rejects immediately without another dependency call.

Bulkheads isolate resource pools: reporting gets its own connections so it cannot consume checkout's. Throttling limits arrival rate, often returning HTTP 429 or 503; clients back off. Load shedding discards lower-priority work under overload. These controls protect capacity while the dependency recovers.

Graceful degradation keeps the core task usable when a noncritical feature fails. Hide recommendations, delay email, or serve cached content. A CDN can reduce origin load and serve stale content when configured to do so.

For checkout, use a 2-second payment timeout, 2 jittered retries, and the order ID as the idempotency key. Recommendations can use 300 ms, no retries, and a hidden-section fallback. After 5 consecutive payment failures, the breaker opens and checkout asks the customer to try again shortly. Payment remains a required function, so the application must not claim that an unpaid order is complete. More retries during overload can prolong an outage; bounded attempts and isolation keep recovery possible.

Key Takeaways

  • Every remote call needs a timeout and a decision about retry safety.
  • Retry transient errors at one layer with bounded backoff and jitter.
  • An idempotency key prevents repeated execution of one business action.
  • Circuit breakers stop calls; bulkheads stop resource exhaustion from spreading.
  • Throttling, load shedding, and useful fallbacks protect core functions.
4

Plan recovery across regions

A regional disaster can remove both working resources and the systems used to manage them. Recovery planning connects the business limits on outage and data loss to the amount of infrastructure kept ready elsewhere. Data replication, safe promotion, traffic routing, and dependency readiness each affect the result. Comparing full drill times and total cost makes the strategy choice concrete.

4.1 Set the outage and data-loss limits

Recovery has two separate business limits. The recovery time objective (RTO) is the longest acceptable interruption before service is restored. The recovery point objective (RPO) is the longest acceptable gap between the recovered data point and the interruption. RPO measures lost data in time, not the duration of the restore.

Read a recovery timeline

The last good backup is at 02:00, failure occurs at 04:15, and service returns at 07:45. The recovered data trails the failure by 2 hours 15 minutes. The outage lasts 3 hours 30 minutes. Against an RPO of 1 hour and an RTO of 4 hours, the data-loss target is missed while the restoration target is met.

Frequent copies or low replication lag improve RPO. Detection, decisions, infrastructure readiness, restore speed, checks, and traffic changes affect RTO. One can be good while the other is poor. Synchronous copies can preserve confirmed data even if starting the recovery environment takes hours. A quickly restarted stateless site can still depend on a nightly data export.

Count every recovery phase

For sequential steps, add the time from interruption through verified service. A worked recovery uses:

PhaseTime
Detect failure10 min
Decide to recover20 min
Restore database100 min
Deploy application25 min
Check the workload15 min
Switch DNS5 min

The total is 175 minutes, or 2 hours 55 minutes, leaving 1 hour 5 minutes against a 4-hour RTO. The database restore itself copies 1.5 TB at 250 MB/s: 1,500,000 MB divided by 250 MB/s is 6,000 seconds, or 100 minutes. Reporting only that restore time would omit 75 minutes of actual interruption.

Choose targets from impact

A business impact analysis examines how interruption harms each workload over time: revenue, penalties, obligations, reputation, and safety. Timing matters; payroll can be most critical near payday. Risk assessment adds the likelihood of different disasters. Business owners set the targets using that impact; architects determine how to achieve them.

Group workloads into recovery tiers. Checkout might require RTO 15 minutes and RPO 1 minute, planning 4 hours and 1 hour, and reporting 24 hours for both. A shared identity service needed by checkout must recover within checkout's requirements. Giving a dependency a slower tier prevents the higher-tier workload from recovering.

Lower objectives require more running capacity, replication, automation, and testing. A cheaper strategy can be appropriate when the avoided loss does not justify the extra cost and no requirement mandates it.

Availability summarizes a period; recovery objectives apply to an incident. An 8-hour regional outage nearly consumes the annual downtime allowed by 99.9% availability. Also consider delayed discovery: if corruption began days earlier, a current replica may already contain it. Retention and fine-grained recovery points determine whether a clean pre-damage state still exists.

Key Takeaways

  • RTO limits interruption; RPO limits the age of the recovered data at failure.
  • Measure recovery from interruption through verified service, including decisions.
  • Business impact sets targets; shared dependencies must support their strictest dependents.
  • Availability budgets and per-incident recovery objectives measure different things.
  • Corruption recovery needs retained clean history from before the damage.

4.2 Choose how much recovery capacity stays ready

Disaster recovery strategies differ in what is already present in the recovery region. More readiness usually means faster restoration and higher running cost. Keep the data-copy method separate from compute readiness: both RPO and RTO must be achievable.

Compare the four strategies
StrategyAlready presentWork after disasterTypical recovery
Backup and restoreProtected data copiesRebuild, restore, start, and routeHours or longer
Pilot lightReplicated data and core infrastructureStart or deploy application, scale, promote, and routeTens of minutes
Warm standbyA small complete working stackScale, promote, and routeMinutes
Multi-site active/activeFull workloads serving in several regionsMove traffic and absorb the lost region's loadNear zero

These ranges describe common designs. A measured end-to-end drill determines whether your workload meets its target.

Backup and restore

Copy backups to another region, preferably another account too. After failure, recreate infrastructure from templates, restore the data, start the application, and redirect users. Costs mainly come from backup storage, so this is the lowest-cost strategy. The backup interval commonly gives an RPO of hours; continuous backup can reduce it to minutes. Large data sets can make restoration take longer than the RTO even when the data is recent enough.

Protected historical copies also recover from deletion and corruption. Every faster strategy still needs that capability.

Pilot light and warm standby

A pilot light continuously copies data and keeps essentials such as networking ready. Application servers are stopped or not deployed, with images and templates prepared. It cannot serve requests until those components start. Replication lag often gives an RPO of seconds to minutes, while application deployment and scaling contribute to the RTO.

A warm standby runs a complete but reduced-capacity stack. It can serve some traffic immediately and can be tested while running. Scaling it to full load, promoting data, and routing users still take time. It costs more than pilot light because more components are already running.

A hot standby is an active/passive variant with full spare capacity. The first three main strategies are also active/passive: only the primary normally serves users. Cloud teams may use cold, warm, and hot labels differently, so inspect the actual readiness behind the name. Azure Site Recovery and AWS Elastic Disaster Recovery replicate servers and create or launch recovery machines at failover, providing pilot-light-style readiness.

Multi-site active/active

Several regions serve users at once, routed by latency, geography, or weights. Surviving regions need enough capacity for all traffic. RTO can approach zero; RPO for region loss depends on the replication design and can be near zero or seconds. Concurrent writes add difficult consistency and conflict decisions, making this the most complex and costly option.

A fast regional replica can also receive a bad update or encrypted data. Backups remain necessary for a clean historical state. A same-region backup cannot cover losing that region; a backup controlled by the same compromised credentials can be deleted with production. Geographic and account separation address those distinct failures.

Key Takeaways

  • Backup and restore rebuilds from protected copies and usually has the slowest recovery.
  • Pilot light must start missing components; warm standby already runs the complete stack at small scale.
  • Active/active serves from several regions and needs surviving capacity and a write strategy.
  • Use measured drills to judge targets; strategy names supply only rough ranges.
  • Every strategy needs backups protected from the disasters it covers.

4.3 Move data and traffic between regions safely

Regional failover needs a usable data copy, a safe choice of writer, and a path for users to reach it. Switching a hostname alone cannot recover a database, prevent conflicting writes, or make missing credentials available.

Decide how writes work

Cross-region replication is usually asynchronous. Recent writes can be lost when the primary fails, so replication lag is a useful RPO estimate for that event. Examples include S3 Cross-Region Replication, Azure SQL failover groups, and Cloud SQL cross-region replicas. Aurora Global Database typically copies in under a second and can promote a secondary region in under a minute; complete workload recovery still includes other steps.

Write modelWhere writes goMain design issue
Write globalOne primary regionSafe promotion of a new writer
Write localAny active regionReconcile concurrent updates
Write partitionedA designated home region per recordRoute each record's writes to its owner

For example, last-writer-wins conflict resolution in an eventually consistent DynamoDB global-table design can discard one concurrent update. Data ownership or conflict-tolerant operations reduce that risk. A split-brain occurs when two sites both act as primary. Fencing prevents the old primary from accepting writes before a replacement is promoted.

Route users to the working region

DNS failover changes health-based answers to the secondary endpoint. With checks every 30 seconds and 3 required failures, detection takes about 90 seconds. A 60-second TTL adds up to about 60 seconds of cached old answers, giving an approximate 150-second switch for most clients. Some clients cache longer. TTL is not the total failover time.

Global load balancing or anycast, such as Global Accelerator, Azure Front Door, or Google's global external Application Load Balancer, routes a stable front door to healthy regions without waiting for endpoint DNS changes. A CDN can also retry eligible requests at a secondary origin. CloudFront origin failover supports GET, HEAD, and OPTIONS; it does not supply POST or PUT write failover.

Prepare the recovery path

The data plane serves running traffic, queries, and data. The control plane creates and changes resources. Regional failure can impair management operations, so pre-provision capacity and routing where possible. Health-driven routing over existing infrastructure has fewer disaster-time dependencies than creating an environment after the outage starts.

Copy images, templates, certificates, secrets, and usable encryption keys. Prepare access roles, region-specific endpoints, DNS records, and quotas for full load. A recovery plan that needs a key or deployment system in the failed region still depends on that region.

Automatic failover is fast, but a false trigger can lose data up to the replication lag. Many teams automate zone switching and require a human regional decision followed by automated execution. Define declaration criteria and authority before the event.

Return without losing new data

Failback is another migration. The old primary is now stale. Copy back changes made while the recovery region was active, test the original environment, and switch during a quiet period. Reopening the original writer before synchronization can discard or conflict with the work completed during recovery.

Key Takeaways

  • Regional RPO depends on the data-copy behavior, not the traffic router.
  • Choose a write model and fence the old writer before promotion.
  • DNS switching includes detection and caching delays.
  • Pre-provisioned data-plane routing reduces reliance on disaster-time management changes.
  • Prepare keys, permissions, images, quotas, and dependencies in the recovery region.
  • Failback requires copying new changes back before restoring the original writer.

4.4 Match the recovery design to the requirements

Start a DR decision with the failure scenarios and business objectives. A strategy is useful only if it restores the complete workload within the RTO and preserves enough data for the RPO. The most expensive strategy can add complexity without solving the actual recovery problem.

Screen designs before comparing costs
  1. State the RTO, RPO, and disasters to cover: zone loss, region loss, corruption, and account compromise.
  2. Remove strategies that miss either target, using complete drill results where available.
  3. Compare total cost among those that remain, including operations and testing.
  4. Check data residency, required controls, dependencies, access, and capacity.
  5. Document and test the chosen design.

Multi-zone HA usually handles zone loss. A second region earns its cost when regional recovery requirements call for it. Corruption and stolen credentials need protected copies, even when regional capacity is excellent.

Work through two choices

An internal wiki has RTO and RPO of 24 hours. Nightly backups copied to another region lose at most almost 24 hours, and a restore drill takes 4 hours. Backup and restore meets the targets at the lowest cost.

An order system instead requires RTO 1 hour and RPO 5 minutes. Hourly backups miss the RPO, and a 3-hour restore drill misses the RTO. Pilot light has less than a minute of replication lag. Its drill takes:

PhaseTime
Detection and decision5 + 5 min
Deploy and scale servers20 + 10 min
Promote database3 min
DNS switch and final checks5 + 2 min

That totals 50 minutes, leaving 10 minutes. Warm standby completes in 20 minutes. Pilot light is the cheapest qualifying option, but widely varying drill times may make that margin unreliable. The measured distribution of recovery times matters alongside a single successful run.

Put faster recovery in cost terms

Suppose interruption costs 20,000 US dollars per hour. Warm standby costs 4,000 dollars more per month and saves 30 minutes per regional incident. It avoids 10,000 dollars per event but costs 48,000 dollars more each year. On cost alone, it pays off only above 4.8 regional disasters per year. A stricter RTO or mandatory control can justify it even when this simple financial comparison does not.

The cost calculation applies to qualifying designs. A cheap option that violates an essential recovery requirement has already failed the screening step.

Recover every hard dependency

Trace DNS, identity, secrets, keys, third-party APIs, deployment, and monitoring alongside application and database components. Each hard dependency must work outside the failed region or have a usable recovery path. A running application is not recovered if users cannot sign in or it cannot decrypt data.

Check quotas and usable capacity before relying on scaling a standby. Keep independent backup access and immutable copies in another account to resist a compromise that can delete production and its local backups. Do not treat "multi-region" as coverage for every disaster: a replicated bad update crosses the same geography that protects against a regional outage.

Key Takeaways

  • Rule out designs that miss either RTO or RPO before comparing cost.
  • Judge complete recovery times and allow for variation in drills.
  • Compare extra running cost with the outage loss avoided.
  • Trace shared dependencies and prepare recovery capacity before the event.
  • Region loss, corruption, and account compromise require different protections.
5

Backups and recovery tests

Recovery needs a clean, usable data point and a working path back to service. Backup frequency, retained history, consistency, and protection from deletion determine which points survive. Restore speed and supporting assets determine how quickly they become a running workload. Tests then check the design with real data and timestamps, exposing gaps that a successful backup job cannot reveal.

5.1 Design backups that can restore the workload

Backup design must answer four questions: which state is copied, how recent it must be, how long clean history survives, and how quickly a usable workload can be restored. A completed copy job answers only part of that design.

Choose a recoverable copy
Backup typeWhat it copiesRestore requirement
FullAll selected dataThe full set
IncrementalChanges since the previous backup of any kindFull plus subsequent incrementals in order
DifferentialChanges since the last full backupFull plus the selected differential

After a Sunday full backup, restoring Thursday night needs five sets with nightly incrementals: Sunday through Thursday. With differentials, it needs Sunday and Thursday, although the differential grows through the week. Managed EBS snapshots store changed blocks incrementally while the service tracks what is needed to restore a complete volume from a selected snapshot.

A crash-consistent snapshot captures disk state as if power stopped; in-memory data is absent and database recovery may be needed. An application-consistent copy coordinates flushing and pausing writes, for example with VSS or scripts. Use coordinated snapshots or a database's own backup mechanism for database recovery.

Set frequency and retained history

Four-hour snapshots can lose almost four hours just before the next copy. Point-in-time recovery (PITR) uses continuous backups and logs to choose a point between the earliest and latest restorable times. RDS and DynamoDB support windows up to 35 days; their newest restorable point commonly trails the present by about five minutes. That delay matters for a minutes-level RPO.

Retention must cover how late damage could be discovered and any required record keeping. One scheme keeps hourly copies for 2 days, daily copies for 35 days, and monthly copies for a year. Archive storage may take minutes or hours to retrieve, adding to RTO.

Separate backups from the threat

The 3-2-1 rule calls for at least three copies, two storage types, and one off-site copy. In cloud designs, use production data, an independent backup service or vault, and another-region copy, preferably in another account. The extended 3-2-1-1-0 rule adds an offline or immutable copy and zero errors in verified restores.

Immutable, or WORM, storage blocks changes and deletion until retention expires. Examples include S3 Object Lock, Backup Vault Lock, Azure immutable vaults, and Google Cloud Bucket Lock. Separate credentials, limited delete rights, and multi-factor approval protect access. Encrypt copies and preserve usable encryption keys; losing the key can make a complete backup unreadable.

Replication supplies recent copies but can carry damage. Versioning preserves previous object states: S3 records ordinary deletion with a delete marker, while Google Cloud Storage keeps the deleted live version as noncurrent. Independent point-in-time backups provide longer protected history.

Check restoration time and supporting assets

Back up images, configuration, templates, secrets, DNS information, and runbooks too. Backup policies can apply schedules, retention, cross-region or cross-account copying, and immutability by recovery tier.

At 200 MB/s, restoring 2 TB takes 2,000,000 ÷ 200 = 10,000 seconds, about 2 hours 47 minutes, before deployment and checks. If that misses RTO, reduce or split the restore set, improve throughput, or keep a live replica ready.

Key Takeaways

  • Incremental restores need the chain; differential restores need the full set and selected differential.
  • Coordinate database copies and check the latest usable PITR time.
  • Frequency sets possible data loss; retention keeps older clean points available.
  • Use immutable copies, separate access, and surviving encryption keys.
  • Preserve configuration and deployment assets as well as data.
  • Restore throughput, retrieval delays, deployment, and checks all affect RTO.

5.2 Prove recovery with measured tests

A backup can exist yet fail to restore because a key is missing, access has changed, or the application needs an overlooked dependency. Recovery tests check both correctness and elapsed time. They turn a design target into evidence about the current workload.

Increase realism in stages

A tabletop exercise walks through decisions and runbook steps without moving the system. A restore test rebuilds data in an isolated environment and checks row counts, checksums, and application reads. A component failover test stops an instance, promotes a database, or simulates zone loss. A regional drill moves production or a production-like copy to the recovery region. A game day brings the team together around a realistic planned failure.

Each test answers a different question. A tabletop can expose an absent decision owner but cannot measure database restore speed. A database-only test can verify promotion but miss broken sign-in in the recovery region.

Define a controlled experiment

Write the objective and hypothesis, such as "After the primary database fails, the application recovers within 3 minutes with no confirmed orders lost." State scope, blast radius, participants, measurement method, stop conditions, and rollback steps. Fault injection tools such as AWS Fault Injection Service and Azure Chaos Studio can stop instances or add latency. Start outside production and expand gradually; use alarms that automatically stop the experiment if impact exceeds the plan.

Record timestamps from the start of interruption. Include detection, decision, each recovery step, and verified service. Record the last recovered transaction time as well. A timer started when an engineer presses the failover button excludes time users already spent down.

Judge a drill against both targets

Targets are RTO 1 hour and RPO 5 minutes. Failure starts at 10:00, the alarm at 10:06, and the decision at 10:18. Database promotion finishes at 10:24, application scaling at 10:41, DNS changes at 10:44, and checks pass at 10:52. Recovery took 52 minutes, leaving 8 minutes. The last recovered transaction is from 09:58:30, so the data-loss window is 1 minute 30 seconds. Both targets are met.

The timestamps also show where to improve: 12 minutes passed between detection and the decision. Pre-agreed failover criteria can reduce that delay. Measuring only the six-minute database promotion would hide most of the interruption.

Keep recovery executable

A runbook lists ordered steps, owners, commands or automation links, access and quota prerequisites, and a check after each step. Keep it in version control and update it after architecture changes and tests. Automate repeatable execution while preserving a clear decision authority.

Schedule testing by criticality and repeat it after significant changes. Critical data may need monthly or quarterly restore tests and at least annual regional drills; applicable requirements may set another schedule. Include monitoring, alerts, logging, and failback so the recovery region can be operated and new data can return safely.

After a test, compare results with targets, record gaps, assign fixes, and retest. A missing quota needs preparation; an oversized restore may need a different strategy. Review the process without blame so the next run resolves the actual cause.

Key Takeaways

  • Choose tests that exercise the data, application, dependencies, and people needed for recovery.
  • Define hypotheses, blast radius, stop conditions, and rollback before fault injection.
  • Measure from interruption to verified service and compare the last recovered transaction with failure time.
  • Keep versioned runbooks with owners, prerequisites, automation, and checks.
  • Test after significant changes, include failback, and retest assigned fixes.

Designing Resilient Architectures examples

5 Walkthroughs

1

Turn a service promise into a resilience target

11 steps
Trace a booking workload, distinguish its resilience properties, and calculate an availability budget and dependency model.
  1. 1
    IntroductionStart with a booking that must finish

    A booking service needs to show available appointments and confirm a reservation. Its web server can be healthy while the reservation database is down, so server uptime alone misses the business failure. Users judge resilience by what they experience: high availability means rare, brief interruptions, and fault tolerance means covered failures go unnoticed. Follow one booking through its dependencies, then turn the acceptable interruption into a number you can compare with a design.

  2. 2
    ExplanationName the behavior users experience

    High availability keeps interruption rare and brief. Fault tolerance means a covered failure causes no interruption users notice. A standby that takes time to become writable supports HA; spare web capacity alone does not hide the requests interrupted on a failed instance. Safe, transparent retries are part of delivering seamless behavior.

  3. 3
    ExampleTrace the required path

    The booking request passes through DNS, a load balancer, the application, identity verification, and the reservation database. Ask what happens when each one fails. Two web instances remove the single-instance dependency, but one identity service can still stop every booking. Include shared credentials and certificates: a component can fail through expiry as well as a crashed machine.

  4. 4
    Key InsightSeparate the causes that can break copies

    Two instances do not provide two independent chances of success when the same event can break them both. A shared zone exposes them to location failure; a shared faulty release exposes them to a software failure across zones. Fault isolation reduces the blast radius, while redundancy supplies an alternative that must remain usable and large enough.

  5. 5
    ChallengeDoes a second database finish the plan?

    The booking database has a live replica. A mistaken update reaches both copies. Can switching to the replica recover the earlier booking records, and what is needed?

    ---reveal---

    Switching supplies another current copy, including the mistake. Recovery needs a protected point from before the update. Replication helps keep data available; independent backup history enables this return to an earlier clean state.

  6. 6
    ExplanationTranslate the target into minutes

    The booking target is 99.9% over 20 days. First convert the percentage to 0.999 and the period to 28,800 minutes. The unavailable fraction is 0.001.

    0.001×28,800=28.8 minutes

    That is 28 minutes 48 seconds of allowed interruption. Include maintenance that prevents bookings while customers need the service.

  7. 7
    ExampleCombine two required services

    Suppose the application and database each have availability 99.8%. Every booking needs both. Under an independent-failure model, multiply their available fractions:

    0.998×0.998=0.996004

    The path is modeled at 99.6004%, below either component. The average would still be 99.8%, but averaging fails to account for the distinct times when either required component can stop the request.

  8. 8
    ExampleImprove one tier without forgetting the other

    Give the application two independent alternatives, each able to handle all demand at 99.8%. Their joint unavailable fraction is 0.002 × 0.002, so the pair is available 99.9996% of the time in the ideal model. Keep the database at 99.8%:

    0.999996×0.998=0.997996008

    The whole path is still only about 99.80%. Application redundancy cannot remove database interruption.

  9. 9
    TipUse recovery speed as another design lever

    A component with a long interval between failures can still perform poorly if each repair is slow. Estimate availability as MTBF divided by MTBF plus MTTR, with matching time units. Automatic detection and a prepared replacement reduce MTTR. Measure restored booking behavior, because a running replacement process can still be unable to reach a required dependency.

  10. 10
    ChallengeChallenge the promise

    A team promises 99.99% booking availability because its redundant web tier exceeds that figure. The database remains a single hard dependency with a 99.9% design figure. What must the review resolve?

    ---reveal---

    The database needs a stronger design or a usable fallback for the required function. The web tier figure alone cannot support the complete promise. The calculation must also account for shared failure causes and switching delays, then be checked against business-level measurements.

  11. 11
    RecapUse three questions in the design review

    Ask what business function must work, what failure could stop its request path, and how much interruption is acceptable over the chosen period. Use dependency calculations to locate weak tiers, then inspect the real separation and failover behavior behind the model. Keep access, data survival, and clean historical recovery as distinct requirements when choosing the next improvement.

2

Keep a reservation service running across zones

15 steps
Place the full request path, size surviving compute, and follow database and cache behavior during a zone loss.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionPlan for a location to disappear
  2. 2
    ExplanationChoose the boundary for the failure
  3. 3
    TipRead scope and redundancy separately
  4. 4
    ChallengeDoes an availability set cover the outage?
  5. 5
    ExplanationGive requests healthy destinations
  6. 6
    ExampleSize the surviving pair of zones
  7. 7
    Key InsightState must move with the request
  8. 8
    ChallengeFind the remaining routing weakness
  9. 9
    TipReplace instances without cutting off work
  10. 10
    ExplanationProtect confirmed reservations
  11. 11
    ConnectionMake the application follow database promotion
  12. 12
    ExampleCheck every store in the reservation flow
  13. 13
    ChallengeFollow the outage through the whole design
  14. 14
    Key InsightZone copies and history serve different failures
  15. 15
    RecapJudge the surviving workload
3

Let services fail without stopping every caller

16 steps
Follow a ticketing task through queues and fan-out, then make retries and synchronous calls safe under partial failure.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionSeparate a submitted task from a finished task
  2. 2
    ExplanationStore work before the worker is ready
  3. 3
    ExampleMeasure the spike
  4. 4
    ExampleSubtract arrivals before calculating drainage
  5. 5
    ExplanationKeep crash recovery and duplicates safe
  6. 6
    ChallengeWill a longer visibility timeout fix this?
  7. 7
    ExplanationBroadcast the fact to separate buffers
  8. 8
    ConnectionChoose notification, work, or replay
  9. 9
    ChallengeAdd a new consumer without blocking email
  10. 10
    TipMake delayed progress visible
  11. 11
    ExplanationBound the call that must answer now
  12. 12
    ExampleSpread a limited retry budget
  13. 13
    ExplanationProtect healthy functions from the stalled one
  14. 14
    ChallengeCombine safe delivery with safe calls
  15. 15
    Key InsightMore attempts can keep the outage alive
  16. 16
    RecapGive each path a clear failure behavior
4

Choose and execute a regional recovery plan

17 steps
Compare a scheduling service's recovery objectives, strategy readiness, routing, and return to its original region.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionRecover the whole scheduling service
  2. 2
    ExplanationPut two objectives on the timeline
  3. 3
    ChallengeJudge each objective separately
  4. 4
    ConnectionBring dependencies into the same target
  5. 5
    ExplanationSeparate absent compute from running compute
  6. 6
    ExampleRead the candidate drill evidence
  7. 7
    ChallengeWhat distinguishes these two standbys?
  8. 8
    ExplanationChoose one safe writer during promotion
  9. 9
    ExampleBudget traffic movement time
  10. 10
    TipPrepare what the switch needs
  11. 11
    ChallengeCan a DNS change enforce one writer?
  12. 12
    ExampleRemove designs that miss either limit
  13. 13
    Key InsightCheck what a narrow margin can absorb
  14. 14
    ChallengeWhich scenario is still uncovered?
  15. 15
    ConnectionPlan the return before the original comes back
  16. 16
    ChallengeApprove the complete recovery path
  17. 17
    RecapBase the decision on complete evidence
5

Build a backup policy and prove a restore

12 steps
Select recovery copies, check the restore-time budget, and use a measured drill to find the next improvement.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionStart from the state that must survive
  2. 2
    ExplanationKnow which backup sets restoration needs
  3. 3
    TipCapture a state the database can use
  4. 4
    ExplanationPreserve both recent and older clean points
  5. 5
    ExamplePut restore throughput on the timeline
  6. 6
    ChallengeCan the attacker reach the recovery copy?
  7. 7
    ExplanationChoose a test that answers the question
  8. 8
    TipSet the limits before injecting a fault
  9. 9
    ExampleRead a complete drill timeline
  10. 10
    ChallengeWhat should improve next?
  11. 11
    ConnectionTest the cycle after the first success
  12. 12
    RecapUse restored service as the evidence

Designing Resilient Architectures practice questions

40 Practice Questions in 4 sets

Set 1: Messages, retries, and independent services10 Practice Questions

Question 1 of 10

A durable queue acknowledges a newly submitted invoice task. What has that acknowledgment established?
  1. The invoice has been processed by a consumer.
  2. The invoice has passed every business validation.
  3. The task message can never be delivered twice.
  4. The task message has been stored by the queue.
Show answerHide answer
Answer: D
The queue acknowledgment confirms storage of the submitted work, not completion of the invoice task. Processing happens later at a consumer. Treating acceptance as completion would let the interface report success before any worker had performed the requested business action.

Question 2 of 10

A message named "DeliveryScheduled" reports a completed scheduling decision. Is its role an event or a command?
  1. An event, because it reports something that happened.
  2. A command, because its name refers to a business action.
  3. A command, because every subscriber must acknowledge it.
  4. An event, because it tells one worker what to do next.
Show answerHide answer
Answer: A
An event records a fact that has already happened, which is how the message is described. A command asks a receiver to perform an action. The presence of an action in the name does not make it a command; its meaning and intended role decide that distinction.

Question 3 of 10

Document tasks arrive at 480 per minute for 8 minutes, while workers complete 180 per minute. Arrivals then fall to 60 per minute, with processing unchanged. How long does the accumulated backlog take to clear after the drop?
  1. 13 minutes 20 seconds
  2. 40 minutes
  3. 20 minutes
  4. 8 minutes
Show answerHide answer
Answer: C
The backlog grows by 300 per minute for 8 minutes, reaching 2,400 tasks. After the drop, only 120 completions per minute are available for old work because 60 serve new arrivals. Dividing by the full 180-per-minute rate gives 13 minutes 20 seconds but ignores those continuing arrivals.

Question 4 of 10

A worker normally takes 75 seconds to finish a task. Queue visibility is 30 seconds, and another worker receives the task while the first is still running. What should change?
  1. Shorten visibility to free the task and keep the handler idempotent.
  2. Extend visibility to cover processing and keep the handler idempotent.
  3. Delete upon receipt to free the task and retain the same visibility.
  4. Increase retention to cover processing and retain the same visibility.
Show answerHide answer
Answer: B
Visibility must cover the time the worker needs, or be extended while work continues. Otherwise the queue can redeliver before the first attempt finishes. Deleting on receipt avoids that redelivery but loses the task if the worker then crashes; idempotency protects repeated processing without sacrificing recovery.

Question 5 of 10

Billing and audit must each process every booking event. Audit outages must not delay billing. How should the subscriptions be arranged?
  1. One durable queue shared by billing and audit worker groups.
  2. One topic whose only subscription is the billing service.
  3. One topic feeding a separate durable queue for each service.
  4. One durable queue with billing forwarding messages after deletion.
Show answerHide answer
Answer: C
Fan-out gives each service its own durable copy and independent backlog. Workers on a shared queue compete for messages, so billing and audit would divide the events instead of both seeing all of them. Separate queues also let audit recover later without blocking billing processing.

Question 6 of 10

Two analytics teams need to reread last week's retained records at independent speeds, preserving order within each customer partition. What messaging pattern best fits?
  1. A partitioned stream with independent consumer positions.
  2. A work queue that deletes each record after one completion.
  3. A shared queue that alternates records between the teams.
  4. A direct command call that waits for both teams to finish.
Show answerHide answer
Answer: A
A stream retains a log and lets each consumer track its own position, supporting independent replay within the retention window. A work queue normally deletes successfully processed work and divides delivery among workers. Its successful-consumption model does not meet the stated need for both teams to reread history.

Question 7 of 10

A payment request times out after the server may have charged the customer. What makes a retry safe from creating a second charge?
  1. Generate a new key for every attempt to avoid collisions.
  2. Reduce the timeout until the client receives a quick failure.
  3. Add random delay without tracking the original operation.
  4. Reuse a key whose result the server records and recognizes.
Show answerHide answer
Answer: D
A stable idempotency key identifies the same business action across attempts, allowing the server to return the recorded result. A timeout leaves the remote outcome uncertain. Generating a fresh key makes the retry look like a new payment, while backoff alone does not prevent a duplicate charge.

Question 8 of 10

An optional rating service hangs and consumes all connections shared with order submission. Which change directly prevents that resource exhaustion from stopping orders?
  1. Give rating calls more retries in the existing shared pool.
  2. Give rating calls a separate bounded connection pool.
  3. Give every rating request a new idempotency identifier.
  4. Give the rating service a longer client response timeout.
Show answerHide answer
Answer: B
A separate bounded pool is a bulkhead: stalled rating calls can exhaust their own allocation without taking all order connections. More retries or a longer timeout keep the shared resources occupied. Idempotency can protect repeated effects but does not isolate connection capacity.

Question 9 of 10

A gateway and a worker each make up to 3 attempts at a downstream API. The API completes some debit requests before responses are lost. Load rises sharply during failures and duplicate debits appear. Which redesign addresses both causes?
  1. Retry at both layers with longer waits and a fresh key for each debit.
  2. Retry at one layer with bounded jittered backoff and fresh debit keys.
  3. Retry at both layers with immediate attempts and a stable debit key.
  4. Retry at one layer with bounded jittered backoff and a stable debit key.
Show answerHide answer
Answer: D
The two retrying layers can produce up to 9 downstream attempts, so one bounded retry layer reduces amplification. A stable server-recognized debit key prevents a lost response from causing another debit. Fresh keys would leave the duplicate-effect problem even if the retry load were reduced.

Question 10 of 10

A task is committed to the database, then its consumer crashes before deleting the queue message. After redelivery the same record is updated twice. A proposed fix deletes before processing. What design preserves work and prevents the duplicate effect?
  1. Record completion before the database update, then delete after success.
  2. Record completion only in worker memory, then delete after success.
  3. Commit completion by task ID with the update, then delete after success.
  4. Record completion after queue deletion, then apply the database update.
Show answerHide answer
Answer: C
Commit the database effect and durable completion record together so redelivery recognizes a completed task. Delete the message after success to preserve unfinished work after crashes. Recording completion before the update can skip work after a crash; recording it only in worker memory loses the evidence when that worker fails.
Set 2: Availability and zone failure decisions10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A service has a 99.98% time-based availability target over a 25-day period. What is its allowed downtime?
  1. 7 minutes 12 seconds
  2. 72 minutes 0 seconds
  3. 3 minutes 36 seconds
  4. 12 minutes 0 seconds
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A service preserves every stored record but users cannot reach it for 12 minutes. Which property has failed during that interval?
  1. Durability of the records
  2. Retention of the backups
  3. Availability of the service
  4. Consistency of the replicas
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

One database standby takes over after an outage, but users see failed writes for 80 seconds. How should this behavior be classified?
  1. Fault tolerance with seamless continuation
  2. High availability with a short interruption
  3. Disaster recovery from retained history
  4. Durability with continuous write access
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A regional resource is described as nonzonal, with no zone-resilience guarantee. What can be concluded about its placement resilience?
  1. Its regional scope guarantees copies in every available zone.
  2. Its nonzonal label guarantees survival of an entire region loss.
  3. Its nonzonal label places its copies outside the selected region.
  4. Its regional scope alone does not establish zone protection.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

Peak demand requires 10 identical instances. What is the minimum equal-sized deployment across three zones that carries peak demand immediately after any one zone is lost?
  1. 4 instances per zone; 12 total
  2. 5 instances per zone; 15 total
  3. 10 instances per zone; 30 total
  4. 3 instances per zone; 9 total
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

An application stores each session only in its instance memory and enables sticky sessions. A user's instance fails. What change would let another instance continue the existing session?
  1. Increase the duration of the sticky-session cookie.
  2. Increase the timeout of the failed instance probe.
  3. Delay replacement until the failed instance returns.
  4. Put session state in a resilient shared store.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A team wants automatic zone failover and read scaling from an RDS Multi-AZ DB instance deployment with one standby. Why must it plan another read-scaling resource?
  1. That standby is reserved for failover and does not serve reads.
  2. That standby serves reads only after every write has replicated.
  3. That standby serves reads only when the primary zone is healthy.
  4. That standby scales reads but requires manual writer promotion.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A request requires two independent serial components, each with availability 99.5%. What is the modeled request-path availability with instant switching?
  1. 99.5000%
  2. 99.9975%
  3. 99.0025%
  4. 99.0000%
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A single cache fails, and the database is overwhelmed by requests that previously hit it. Which design directly addresses both the location failure and the fallback load?
  1. Cross-zone cache failover plus longer session-cookie lifetimes.
  2. Cross-zone cache failover plus limits while the cache refills.
  3. Regional disk snapshots plus a larger DNS cache duration.
  4. Regional disk snapshots plus fewer application health probes.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A request needs a router at 99.9%, two independent redundant workers at 99% each, and a database at 99.5%. Failures are independent and switching is instant. The target is 99.9%. What does this model imply?
  1. The path is about 99.39%; the database alone caps it below target.
  2. The path is about 99.99%; worker redundancy clears the target.
  3. The path is about 99.90%; the router alone determines the result.
  4. The path is about 99.50%; averaging the tiers clears the target.
Show answerHide answer

Save this lesson to see this answer.

Set 3: Regional recovery and strategy selection10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A recovery region has a complete application running at reduced capacity and can answer requests now. Which DR strategy does this describe?
  1. Pilot light
  2. Warm standby
  3. Backup and restore
  4. Multi-site active/active
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

The last recoverable transaction is from 13:41, failure begins at 13:48, and verified service returns at 14:23. Targets are RPO 5 minutes and RTO 40 minutes. What is the result?
  1. The 42-minute recovery misses RTO; the 7-minute gap misses RPO.
  2. The 35-minute recovery meets RTO; the 35-minute gap misses RPO.
  3. The 7-minute recovery meets RTO; the 35-minute gap misses RPO.
  4. The 35-minute recovery meets RTO; the 7-minute gap misses RPO.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A service needs sign-in and must recover within 12 minutes. Its shared identity provider can only be restored in 50 minutes, with no fallback. What follows?
  1. The identity recovery path prevents the service from meeting its RTO.
  2. The service meets its RTO if its application servers start in 12 minutes.
  3. The identity provider only affects RPO because it stores user records.
  4. The service meets its RTO if the identity provider has a recent backup.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A team deploys active/active regions with rapid replication. An erroneous update overwrites valid customer data in both. What capability supplies recovery to the earlier valid state?
  1. A shorter DNS TTL pointing at either active region.
  2. More compute capacity serving the same replicated data.
  3. Protected point-in-time backups from before the update.
  4. An extra replica receiving the same update stream.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

Health probes run every 20 seconds and require 3 failures. The endpoint DNS TTL is 40 seconds. Using the usual detection-plus-cache estimate, how long may most clients take to switch?
  1. About 100 seconds
  2. About 40 seconds
  3. About 60 seconds
  4. About 180 seconds
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A company relies only on CloudFront origin failover for its regional write API. The API accepts POST requests. What gap must its architecture address?
  1. CloudFront origin failover waits for all cached POST responses to expire.
  2. CloudFront origin failover always changes POST into a secondary GET.
  3. CloudFront origin failover copies POST data but never sends read traffic.
  4. CloudFront origin failover does not retry POST at the secondary origin.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

An internal directory requires RTO 10 hours and RPO 12 hours. Backups every 6 hours are copied to an allowed recovery region, and complete restore drills take 3 hours. It is the cheapest qualifying design. Which strategy fits?
  1. Pilot light because any regional recovery requires live servers.
  2. Backup and restore with those protected regional copies.
  3. Warm standby because backups cannot meet an hourly RPO.
  4. Active/active because a six-hour copy interval requires it.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

RTO is 35 minutes and RPO is 2 minutes. Backup/restore takes 90 minutes with 30-minute copies. Pilot light takes 32 minutes with 4-minute lag. Warm standby takes 24 minutes with 1-minute lag. Active/active takes 3 minutes with 1-minute lag. Costs rise in that order; all other constraints are met. What is the cheapest qualifying strategy?
  1. Backup and restore
  2. Pilot light
  3. Warm standby
  4. Active/active
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A regional partition leaves the old writer reachable to some clients. RTO is 90 seconds and RPO is 20 seconds. The standby has 10-second lag. Detection and authorization take 10 seconds, fencing 20, promotion 20, and a prepared global traffic switch 30; the steps are sequential. Creating routing resources is unavailable. What plan and result meet the requirements safely?
  1. Promote, then switch existing traffic; report 60 seconds and leave old writes enabled.
  2. Create a new router, fence, and promote; report 80 seconds despite unavailable provisioning.
  3. Switch existing traffic, then permit both writers; report 40 seconds and merge changes later.
  4. Fence, promote, then switch existing traffic; report 80 seconds and a 10-second data gap.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A pilot light meets every requirement and recovers in 45 minutes. A warm standby recovers in 15 minutes, costs an extra 2,500 US dollars monthly, and meets the same requirements. Downtime costs 12,000 dollars per hour; expect two regional incidents yearly. On these costs alone, what is the annual difference?
  1. Warm standby costs 18,000 dollars more after avoided loss.
  2. Warm standby saves 12,000 dollars after extra running cost.
  3. Warm standby costs 24,000 dollars more after avoided loss.
  4. Warm standby saves 6,000 dollars after extra running cost.
Show answerHide answer

Save this lesson to see this answer.

Set 4: Backup evidence and combined failure scenarios10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A backup contains every change since the last full backup, regardless of intervening nightly copies. What type is it?
  1. A differential backup
  2. An incremental backup
  3. A full backup
  4. A synchronous replica
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A full backup was made Friday, followed by nightly incrementals on Saturday, Sunday, and Monday. What sets restore Monday night's state?
  1. Friday full plus only Monday night's incremental.
  2. Saturday incremental plus Monday night's incremental.
  3. Friday full plus all three nightly incrementals.
  4. Only Monday night's incremental and its metadata.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

Ransomware operators can delete production and its backup vault using the same compromised account. Which protection most directly separates backups from that destructive access?
  1. More frequent mutable copies in the same compromised account.
  2. A second-region vault controlled by the same delete permissions.
  3. Longer retention on copies whose deletion remains unrestricted.
  4. Immutable copies in a separate account with independent access.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A drill starts at 16:00, detection occurs at 16:04, and verified service returns at 16:38. Its last recovered transaction is 15:59:10. What measured recovery time and data-loss window should be recorded?
  1. 34 minutes and 50 seconds, respectively.
  2. 38 minutes and 50 seconds, respectively.
  3. 38 minutes and 38 minutes 50 seconds, respectively.
  4. 4 minutes and 34 minutes, respectively.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A database failover test meets its target, but regional recovery fails because the application cannot decrypt its restored data. What should the next drill add?
  1. A faster database-only promotion without application checks.
  2. A tabletop review that omits the working decryption step.
  3. An end-to-end application recovery using recovery-region key access.
  4. A longer database timeout before the application reports failure.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

During an optional recommendation outage, a product page times out even though product data is healthy. What behavior would preserve the useful core page?
  1. Wait indefinitely for recommendations before rendering the page.
  2. Use a short recommendation timeout and hide that section on failure.
  3. Retry recommendations at every layer until the page has all content.
  4. Return an empty product record after any recommendation timeout.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A service must recover in 2 hours. Its 1.2 TB restore runs at 300 MB/s; sequential detection, deployment, and checks add 35 minutes. All data copies meet RPO. Does the measured design fit RTO, and what is the margin?
  1. Yes; recovery takes 101 minutes 40 seconds, leaving 18 minutes 20 seconds.
  2. Yes; recovery takes 66 minutes 40 seconds, leaving 53 minutes 20 seconds.
  3. No; recovery takes 155 minutes, exceeding the target by 35 minutes.
  4. No; recovery takes 3 hours 35 minutes, exceeding it by 1 hour 35 minutes.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

Peak load needs 7 identical instances, evenly deployed in three zones. Every application health probe also requires one shared database. How many instances are needed for one-zone-loss capacity, and what remains unresolved?
  1. 9 total; a database outage can still mark every application target unhealthy.
  2. 12 total; the probes guarantee that one database failure stays in one zone.
  3. 21 total; the probes guarantee that one database failure stays in one zone.
  4. 12 total; a database outage can still mark every application target unhealthy.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

An archive app needs RTO 90 minutes and RPO 10 minutes for region loss and accidental deletion. Pilot light drills take 70 minutes with 2-minute replication lag, but a deletion discovered after 3 days is present in both regions. Only 1 day of backup history is retained. What blocks approval?
  1. Regional results miss RTO, but retained history covers the stated deletion.
  2. Regional results fit, but retained history cannot recover the stated deletion.
  3. Regional results fit, so rapid replication also covers the stated deletion.
  4. Regional results miss RPO, so active/active is the only remaining design.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

Targets are RTO 45 minutes and RPO 2 minutes. A drill records failure at 11:00, detection at 11:03, decision at 11:14, technical recovery at 11:37, and final checks at 11:47. The last recovered transaction is 10:59. What result and next action are supported?
  1. RTO meets by 8 minutes; RPO meets; approve without another full drill.
  2. RTO misses by 2 minutes; RPO misses; increase the backup interval.
  3. RTO misses by 2 minutes; RPO meets; reduce decision delay and retest.
  4. RTO meets by 1 minute; RPO misses; remove final application checks.
Show answerHide answer

Save this lesson to see this answer.

Stuck on your own question? Homework Help

Key Terms

90 Key Terms, each with its definition

A

Active/active
Active/active runs the workload in multiple regions serving users at the same time, with capacity and write handling designed for regional failure.
An active/active service redirects users to surviving regions and must keep enough headroom for the extra load.
Application-consistent snapshot
An application-consistent snapshot coordinates writes before capture so the saved state reflects a coherent recoverable application point.
Backup scripts flush the database before taking an application-consistent snapshot of its underlying disks.
Asynchronous replication
Asynchronous replication confirms at the primary before the replica catches up, reducing write delay while risking recent loss at failover.
Asynchronous replication keeps the recovery region close to current without delaying every write across regions.
Availability
Availability is the share of time a service can perform its agreed function, or the share of valid requests completed successfully.
The team measures availability using successful reservations, so a broken booking flow counts as failure.
Availability set
An availability set is an Azure placement grouping that separates virtual machines across local fault domains and maintenance update domains.
The availability set covers rack failure and maintenance, while another-zone deployment covers a zone outage.
Availability zone
An availability zone is one or more separate data centers within a region, with independent power, cooling, and networking infrastructure.
A standby in another availability zone survives a location failure that removes the database primary.

B

Backlog
A backlog is the work waiting for processing, which grows when arrivals exceed completions and shrinks only when processing exceeds new arrivals.
The backlog drains slowly because most worker capacity is still needed for orders arriving right now.
Backup and restore
Backup and restore is a DR strategy that keeps protected data copies and rebuilds the workload after disaster, usually trading low cost for longer recovery.
Backup and restore meets a wiki's recovery targets because its tested rebuild is much shorter than the allowed outage.
Blast radius
The blast radius is the set of resources or users affected by a failure, which fault isolation aims to keep small enough to manage.
Separate customer cells keep the blast radius of a stalled dependency within one group of users.
Bulkhead
A bulkhead isolates resource pools or workload groups so one failure cannot consume capacity that other functions or users need.
A separate reporting connection pool is a bulkhead that keeps stalled reports from consuming checkout capacity.
Business impact analysis
A business impact analysis examines how disruption harms a workload over time, providing the business basis for its recovery priorities and targets.
The business impact analysis gives customer ordering a faster recovery tier than internal monthly reporting.

C

Choreography
Choreography coordinates a process through services reacting to events without one central controller directing the complete sequence.
In choreography, a reservation event triggers payment, whose completion event then triggers ticket delivery.
Circuit breaker
A circuit breaker stops calls to a failing dependency during a cool-down and later allows limited probes before restoring normal traffic.
The circuit breaker opens during a payment service outage so new calls fail promptly without exhausting connections.
Claim-check pattern
The claim-check pattern stores a large payload outside the message service and sends a reference that lets the consumer retrieve it later.
The claim-check pattern puts a document in object storage and queues its location for the processing worker.
Cold cache
A cold cache holds little or none of the needed data, so more requests reach the backing store until useful cached entries are rebuilt.
Request limits protect the database from a cold cache after the cache cluster has been replaced.
Command
A command is a message asking a receiver to perform an action, distinct from an event that reports a fact already established.
The workflow sends the command "ReserveSeat" and waits for the service to report whether reservation succeeded.
Connection draining
Connection draining stops new requests reaching a departing instance while allowing existing requests a bounded time to finish.
Connection draining lets an upload finish before a planned scale-in removes the web instance serving it.
Consumer
A consumer receives queued messages and performs their work, acknowledging or deleting them after successful processing according to the service.
A consumer records a completed invoice before deleting its queue message, allowing safe recovery after crashes.
Control plane
The control plane creates and changes cloud resources, so recovery steps that need provisioning depend on its management functions being available.
Launching standby servers during a regional disruption adds control plane dependence to the recovery path.
Correlated failure
A correlated failure affects multiple components through a shared cause, defeating redundancy that depends on independent failures.
A faulty configuration sent to every region creates a correlated failure across otherwise separate sites.
Crash-consistent snapshot
A crash-consistent snapshot captures disk state as if power stopped, excluding unflushed memory and potentially requiring database recovery on start.
The restore test checks that the database repairs and opens correctly from its crash-consistent snapshot.

D

Data plane
The data plane delivers the running service, such as forwarding traffic and answering queries, using resources and configuration already prepared.
Preconfigured health routing can use the data plane to direct users without creating resources during failure.
Data residency
Data residency concerns where data is stored geographically and constrains which regions may hold production, replicas, and recovery copies.
Data residency requirements can rule out a convenient recovery region even when its latency and price fit.
Dead-letter queue
A dead-letter queue holds messages that exceeded a configured processing-attempt limit so their cause can be investigated without endless retries.
A malformed invoice reaches the dead-letter queue while valid invoices continue through the normal workers.
Differential backup
A differential backup copies all changes since the latest full backup, allowing recovery from that full set and one selected differential.
The Thursday differential backup grows larger as more changes accumulate since Sunday's full copy.
Distributed tracing
Distributed tracing follows a request across services, showing the sequence and timing of calls so failed or slow dependencies can be found.
A shared trace shows that a slow reservation's delay starts in the payment call, not in the web server.
DNS failover
DNS failover returns a secondary endpoint after health checks mark the primary unhealthy, with client switching delayed by cached answers.
DNS failover takes longer than the TTL alone because the health-check threshold must be reached first.
Durability
Durability describes how likely stored data is to survive without loss or corruption over time, independently of present access.
The object data retains its durability during a brief outage that prevents users from reading it.

E

Event
An event is a message describing a fact that already happened, allowing independent consumers to react without directing one named receiver.
An event named "SubscriptionCreated" lets billing and email begin their own work from the same business fact.
Event bus
An event bus accepts events from sources and routes them to targets using rules that match their content, with features depending on the service.
An event bus sends unusually large orders to extra review while routing all orders to the normal workflow.
Eventual consistency
Eventual consistency allows copies or service views to differ temporarily after a change before updates are reflected across the system.
Eventual consistency means the stock view may briefly lag an accepted order while its inventory event waits.
Exponential backoff
Exponential backoff increases the delay between retries by repeated multiplication, commonly doubling each wait until a configured cap is reached.
Exponential backoff reduces the frequency of calls to a throttled API while the caller has retry budget left.

F

Failback
Failback is the planned migration to the original region after recovery, including copying back new changes, verification, and a controlled traffic switch.
Failback waits until the original database has received the orders accepted while the recovery region was active.
Fan-out
Fan-out delivers one publication to multiple independent destinations, often separate queues that provide each consumer its own buffer and retries.
Fan-out keeps the billing queue moving while the notification queue accumulates work during an email outage.
Fault tolerance
Fault tolerance is continued service without an interruption users notice when a failure covered by the design occurs.
Spare web capacity and transparent safe retries provide fault tolerance for a failed application instance.
Fencing
Fencing prevents the former primary from accepting writes before a new writer is promoted, enforcing one writable authority during failover.
The team verifies fencing before promotion so cached connections cannot continue updating the stale database.
Full backup
A full backup copies all selected data at its recovery point, providing a complete base that incremental or differential restores can build on.
The Sunday full backup is retained because the following week's incremental recovery chain depends on it.

G

Game day
A game day is a planned team exercise responding to a realistic simulated failure, combining technical recovery with decisions and coordination.
The game day records decision delays as well as technical steps so the next exercise can test the improvements.
Graceful degradation
Graceful degradation keeps a useful core function available by reducing or postponing noncritical features when their dependencies fail.
Graceful degradation hides product ratings during their outage while allowing the catalog page to remain useful.

H

Hard dependency
A hard dependency is a service or resource that a business function cannot complete without, so its recovery must be included in the workload plan.
The sign-in provider is a hard dependency even though it sits outside the application's cloud account.
Health check
A health check is a repeated probe used to decide whether a target can receive requests, with thresholds for failure and recovery.
The load balancer's health check removes a failed web instance after consecutive unsuccessful probes.
High availability
High availability means a service is usable for a very high share of a stated period, with interruptions kept rare and brief.
A database with a short automatic promotion delay provides high availability for its application.
Hot standby
A hot standby is a full-capacity active/passive recovery copy that is running but does not serve normal users until failover occurs.
A hot standby can absorb full traffic without the capacity growth that a smaller warm standby needs.

I

Idempotency
Idempotency is the property that repeating an operation has the same effect as performing it once, making uncertain or repeated delivery safer.
The consumer uses idempotency so redelivery of a completed task does not add the invoice balance a second time.
Immutability
Immutability prevents protected backup data from being changed or deleted until its retention period ends, preserving a recoverable historical copy.
An immutable backup survives a destructive action that would otherwise delete both the live data and mutable copies.
Immutable infrastructure
Immutable infrastructure replaces resources from a versioned image for changes instead of updating each running instance individually.
The team rolls back immutable infrastructure by deploying the previous image through the same templates.
Incremental backup
An incremental backup copies changes since the previous backup of any kind, so restoration needs the base and the relevant change chain.
Thursday's incremental backup alone cannot restore changes that were captured only in Monday's copy.

J

Jitter
Jitter is random variation added to retry waiting times to spread clients' next attempts and reduce synchronized bursts against a struggling service.
Jitter keeps thousands of workers from retrying the same recovering database at precisely the same moment.

M

Message queue
A message queue is a durable buffer that stores producer messages until consumers can process them, separating submission from completion.
A message queue retains invoice work while workers are offline, allowing them to catch up after recovery.
MTBF
MTBF is mean time between failures, an average operating interval used with recovery time to estimate a repairable component's availability.
At unchanged MTBF, automating restoration improves the modeled availability by shortening each interruption.
MTTR
MTTR is mean time to recover, the average duration needed to restore service after failure in the availability model used here.
An automatic standby promotion lowers MTTR compared with waiting for an operator to rebuild the server.

O

Object versioning
Object versioning retains earlier object states after overwrites and ordinary deletion, with deletion records and protection rules varying by service.
Object versioning lets an administrator recover the earlier document after a user overwrites it by mistake.
Orchestration
Orchestration coordinates a process through a workflow controller that directs steps and manages retries, timeouts, errors, and compensation.
Orchestration makes the booking workflow issue a refund if a later fulfillment step cannot complete.

P

Pilot light
A pilot light keeps replicated data and core infrastructure ready, with application components still to start or deploy before serving requests.
The pilot light requires the team to launch application instances before it can accept any recovery traffic.
Point-in-time recovery
Point-in-time recovery uses retained backups and logs to restore data to a chosen moment between the earliest and latest available recovery points.
Point-in-time recovery selects the second before a bad update, provided that point remains inside retained history.
Producer
A producer submits messages for later processing, receiving confirmation of storage without waiting for a consumer to finish the business action.
The order API acts as a producer when it stores a fulfillment task and returns an accepted status.
Publish/subscribe
Publish/subscribe distributes a published message to each subscription so independent consumers can react without the publisher knowing them.
Publish/subscribe lets an audit service subscribe to booking events without changing the booking publisher.

R

Read replica
A read replica is a database copy used to serve reads, with replication and promotion behavior that depends on the engine and deployment.
A lagging read replica helps reporting but needs a separate review before serving as the automatic HA target.
Recovery margin
A recovery margin is the time left between a measured end-to-end restoration and its RTO, indicating how much extra delay the design can absorb.
A narrow recovery margin prompts more drills to see whether normal timing variation would miss the target.
Recovery point objective
The recovery point objective is the maximum acceptable time gap between the recovered data point and interruption, expressing tolerated data loss.
A five-minute recovery point objective rules out relying only on an hourly backup for recent transactions.
Recovery tier
A recovery tier groups workloads with similar restoration and data-loss targets so their infrastructure, backup, and testing needs can be planned.
A shared identity service must support the recovery tier of the most demanding workload that depends on it.
Recovery time objective
The recovery time objective is the maximum acceptable interruption between a service failure and restoration of the agreed workload function.
A 30-minute recovery time objective includes the minutes spent detecting failure and authorizing failover.
Redundancy
Redundancy provides additional components capable of doing the same job so a failure does not remove all working capacity.
The team adds redundancy by placing a second database copy in a different availability zone.
Region
A region is a separate geographic area in a cloud platform containing the data centers and services deployed within that area.
The architect chooses a region close to users that is also allowed to hold the workload's customer data.
Region pair
A region pair is an association of two Azure regions used by some services for geographic redundancy and coordinated platform recovery.
The team still tests its own application failover even though its storage replicates within a region pair.
Regional failover drill
A regional failover drill moves production or a realistic copy to a recovery region to exercise the complete recovery path and measure its results.
The regional failover drill includes sign-in, database access, monitoring, and the final user traffic switch.
Replication lag
Replication lag is the delay between a change at the primary and its presence at a replica, affecting possible loss when that replica is promoted.
A 40-second replication lag means a regional promotion may omit the latest 40 seconds of confirmed updates.
Resilience
Resilience is the ability of a workload to keep doing its job through component failures and recover from wider disruptions.
The design review tests resilience against overload, software errors, and the loss of a data center.
Restore test
A restore test rebuilds data in an isolated environment and checks its correctness and use by the application, including the elapsed recovery time.
The restore test catches a missing encryption permission before the backup is needed during a real outage.
Retention period
A retention period is how long stored messages or backups remain available before expiry, limiting how late processing or recovery can occur.
The queue retention period must exceed the planned consumer outage and the time needed to clear its backlog.
Runbook
A runbook is an ordered recovery procedure with owners, actions or automation links, prerequisites, and checks showing that each step succeeded.
The team updates the runbook after a failover drill exposes a missing quota increase in the recovery region.

S

Serial dependency
A serial dependency is a required component in a request path, so that component and the other required parts must work for success.
Authentication is a serial dependency when every order requires the identity provider to validate a token.
Service level agreement
A service level agreement is a contractual commitment from a provider, often offering service credits if defined conditions are missed.
The architect checks each service level agreement but still tests the complete checkout request path.
Service quota
A service quota limits the amount or rate of a cloud resource available to an account, often within a particular region or resource family.
A low vCPU service quota prevents the recovery region from scaling its standby to production capacity.
Single point of failure
A single point of failure is a component whose loss stops the workload because no usable alternative can perform its required job.
One identity server can be a single point of failure even when the application spans three zones.
Split-brain
Split-brain occurs when separate sites both act as primary and accept writes, causing their data to diverge while authority is unresolved.
A network partition creates split-brain risk if old clients keep writing after the other region is promoted.
Stateless instance
A stateless instance holds no unique user state between requests, allowing another instance to continue work using shared or client-held state.
A replacement stateless instance reads the shared session and continues the user's booking process.
Static stability
Static stability means the healthy resources already running can absorb a covered failure without launching or changing resources to survive.
Extra capacity in the zones that survive a zone loss provides static stability while the scaling group replaces losses.
Sticky session
A sticky session keeps requests from one user routed to the same instance, providing affinity without copying that instance's local session data.
A sticky session cannot preserve a shopping cart held only in the memory of an instance that fails.
Stop condition
A stop condition is a monitored limit that automatically halts a fault-injection experiment when its impact exceeds the agreed test boundaries.
An error-rate alarm is a stop condition that ends the experiment before its effect spreads beyond the test group.
Stream
A stream is a retained log of records with independent consumer positions and ordering within a partition or shard, allowing later replay.
Each analytics team reads the stream at its own speed and can reread retained records after fixing its code.
Synchronous replication
Synchronous replication confirms a write after the primary and replica have stored it, protecting confirmed data at the cost of a round trip.
The database uses synchronous replication between zones so a primary failure preserves confirmed orders.

T

Tabletop exercise
A tabletop exercise walks through a recovery scenario and its decisions on paper, identifying planning gaps without restoring the actual workload.
A tabletop exercise reveals that no named owner has authority to declare the primary region unavailable.
Throttling
Throttling limits the rate of accepted requests, rejecting excess traffic so the service stays within capacity and clients can back off.
The API gateway applies throttling and returns 429 when one client sends requests above its allowed rate.
Timeout
A timeout is the maximum wait allowed for an operation before the caller gives up, bounding resources held by a slow or unreachable dependency.
A short timeout on an optional recommendation call prevents it from delaying the complete product page.

V

Visibility timeout
A visibility timeout hides a received queue message temporarily, letting it reappear for another attempt if successful processing is not acknowledged.
The worker extends the visibility timeout while a large document takes longer than usual to process.

W

Warm standby
A warm standby is a complete working recovery environment running at reduced capacity that must scale to carry the full production load.
The warm standby serves a small test load continuously so its application configuration can be checked.
Workload
A workload is the code and components that together deliver a business function, including the dependencies that function needs.
A checkout workload includes the application, payment integration, session store, and order database.

Z

Zonal resource
A zonal resource lives within one availability zone, so surviving a zone outage requires an additional copy or another recovery path.
A virtual machine and its ordinary attached block disk are zonal resources, each tied to one availability zone.
Zone redundancy
Zone redundancy spreads copies across several availability zones in a region so one zone outage leaves working copies elsewhere.
The team enables zone redundancy for the storage service instead of relying on its regional scope label.

About this lesson

By StudeliReport a mistake

Make your own Study Materials

Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.

Get Started