The previous lesson ended by pointing at the risk we have been carrying since we designed high availability: one hundred percent of shipment creation lives in a single building in Zaragoza. ADR-008 made every piece inside the data center redundant and left it in writing among its risks: the data center is still a single site. Today, moreover, the only backup of the database is stored every night on a NAS that sits in the same room as the server. And NFR-14 is still in the requirements table with the note "to be defined." In this lesson, the last of the module, we will define it with Daniel, because how much can be lost and how long we can wait are business decisions; we will design the recovery plan with Íñigo; and we will see what the couriers and the warehouses do while the systems are not there. We will close with the status of the fourteen non-functional requirements after the module.

Warning. Business continuity has legal, contractual, and regulatory implications: personal data breach notification obligations, clauses in customer contracts, insurance, sector-specific regulation. The deadlines, objectives, and procedures in this lesson are a teaching example with fictitious data and must be reviewed with professionals in regulatory compliance, legal counsel, and risk management.

Contents

  1. High availability, disaster recovery, and business continuity
  2. Business impact analysis
  3. RPO and RTO
  4. Backup strategy
  5. Disaster recovery strategies
  6. Critical dependencies
  7. Rutaverde's recovery plan
  8. The operational continuity plan
  9. Drills and crisis communication
  10. Ransomware as a scenario
  11. Module review: the status of the requirements

  1. High availability, disaster recovery, and business continuity

These are three concepts that build on one another and are frequently confused:

High availability Disaster recovery (DRP) Business continuity (BCP)
What it protects The service against the failure of a component The systems against the loss of a site or of the data The business against any serious interruption
Example event mono-02 goes down; db-01 fails Fire in the data center; deletion or encryption of the data The above, and also a strike, a pandemic, or a supplier going bankrupt
How it acts Automatically, in seconds With a plan, in hours, by human decision With alternative procedures, for as long as it lasts
Scope Technology Technology People, processes, facilities, suppliers, and technology
Who responds Operations Operations and architecture Senior management

Two ideas that prevent expensive mistakes:

  • High availability is not a recovery plan. The synchronous replica db-03 protects against the failure of db-01, but it is in the same room. And it faithfully replicates any accidental deletion in less than a second.
  • The recovery plan is not a continuity plan. Recovering the systems in two hours does not say what 280 couriers do during those two hours.

  1. Business impact analysis

The business impact analysis (BIA) is the starting point. Technology does not do it alone: it is done with whoever knows the business. For each process it answers three questions: what happens if it stops, how long it can be stopped before the damage is unacceptable, and how much data it can afford to lose.

You, Marta, and Íñigo meet with Daniel one morning. This is the result:

Process Impact of its interruption Maximum tolerable downtime Tier
Shipment creation €14,000 of revenue at risk per hour, €70,000 in peak season; beyond 3.6 hours in a month the SLA is breached 4 hours 1
Delivery with the app 280 couriers unable to record deliveries; packages returning to the warehouse 4 hours, with an alternative procedure 1
Route planning If there are no routes at 06:00, the day's deliveries do not go out It has a deadline 1
Tracking Recipients with no information; a flood of calls to customer support 8 hours 1
Notifications Failed deliveries because the recipient is not home 24 hours 2
Billing Delay in collection; serious only at the monthly close 3 days 2
Reports and back-office management Internal inconvenience 1 week 3

The maximum tolerable downtime is a business figure. Starting from it, technology proposes recovery objectives that sit comfortably below.

A detail that only comes out by talking to the business: route planning does not have a tolerable duration, it has a deadline. A disaster at 04:30 is far more serious than the same disaster at 15:00.

  1. RPO and RTO

The two objectives that define any recovery plan:

  • RPO (Recovery Point Objective): how much data can be lost, measured in time. An RPO of 5 minutes means that, after recovery, at most the last 5 minutes of data may be missing.
  • RTO (Recovery Time Objective): how long it can take to restore service, counted from the disaster.
flowchart LR
    U["Last recoverable data"] -->|"RPO: data lost"| D["Disaster"]
    D -->|"RTO: time without service"| R["Service restored"]

The RPO looks backward and is determined by how often the data is backed up or replicated. The RTO looks forward and is determined by how prepared the alternate site is. They are independent: you can have an RPO of seconds with an RTO of days, if the data is replicated but there is nowhere to run anything.

Both have a cost that grows very fast as they approach zero, so they are set with a calculation, not with a wish.

RouteManager's situation. A nightly backup on the NAS in the same data center:

  • In the event of a failure of db-01: an RPO of up to 24 hours, about 40,000 shipments, and an RTO of many hours spent restoring.
  • In the event of losing the data center: the data and its backups are lost at the same time. There is no RPO or RTO, because there is no recovery.

Calculating the RTO for tier 1. The SLA with the merchants is 99.5% monthly: 0.5% of 720 hours is 3.6 hours. Breaching it means a discount of 5% on the month's invoice: on about €4.2 million, €210,000.

RTO Revenue at risk, at €14,000/h Does it breach the SLA? Total cost of the event
24 hours €336,000 Yes: €210,000 €546,000
4 hours €56,000 Yes: €210,000 €266,000
2 hours €28,000 No; 1.6 hours of margin remain in the month €28,000
30 minutes €7,000 No €7,000

There is a step at 3.6 hours. An RTO of 4 hours, which seemed tolerable to the business, falls on the expensive side. The tier 1 RTO is set at 2 hours.

Calculating the RPO. With 2 creations per second at the peak of a normal day, 5 minutes is 600 shipments; at the peak-season peak, 15,000. They are not lost beyond repair: merchants who use the API retry with their Idempotency-Key, and the courier app keeps its operations. An RPO of zero would require synchronous replication to another site, which adds about 8 ms to every write and means that a link outage stops shipment creation. The RPO is set at 5 minutes.

With that, NFR-14 is no longer pending:

Tier Functions RPO RTO on loss of the data center
1 Shipment creation, delivery with the app, route planning 5 min 2 hours
1 Tracking Rebuildable from the events Not affected by the data center; 8 hours on loss of the cloud region
2 Notifications, billing 5 min 24 hours
3 Reports and back-office management 24 hours 72 hours

Remember that these objectives are for disasters. For the failure of a component, those of ADR-008 still apply: failover in less than 60 seconds and with no data loss.

  1. Backup strategy

Backups are the last line of defense, and the only one against corruption or deletion of the data.

Types of backup

Type What it copies Size and duration What is needed to restore
Full Everything Large and slow Just that backup
Incremental What has changed since the last backup, of whatever type Small and fast The full backup and all the later incrementals, in order
Differential What has changed since the last full backup It grows every day The full backup and the last differential

The usual approach is to combine a periodic full backup with frequent incrementals.

Point-in-time recovery (PITR). Databases write every change to a transaction log. If that log is archived continuously, a backup can be restored and the changes replayed up to whichever second you choose: for example, up to just before an accidental deletion. This is what allows an RPO of minutes with daily backups.

The 3-2-1 rule

  • 3 copies of the data, counting the original.
  • On 2 different media or systems.
  • 1 of them outside the main site.

Today two conditions are added: that one copy be immutable, meaning that nobody, not even an administrator, can modify or delete it for a set period, and that restores be tested. Rutaverde prepared the ground in ADR-011: the rv-backups account is separate from production, and role-backup can only write to it; it cannot read or delete.

Restore tests

A backup that has never been restored is a hypothesis. We learned that with the standby server app-02. Backups fail silently: corrupt files, encryption keys that no longer exist, a procedure known only to someone who has left. That is why the restore is automated and measured: its real duration is a component of the RTO.

Rutaverde's backups

backups:
  - source: db-01
    take_from: db-02
    full: "Sundays 01:00"
    incremental: "daily 01:00"
    transaction_log: "continuous archiving, at most every 60 s"
    destinations:
      - { location: data center NAS, retention_days: 7, use: fast_restore }
      - { location: rv-db-backups, immutable_days: 35, use: disaster }
    retention:
      daily_days: 35
      weekly_weeks: 12
      monthly_months: 12
    encryption: KMS key, replicated to a second EU region
  - source: db-tracking
    method: automatic backups of the managed service
    point_in_time_days: 7
  - source: rv-delivery-photos
    method: versioning and replication to a second EU region
  - source: NAS, labels and old photos
    method: daily sync to rv-nas-backups
restore_test:
  frequency: monthly
  environment: ephemeral, isolated instance in rv-prod
  checks: [row count, date of the last transaction, checksums]
  measure: duration
  • take_from: db-02: the backup is taken from the reporting replica so as not to load the primary, as we worked out in an earlier exercise.
  • The continuous archiving of the transaction log is what provides point-in-time recovery and the RPO of minutes.
  • There are two destinations: the NAS, for restoring quickly after an ordinary failure, and rv-db-backups, outside the data center and immutable for 35 days. Together with the original database, they are the three copies of the rule.
  • The retention of the backups is another period that affects personal data: a piece of data deleted at 12 months is still in a monthly backup. It remains pending legal validation along with the rest.
  • encryption: the backups are encrypted, and that is why the key is as important as the backup. It is replicated to another region.
  • db-tracking needs less: its data can be rebuilt from the monolith's events. This is the advantage of every piece of data having a single owner.
  • The restore_test is done in an environment isolated from production and never in pre-production, which only admits synthetic data. The first one, on the 600 GB of db-01, took 50 minutes to restore and 20 to apply the transaction log: 70 minutes.

  1. Disaster recovery strategies

There are four classic strategies, from the cheapest and slowest to the most expensive and fastest. The cost figures are the ones estimated for Rutaverde's core:

Strategy What is at the alternate site RPO RTO Estimated annual cost
Backup and restore Only the backups From minutes to 24 h, depending on the backups 12 to 24 hours €9,000
Pilot light The data replicated and running; the rest, defined as code but turned off Minutes 1 to 4 hours €29,000
Warm standby A complete copy of the system running at reduced size Seconds or minutes 15 to 30 minutes €95,000
Multi-site active-active Two sites serving traffic at the same time Almost zero Almost zero More than €250,000, and a redesign

The choice comes from comparing the cost of each strategy with what it saves. Let us assume, with Daniel, a 5% annual probability of losing the data center for a day: once every twenty years.

Comparison Difference in annual cost Difference in loss per event Expected loss avoided per year
Pilot light versus backup and restore, with an RTO of 18 h +€20,000 462,000 − 28,000 = €434,000 €21,700
Warm standby versus pilot light +€66,000 28,000 − 7,000 = €21,000 €1,050
  • The step up to pilot light pays for itself with the expected loss alone, and that is without counting what we do not know how to quantify: the customers who would leave after a whole day without service, or a disaster in the middle of peak season.
  • The step up to warm standby is not justified: €66,000 a year to avoid an expected loss of a thousand.
  • Active-active would also require distributing writes between two sites, exactly the complexity we ruled out when designing the data layer.

We choose pilot light. It is the same reasoning as always: the requirement, an RTO of 2 hours and an RPO of 5 minutes, and the simplest option that meets it.

  1. Critical dependencies

A recovery plan almost always fails because of something that was not on the diagram. Before designing it, you go through the dependencies and ask of each one: if it fails during the disaster, can we still recover?

Dependency What happens if it is missing Measure
KMS Without keys, neither the backups nor the encrypted columns can be read Managed service across several zones; keys replicated to a second EU region; emergency access procedure held in custody by Clara
Identity provider Nobody can sign in; the app's 10-minute tokens stop being renewed Managed service with its own redundancy; the public keys are cached for 24 hours; the app's contingency mode, which we will see below
Link between data center and cloud No data is replicated and no events are published Backup VPN tunnel from ADR-008; alert if it is used
SMS and email provider No notifications go out The queue holds them; it is tier 2. A second provider is a contractual decision
Maps provider No geocoding Fallback from ADR-008: shipment with geocoding pending
Accounting ERP Billing is not sent Retry later; tier 2
Managed edge and DNS Nobody gets anywhere Globally distributed service; it is also the point where the origin is switched
Code repository and pipeline The recovery environment cannot be deployed Copy of the repository outside the provider; images already published in image-registry
People Nobody knows how to execute the plan Written, rehearsed runbook, and at least three people able to lead it

Two of these rows deserve attention. The KMS and the identity provider are components we added to protect the platform and which, for that very reason, become dependencies of everything. And the repository: with infrastructure as code, losing the repository means losing the ability to rebuild.

  1. Rutaverde's recovery plan

The design

ADR-002 had already chosen the path: a public cloud in the EU, with a private link. The region where Tracking and Notifications live, with its two zones, will be the recovery site for the core.

flowchart TB
    EDGE["Managed edge: main origin and recovery origin"]
    subgraph DC["Zaragoza data center: main site"]
        MONO["mono-01 to mono-03 and mono-batch-01"]
        DB1["db-01 primary"]
        DB3["db-03 synchronous replica"]
        DB2["db-02 reporting replica"]
        NAS["NAS"]
    end
    subgraph CLOUD["Cloud, EU region: recovery site"]
        DBDR["db-dr: asynchronous replica, always on"]
        DRC["dr-core: monolith defined as code, zero instances"]
        IMG["image-registry: monolith image for every version"]
        TRK["Tracking, Notifications, and event-bus: already in the cloud"]
    end
    subgraph BKP["Account rv-backups"]
        BDB["rv-db-backups: immutable backups"]
        BNAS["rv-nas-backups"]
    end
    EDGE -->|"normal"| MONO
    EDGE -.->|"after failover"| DRC
    MONO --> DB1
    DB1 -->|"synchronous"| DB3
    DB1 -->|"asynchronous"| DB2
    DB1 -->|"asynchronous, over the link"| DBDR
    DB2 -->|"backups and transaction log"| BDB
    NAS -->|"daily"| BNAS
    DRC -.-> DBDR
    IMG -.-> DRC

What is replicated and how:

Item At the recovery site Normal state RPO
Data of db-01 db-dr: asynchronous replica, 16 vCPU / 128 GB, in cloud-data On; alert if the lag exceeds 60 s, SEV1 if it exceeds 5 min Seconds; objective, 5 min
Monolith dr-core: three instances and one batch instance, defined as code Zero instances; the image of every version is published and is started every week in pre-production —
Portal sessions Not replicated — Users sign in again
New photos Already in the cloud, in rv-delivery-photos — —
Labels and old photos on the NAS rv-nas-backups Daily sync 24 h; labels are regenerated
Secrets, keys, and identity Already in managed cloud services — —
Traffic entry point The edge has the recovery origin configured Inactive —
Access to external providers Cloud egress addresses already authorized by maps, SMS, and ERP Verified in every drill —

This is the essence of the pilot light: what cannot be improvised, the data, is always running; what can be created in minutes is turned off, but defined and rehearsed. The size of db-dr is no accident: the pre-production database, with 16 cores, handled 46 creations per second at 41% CPU in the load tests.

The cost fits the €30,000 provision from the previous lesson:

Item Annual cost
db-dr: compute €12,300
db-dr: storage €1,400
Immutable backups, NAS sync, and photo replication €6,800
Network, replication of keys and images €3,000
Capacity reservation for dr-core €2,500
Drills €3,000
Total €29,000

How the failover happens, and who decides

Failover on loss of the data center is not automatic. Failing over by mistake, because of a ten-minute network outage, would cause more damage than waiting. The rule: if the data center is not responding and there is no certainty of recovering it within 30 minutes, declaring the disaster is proposed.

Minute Step Who
0 The data center stops responding —
3 Alert from the synthetic probes; on-call confirms that it is not a component failure On-call
15 The crisis committee is convened Íñigo
30 Decision to declare the disaster Daniel; in his absence, Marta
35 Isolation of the data center: every route toward it is closed at the edge and on the link Operations
45 db-dr is promoted to primary; the last data received is noted Operations
75 The pipeline creates dr-core: three instances and the batch instance Operations
90 The edge switches to the recovery origin Operations
105 Smoke tests: the four synthetic probes On-call
120 Service restored; communication to customers Daniel

Three comments:

  • The decision is a business one. Declaring a disaster has contractual, communication, and cost consequences. It is proposed by whoever knows the technical situation and made by whoever answers for the business. It is one of the cases we said are not automated.
  • Isolation comes before promotion. If the data center reappears with db-01 accepting writes while db-dr is doing so too, there would be two primary databases with different data. Avoiding that is more important than gaining ten minutes.
  • Of the 120 minutes, 30 are spent waiting and deciding. Automation can shorten the execution; the decision will still take its time.

After the failover, the platform runs in the cloud without the usual redundancy. Within the following four hours, a replica of db-dr is created in the second zone. The return to the data center, if the decision is to go back, is planned as a migration, without haste.

And here something important comes into view: the day Rutaverde executes this plan in a drill, it will have shown that the core works in the cloud. The recovery environment is the dress rehearsal for the migration of the core that ADR-002 left pending.

Other scenarios

Scenario Response RPO and RTO
Failure of a component High availability from ADR-008, automatic 0; less than 60 s
Loss of a cloud zone The services continue in the other zone, automatically 0; minutes
Loss of the data center Pilot light, as described 5 min; 2 hours
Loss of the cloud region The monolith keeps running; events wait in the outbox; the edge serves a contingency tracking page. Tracking and Notifications are rebuilt in a second region from the code and reloaded with the events Rebuildable; 8 hours
Deletion or corruption of data Point-in-time recovery from the backups Up to the instant before; about 2 hours
Simultaneous loss of the data center and the region Restore from the immutable backups Outside the objectives; risk accepted by Daniel

  1. The operational continuity plan

During two hours without a system, Rutaverde still has packages to deliver. The continuity plan gives an answer for each group:

Group What they do while there is no system What was prepared in advance
Couriers They keep delivering. The app works in contingency mode: it records deliveries, photos, and locations on the device and sends them when service returns The day's route is downloaded in full at the start of the shift, encrypted on the device. The app stores up to 4 hours of operations and resends them with their idempotency key
Warehouses They load the vehicles using the printed load sheet After planning at 05:00, each warehouse prints the load sheet for each route at 05:30
Dispatch managers If there was no planning, they assign deliveries by the previous day's zones Written procedure and a copy of the usual zones
Merchants The API responds 503 with Retry-After; their systems retry. Small merchants write shipments down and upload them later API documentation with the expected behavior; batch upload in the portal
Recipients They see a contingency page with a clear message Static page served by the edge
Customer support They give information from a prepared script Script and access to the status page

The central piece is the app. NFR-02 asked for it to keep operating for 15 minutes offline, with tunnels and parking garages in mind. For continuity, the design goes further: the app is autonomous for 4 hours, twice the RTO. Token expiration, designed for the normal case, has a controlled exception: operations recorded offline are accepted when resent if the token was valid when they were recorded, and they are flagged for review, like the deliveries of G-02. It is a trade-off between security and continuity that Clara approved and that is recorded in the threat register.

The hardest case is the deadline one: a disaster at 04:30 leaves every city without planning. That is why dr-core includes the batch instance, and that is why the dispatch managers' manual procedure exists: it is worse than the system, and much better than nothing.

  1. Drills and crisis communication

Drills

A plan that is not rehearsed does not work on the day it is needed. Drills come in degrees:

Type What it consists of Frequency at Rutaverde
Restore test Restoring a backup automatically and checking it Monthly
Tabletop drill The committee walks through a scenario on paper: who calls whom, who decides Quarterly
Technical drill in isolation A clone of db-dr is promoted, dr-core is created, and it is tested with synthetic traffic, without touching production. The RTO is measured Twice a year: February and September, the latter together with the failure drill day before peak season
Planned real failover Production runs from the cloud for a few hours, and comes back Yearly, in the low season, starting in the second year

The first technical drill is scheduled for February 2027. Until then, the 2-hour RTO is a design, not a data point. Every drill ends with a blameless review and with corrections to the runbook.

Crisis communication

In a disaster, silence is always interpreted in the worst possible way. Communication is prepared just like the technology:

To whom What When Through which channel Who
Crisis committee Situation and decisions From minute 15 Alternative channel, one that does not depend on the data center Íñigo
Employees and couriers What to do; contingency mode Minute 30 SMS and a notice in the app Operations and dispatch
Merchants What is happening, what works, and when there will be news Minute 30, and then every 30 minutes status.rutaverde.example and email Daniel
Recipients Message on the tracking page Minute 30 Contingency page Customer support
Authorities Notification, if there is a personal data breach Within the legal deadline Official channel Clara and legal counsel

Two design requirements come out of this table. The status page is hosted with an independent provider, outside the data center and the main cloud: it cannot go down with the thing it reports on. And the messages are written in advance, as templates: nobody writes well in the middle of a crisis.

  1. Ransomware as a scenario

Ransomware is an attack that encrypts the victim's data and demands a payment to give it back. We deal with it here because, from the point of view of architecture, it is a disaster with a peculiarity that invalidates several defenses:

Defense Against a fire Against ransomware
Synchronous replica db-03 No use: same building No use: it replicates the encryption instantly
Replica db-dr in the cloud It works No use: it replicates the damage too
Backup on the NAS No use Probably not: it is within the attacker's reach
Immutable backups in rv-backups They work They work: nobody can delete or modify them

A replica protects against the loss of a site; only a backup protects against the loss of integrity. That is why the design of the rv-backups account, with a write-only role and a 35-day lock, was not overzealous.

The design response, without going into the detail of any attack:

  • Rebuild, do not clean. The infrastructure is created again from the code and from signed images, in a clean environment. Immutable instances make this possible.
  • Restore to an earlier point from the immutable backups, with point-in-time recovery.
  • Change all the credentials, which with secrets-store is an operation and not a project.
  • An RPO and an RTO of its own: the objective is 8 hours, and the data lost depends on when the damage began, not on when it was detected. Hence the value of early detection.
  • The non-technical decisions, including notification to the authorities and to those affected, belong to the crisis committee with legal counsel.
# ADR-019: Recovery objectives by tier and disaster recovery with a pilot light in the cloud

Status: Accepted
Date: 2026-11-26
Participants: Daniel (business), Íñigo (operations), Marta (architecture), Clara (security)

## Context
The Zaragoza data center is a single site, and the only backup of the
database is in the same building. NFR-14 was undefined. The impact
analysis sets a maximum tolerable downtime of 4 hours for the tier 1
functions; the SLA is breached beyond 3.6 hours a month.

## Options considered
A. Backup and restore: €9,000 a year; RTO of 12 to 24 hours.
B. Pilot light in the cloud: €29,000 a year; RTO of 2 hours.
C. Warm standby: €95,000 a year; RTO of 30 minutes.
D. Multi-site active-active: more than €250,000 a year and a redesign.

## Decision
We will adopt option B. NFR-14 now reads: tier 1, RPO of 5 minutes and
RTO of 2 hours on loss of the data center; tier 2, 5 minutes and 24
hours; tier 3, 24 hours and 72 hours; Tracking, 8 hours on loss of the
region. Asynchronous replica db-dr in the cloud; monolith defined as
code in dr-core, with zero instances. Weekly full backups, daily
incrementals, and continuous archiving of the transaction log, with a
local backup on the NAS and a 35-day immutable backup in rv-backups.
Restore tested every month. Failover is manual: operations proposes it
and the business decides. The courier app operates for 4 hours without
service. Quarterly tabletop drill, technical drill twice a year, and
yearly real failover from the second year.

## Security
Data affected: all the core data, which now has a replica in the
cloud (Personal). New boundary: db-01 to db-dr.
Requires threat modeling: yes.
Risks accepted by Daniel and Clara: simultaneous loss of the data
center and the region; acceptance of operations recorded offline with
an expired token, flagged for review.

## Consequences
Positive: the risk left open in ADR-008 is closed; NFR-14 defined; the
recovery environment rehearses the migration of the core.
Negative: €29,000 a year; one more runbook to maintain and rehearse.
Risks: the RTO is not measured until the first technical drill, in
February 2027.

  1. Module review: the status of the requirements

We started the module with a table of requirements met "on paper." This is where each one stands. We distinguish four statuses: validated with measurements in pre-production; designed, with a decision that addresses it, but not demonstrated; partial; and pending. None can be said to be met in production, because the platform is not yet in production.

Id Requirement Status after Module 4 Evidence or decision
NFR-01 Shipment creation and tracking at 99.9% Designed and measurable Estimate of 99.94%; SLO with burn-rate alerts. ADR-008, ADR-015
NFR-02 Delivery at 99.9% from 06:00 to 22:00; app 15 min offline Designed The app is autonomous for 4 hours. ADR-019
NFR-03 Billing, reports, and back office at 99.5% Designed No redundancy of its own, accepted. ADR-004, ADR-006
NFR-04 Shipments API: p95 < 300 ms and p99 < 1 s Validated in pre-production p95 of 240 ms and p99 of 610 ms at 12 creations/s per instance. ADR-017
NFR-05 Tracking page: p95 < 500 ms Validated in pre-production 70 ms at the peak; 180 ms without the cache. ADR-017
NFR-06 200,000 shipments a day Validated in pre-production Three instances; with one down, 24.2 creations/s against 9. ADR-017
NFR-07 Peaks of 50 creations/s and 250 queries/s Validated with an adjustment Six instances in peak season rather than five; outbox publisher fixed. ADR-017
NFR-08 Capacity in under 10 min and without downtime Partial In the cloud, 3 min 40 s, measured. In the data center, scheduled power-on
NFR-09 Encryption, least privilege, and GDPR Designed Preventive controls from Module 3 and detective controls from ADR-015. Legal validation of the retention periods pending
NFR-10 Weekly deployment with no downtime Designed Pipeline with a canary and rollback in less than 10 min. ADR-016
NFR-11 Automatic detection in under 5 min Designed, verified by calculation 3 min for a total outage; 4 min for a severe degradation. ADR-015
NFR-12 Infrastructure ≤ €0.02 per shipment Not met at the current volume; clarified €0.039 today; it is met from about 82,000 shipments a day. Ceiling of €600,000 a year. ADR-018
NFR-13 Standard formats; nothing exclusive without a decision Designed OpenTelemetry, OCI images, PostgreSQL, AMQP. Provider not chosen
NFR-14 Recovery Defined and designed Tier 1: RPO of 5 min and RTO of 2 h. Pending the first drill. ADR-019

Three takeaways, with the frankness of the earlier closings:

  • Four requirements have measurements behind them, and one of them changed the design. That is the difference between this module and the previous two.
  • One is not met, and we know it. NFR-12 has been clarified with the business instead of being waved through.
  • Almost everything is still a design. It is decided, measured where it could be, and ready to be operated. It is not built in production.

Common Mistakes and Tips

  • Confusing a replica with a backup. The replica propagates errors just as efficiently as data.
  • Keeping the backups next to the original, or within reach of the same credentials.
  • Not testing restores. You discover that the backup is no good on the day you need it.
  • Setting the RPO and the RTO from technology. They are business decisions, with a cost that technology must explain.
  • Asking for an RPO and RTO of zero for everything. Classifying by tier is what makes the plan affordable.
  • Forgetting the dependencies: keys, identity, DNS, repository, and people.
  • Failing over automatically between sites without first having resolved the risk of two primaries.
  • A plan that only one person knows how to execute.
  • Recovering the systems and forgetting the people who work with them. Continuity is more than technology.
  • Hosting the status page on the platform it reports on.
  • Tip: for every important piece of data, answer three questions: where its farthest copy is, who could delete it, and when it was last restored successfully.

Exercises

Exercise 1

For each situation, indicate whether it is resolved by high availability, the disaster recovery plan, or the continuity plan, and with which of Rutaverde's mechanisms:

  1. The power supply of db-01 fails.
  2. A developer mistakenly runs a statement that deletes Valencia's shipments from the last week.
  3. A flood leaves the data center without electricity for two days.
  4. A snowstorm prevents half of Madrid's couriers from reaching the warehouse.
  5. Zone A of the cloud becomes unreachable.

Exercise 2

A large merchant proposes to Rutaverde a contract with an SLA of 99.9% monthly for shipment creation.

  1. How much unavailability does that SLA allow per month?
  2. Is it compatible with the 2-hour RTO of ADR-019?
  3. What recovery strategy would be needed, and what would you tell Daniel?

Exercise 3

The first technical drill gives these times: decision, 30 min; isolation, 5 min; promotion of db-dr, 12 min; creation of dr-core, 55 min, because the monolith image was slow to download and two instances did not start on the first attempt because of a missing secret; edge switchover, 15 min; tests, 20 min.

  1. What is the measured RTO? Does it meet the objective?
  2. Where would you act first, and how?
  3. What does this result say about the value of drills?

Solutions

Solution 1

  1. High availability. db-03 takes over as primary in less than 60 seconds, with no data loss.
  2. Recovery, even though there is no physical disaster. The replicas have already replicated the deletion. Point-in-time recovery is used: a restore is done on a separate instance up to the instant before the statement, and the deleted data is copied back. Besides, the shipments_app user should not be used by hand: it is a case for reviewing manual access to production.
  3. Disaster recovery: declaration by Daniel and failover to the cloud with the pilot light. And continuity while it lasts: the app's contingency mode and printed load sheets.
  4. Business continuity. No system has failed. It is resolved by the operating procedures: reassigning routes, notifying merchants and recipients. It is a reminder that continuity is not a matter of technology alone.
  5. High availability. The cloud services are spread across two zones and zone B keeps serving. If db-dr is in zone A, the platform is temporarily left without a recovery replica: the lag alert must fire, and recreating it in zone B should be considered.

Solution 2

  1. 0.1% of 720 hours = 0.72 hours: 43.2 minutes a month.
  2. No. A single failover on loss of the data center uses up 120 minutes, almost three times what is allowed.
  3. At a minimum, warm standby would be needed, with an RTO of 15 to 30 minutes, and even then a single disaster would use up almost the whole month's margin; to truly guarantee it, active-active. That is €95,000 a year, or more than €250,000 with a redesign, against the current €29,000. It is put to Daniel as a business decision with three ways out: reject that clause; accept it while expressly excluding declared disasters, which is the usual approach; or accept it as is and pass the cost of the higher strategy on in the price. What must not be done is to sign it with the current architecture: 99.9% is the internal SLO precisely in order to have margin over the contractual 99.5%.

Solution 3

  1. 30 + 5 + 12 + 55 + 15 + 20 = 137 minutes. It does not meet the objective of 120.
  2. On the creation of dr-core, which takes 55 minutes against the 30 planned, and for two different reasons. The slow download is solved by keeping the image of the current version already available in the recovery environment. The missing secret is more serious: it indicates that the recovery environment is not deployed with the same code as the rest, or that the weekly startup in pre-production does not use the recovery secrets. It is corrected by including dr-core in the pipeline with a weekly check that all its secrets exist. After that, you would look at the edge switchover, at 15 minutes, which should be a matter of a few. The decision, at 30 minutes, is left alone: shortening it increases the risk of failing over unnecessarily.
  3. That the plan, on paper, met the objective; and that it failed because of a missing secret, something no diagram shows. Without the drill, the failure would have appeared during a real disaster. It is the same lesson as the load tests and the outbox publisher: what is not tested is a hypothesis.

Conclusion

High availability protects against the failure of a piece; disaster recovery, against the loss of a site or of the data; business continuity, against any interruption, and it includes people and processes. We started from the impact analysis, done with whoever knows the business, to set two objectives with a calculation and not with a wish: the RPO, how much data can be lost, and the RTO, how long it can take. We have seen that backups are the only defense against data corruption, that they must be off-site, be immutable, and actually be restored, and that recovery strategies range from backup and restore to active-active with a cost that multiplies at every step.

For Rutaverde, ADR-019 finally defines NFR-14: five minutes and two hours for the critical functions, with a pilot light in the cloud that keeps the data replicated in db-dr and the monolith defined as code, waiting. The failover is decided by Daniel, not by a machine. While it lasts, the courier app works on its own for four hours and the warehouses load with printed sheets. The immutable backups in rv-backups are the answer to ransomware, and a calendar of drills will turn the plan into a data point starting in February 2027.

This lesson brings Module 4 to an end. We started it with a platform that scaled and was secure only on paper, and with Íñigo asking the questions of someone who will have to operate it. Six decisions have answered them. ADR-014 set the criteria for sizing. ADR-015 gave the platform eyes and gave every alert an owner. ADR-016 replaced 37 manual steps with a pipeline. ADR-017 put the hypotheses to the test and corrected two: six instances are needed rather than five, and a publisher nobody had drawn would have clogged tracking in the middle of peak season. ADR-018 did the sum and took an uncomfortable number to the business instead of dressing it up. ADR-019 resolved the last open risk. The Rutaverde platform is designed, measured, and ready to be operated.

What it is not is built, and the reason is no longer technical. Go back over what we have been leaving for later: who chooses the cloud provider, who validates the retention periods, when and how the core is migrated, who checks that the ADRs are followed, in what order all this gets built with 22 developers who also have to keep maintaining RouteManager, and what is done in the meantime with a ten-year-old monolith and an unsupported Java runtime. None of those questions is answered with a diagram. They are answered with an organizational framework: who decides and under what rules, how a transformation program is planned and executed, how an architecture is documented and communicated so that it is understood by those who must build it and those who must pay for it, how it is evaluated and improved continuously, and how the debt of the legacy system is managed. In Module 5, Marta and Daniel move to the foreground: from designing the architecture we move on to governing it.

© Copyright 2026. All rights reserved