Engineering trade-offs
Two good designs, one decision. Turn "it depends" into numbers, price every option all in, let hard requirements remove options, and match the effort to how hard the decision is to undo.
The lesson in text
Click a paragraph to hear it.01Two good designs
Tuesday morning. StayHub's booking path runs in one cloud region, Frankfurt, spread over three availability zones: separate data centres, a few kilometres apart.
Karim, the CTO, wants a full second region for the whole platform by summer. It adds €29,000 a month. His reason: a region outage would stop every booking.
Omar, who runs on-call, wants nothing new. A second region doubles what can break at three in the morning. He'd rather keep fewer moving parts.
Both designs carry the traffic. Both people are careful, about different things. So which one is right? That's what senior engineering mostly is: choosing well between two good options.
02It depends, on what?
A trade-off means every option buys something by giving something else up. More resilience costs money and complexity. Less complexity costs resilience. No option wins on everything.
So the honest answer is often: it depends. But "it depends" only helps if you can say on what. On the cost of an hour without bookings. On what a contract requires. On the team's time.
Here's a method for every big choice. The problem. The requirements, in numbers. The constraints. The options. What each one gives up. And the decision, written down.
| Step | For the booking path |
|---|---|
| 1. Problem | A region outage stops bookings for hours (not "we need a second region": that's a solution) |
| 2. Requirements, in numbers | An hour of downtime costs ~€20,000; a partner needs tested recovery within 1 hour; no lost bookings; data stays in the EU |
| 3. Constraints | One on-call team, already busy; writing in two regions risks selling a room twice |
| 4. Options | Stay as we are · warm standby for the booking path · whole platform active-active |
| 5. What each gives up | Money, complexity, recovery time, drills |
| 6. Decision, written down | An ADR with the numbers and a "revisit when" trigger |
Start with the problem, not a solution. Saying "we need a second region" is already an answer. The problem is: a region outage stops bookings for hours. Said that way, cheaper answers can enter the room.
03A second region is insurance
Think of a second region as insurance. The monthly cost is the premium. You pay it every month, and most months, nothing happens.
You don't buy insurance because disasters are scary. You buy it when the loss you expect is bigger than the premium, or when there's a loss you simply can't afford.
The expected loss is how often the bad thing happens, times what it costs when it does. That's a number you can compare with an invoice.
And one more check that people forget: does the policy actually pay out? A policy you've never tested is just a monthly bill.
04Price the risk
So what does an hour without bookings cost? StayHub takes about 100,000 bookings a day, and earns about €4.70 of commission on each. That's €470,000 a day, about €20,000 an hour.
How often does a whole region fail? About once every two years, for about eight hours. That's four hours a year, on average.
Four hours times €20,000: the expected loss is about €80,000 a year. Karim's full second region costs €348,000 a year. On downtime alone, the premium is more than four times the loss it prevents.
~100,000 bookings a day × ~€4.70 commission= €470,000 a day ≈ €20,000 an hourOne ~8-hour region outage every 2 years= 4 hours a year on average4 hours × €20,000≈ €80,000 a year of expected lossFull second region: €29,000 × 12= €348,000 a year of premiumNotice what just happened. Nobody said Karim was wrong to worry. We just put both sides of the argument in the same unit.
05Three options, priced all in
Now three options, each priced all in: what you pay, plus the outages you still expect. Option one: stay as we are. No extra cost, about €80,000 a year of expected downtime. The cheapest, on paper.
Option two: a warm standby, a copy of the booking path in a second region, kept up to date and ready to take over in about thirty minutes. €9,000 a month, plus about €5,000 of expected downtime: about €113,000 a year.
Option three, Karim's: active-active, the whole platform running in both regions at once. Recovery in minutes, about €350,000 a year. And writing bookings in two places at once adds a new risk: the same room sold twice.
| Option | Extra cost / year | Recovery | Expected downtime / year | All in / year | Recovery ≤ 1 h? |
|---|---|---|---|---|---|
| 1. Stay as we are | €0 | ~8 h | ~€80,000 | ~€80,000 | No |
| 2. Warm standby, booking path only | €108,000 | ~30 min | ~€5,000 | ~€113,000 | Yes |
| 3. Active-active, whole platform | €348,000 | minutes | ~€2,500 | ~€350,000 | Yes |
Put side by side, option three costs about €240,000 a year more than option two, to save about €2,500 of downtime. That's an expensive way to buy a few minutes.
06The requirement you can't trade
So should we stay as we are? Not so fast. A corporate travel company, worth about €1.2 million a year in commission, requires a tested recovery plan: back up within one hour.
Option one recovers in about eight hours. It fails that requirement, so it's out, before any price comparison. A hard requirement isn't a cost you trade. It removes options.
Options two and three both pass. Option two passes for a third of the price. Compared with option one, it costs about €33,000 a year more, to keep a partner worth €1.2 million. That's the decision.
And why only the booking path? Because downtime doesn't cost the same everywhere. An hour without search or the marketing site costs far less. You buy resilience where failure is expensive. Karim was right about the risk. Omar was right not to add it everywhere.
07The standby nobody tested
Omar has a story for anyone who thinks resilience is something you buy. Two years ago, StayHub paid for a standby payments database. Then, one Sunday, the main database died.
The copy that was supposed to stay up to date had stopped copying six weeks earlier. Nobody noticed. The step-by-step guide for switching over, the runbook, pointed at servers that had been deleted.
Switching took three hours. Then the team had to rebuild six weeks of missing payments by hand. StayHub had paid the premium every month, and the policy didn't pay out.
The fix is part of the price. An alert when the copy falls behind. A failover drill every quarter: switch over on purpose, on a calm day. And a runbook that the drill exercises, so it can't go stale.
- · The copy had stopped copying six weeks earlier; nobody noticed
- · The runbook pointed at deleted servers
- · Nobody had ever switched over
- · 3 hours down, then six weeks of payments rebuilt by hand
- · An alert when the copy falls behind
- · A failover drill every quarter, on a calm day
- · A runbook the drill exercises, so it stays true
- · The drills counted in the option's cost
So when you price option two, the drills are in it. If you can't afford the drills, you can't really afford the standby. You've only bought the invoice.
08One-way and two-way doors
Not every decision deserves this much work. Ask one question: how hard is it to undo? A second region, your main database, where data must live: those are one-way doors. Expensive to walk back through.
A feature-flag tool or a log format is a two-way door. If it's wrong, you switch. Omar wanted three weeks of analysis for those two. Maya wanted a pick that afternoon. Here, Maya was right.
| Decision | Door | Effort |
|---|---|---|
| A second region | One-way: expensive to undo | The full method, a second opinion, an ADR |
| The main database, where data must live | One-way | The full method, an ADR |
| A feature-flag tool | Two-way: switch if wrong | Decide this week; a short note of why |
| A log format | Two-way | Decide this week |
ADR-041 Warm standby region for the booking patharchitecture decision recordContext · options rejected · decision+€9,000 a month; recovery ~30 min; meets the partner's ≤ 1 hConsequencesreplication to watch; quarterly drills; the rest stays in one regionRevisit whenAsia > 30% of bookings, or downtime > €40,000 an hourFor one-way doors, write the decision down in an ADR, an architecture decision record: the context, the options you rejected, what you're giving up, and when to revisit.
For the standby, the trigger was written into the record: revisit if Asia passes 30% of bookings, or if an hour of downtime starts costing more than €40,000. In a year, someone will ask why. The record answers.
09Your job as lead
Claude Code can do the legwork of a decision. Ask it for a document, not code: compare the three options with our numbers, price each one all in, and mark every number it had to assume.
Watch for red flags. "Best practice" or "industry standard" with no numbers. A comparison of invoices only, with no downtime and no team time. A standby with no drill in the plan. Or infrastructure code written before the decision is made.
And ask three questions of every option. What does it give up? Which hard requirement does it fail? How will we test that it works?
Let's recap. Every option gives something up; say what it depends on, in numbers. Price options all in, like insurance: premium against expected loss. Hard requirements remove options. Test what you buy. And spend your effort on one-way doors. Next lesson: the hub that syncs rooms from ten thousand hotels wants €45,000 more a month. An engineer has a weekend prototype, and Karim asks why we pay anyone.
Check yourself
0/10 answered1Two architectures both carry the traffic. One adds €29,000 a month, the other adds nothing. How do you choose?
2Which is a problem statement, rather than a solution in disguise?
3A region fails about once every two years for about eight hours, and an hour without bookings costs about €20,000. What's the expected loss per year?
4Why isn't option one (stay single-region, ~€80,000 a year all in) the decision, even though it's the cheapest?
5Option three costs about €240,000 a year more than option two and saves about €2,500 of expected downtime. What does that tell you?
6Why put the standby on the booking path only?
7StayHub paid for a standby payments database, but the switch took three hours. What was missing?
8Omar wants three weeks of analysis before choosing a feature-flag tool. What do you say?
9Claude Code's draft decision says: "Active-active for the whole platform: it's the industry standard for platforms our size." What do you ask for?
10What belongs in the ADR for the standby decision?
Save your progress — create a free account
Free. No card. Your finished lessons follow you to any device, and you can ask questions in the community.
Create my free accountEvery lesson is free while we build. Lock in €9/month for later.
The first 100 members keep the founding price for as long as they stay. Reserving is free: no card, nothing is charged.
See the founding offer