LESSON 06 · Hard to undo

Reversible decisions and changing your mind

Spend early effort on what is hard to undo, and write down the evidence that would change the rest.

SYSTEM VIEW

The decision

Diagram view
Hard to undo—
Headroom—
Start fix by—

Watch which changes to the B2B app stay cheap to undo, which three bind you, and when to start a fix.

  1. Behind App server, Database moves to a larger machine and Cache comes in; Message broker could take the jobs later. App server answers as before. Each change is mostly internal, so it can usually happen later with little damage: decide these quickly.

    Larger machine
    move later
    Cache
    add later
    Job table → broker
    swap later

    What changed

    • Database on a larger machine
    • Cache
    • Broker left for later
  2. App server adds a customer ID to every row of Database after the fact, so every table needs a backfill and every query an audit. History you never recorded can’t be recreated. The data model is the first thing hard to undo.

    Added later
    customer ID, every row
    Costs
    backfill + audit
    Never recorded
    can’t be recreated

    What changed

    • Customer ID on every row
    • Backfill every table
    • Audit every query
  3. Customer system is built on webhook v1, which App server sends. Once customers integrate, any change needs versioning and a deprecation period, and even undocumented behavior gets depended on. A public API is the second thing hard to undo.

    Contract
    webhook v1
    A change needs
    versioning + deprecation
    Depended on
    undocumented behavior

    What changed

    • Customer system
    • Webhook v1, a contract
    • 2 of 3 hard to undo
  4. CRM arrives and also writes customer addresses. App server saves 1 Main St to Database while CRM records 9 Elm St, so the two systems disagree about one customer. Data ownership is the third thing hard to undo.

    Database
    1 Main St
    CRM
    9 Elm St

    What changed

    • CRM, a second writer
    • 1 Main St against 9 Elm St
    • 3 of 3 hard to undo
  5. App server becomes the one source of truth for addresses. CRM stops writing its own and reads the address from App server instead, so both show 1 Main St and can’t drift apart again.

    Owner
    App server
    CRM
    reads, never writes

    What changed

    • App server owns addresses
    • CRM reads, no longer writes
    • Both show 1 Main St
  6. Jobs stay in a job table in Database, and Message broker waits on written evidence: “Revisit if job queries exceed 20% of database time, or if jobs wait over a minute during normal use for a week.” The thresholds are yours to choose.

    Use
    a job table
    Revisit if
    job queries > 20% of DB time
    Or if
    jobs wait > 1 min for a week

    What changed

    • Job table in Database
    • Written revisit trigger
    • Broker waits for the trigger
  7. A load test shows Database handles 2 times today’s peak, so its meter starts half full. Load grows 10% a month, and since 1.1 to the 7th power is about 1.95, the meter nearly tops out: the headroom lasts about 7 months.

    Load test
    2× today’s peak
    Growth
    10% a month
    1.1⁷
    ≈ 1.95

    What changed

    • Load 1× → 1.95× of today
    • Headroom: about 7 months
  8. Reversible doesn’t mean free: fixes have lead time. With about 7 months of headroom and a fix that takes 4, start by about month 3, where Database’s meter now stands. A signed contract requiring something is evidence too: build it now.

    Headroom lasts
    ≈ 7 months
    Fix takes
    4 months
    Signed contract
    evidence: build now

    What changed

    • Fix starts by month 3
    • Ready by month 7

Space plays · ← → step · Home resets

THE IDEA

How it works

Not every decision deserves the same care. Adding a cache, swapping a job table for a broker, or moving to a larger machine can usually happen later with little damage, because the change is mostly internal. Put early effort into what is expensive to undo, and decide the rest quickly.

Three categories are hard to undo. The data model: adding a customer ID to every row later means backfilling every table and auditing every query, and history you never recorded cannot be recreated. Public APIs: once customers integrate, a change needs versioning and a deprecation period, and even undocumented behavior gets depended on. Data ownership: if two systems both write a customer’s address, they can end up disagreeing, so name one source of truth for each kind of data.

For each decision you defer, write down the evidence that would change your mind, which keeps “keep it simple” from becoming a slogan. As an example: “Use a job table. Revisit if job queries exceed 20% of database time, or if jobs wait over a minute during normal use for a week.” The thresholds are yours to choose; what matters is that someone can check them.

Reversible does not mean free, because fixes have lead time. Suppose a load test shows headroom of 2 times your current peak, and load grows 10% a month. Since 1.1 to the 7th power is about 1.95, that headroom lasts about 7 months. If the fix takes 4 months, start by about month 3. A signed contract requiring something is evidence too: build it now.

DECISION POINT

You have two weeks before a pilot of a new billing product. The open questions are: job table or broker, which hosting platform, a customer ID on every table, and the format of the webhooks customers will consume. Where do you spend your time?

Write a sentence or two to unlock the guidance. Committing first is what makes it stick.

Keep in mind

  • Spend early effort on the data model, public APIs, and data ownership.
  • Record the evidence that would make you revisit each deferred decision.
  • Allow for lead time: start a fix before the headroom runs out.
CHECK YOUR UNDERSTANDING

Put it into practice.

1 OF 3
ApplyQUESTION 01

You are starting a new B2B product this week. Which choice deserves the most care now?

Choose an answer. You’ll see the explanation once you get it right.

Design invoicing software for 500 small businesses

Size an ordinary B2B product honestly, keep the design as small as the numbers allow, then see which new demand actually changes it.

The brief

Small businesses use your product to create invoices, email them as PDFs, record payments, and see what is overdue. You have 500 customers and a team of 3 engineers, with no dedicated operations staff. Card processing, tax calculation across countries, and a public API are outside this exercise.

  • Each customer has 4 staff users. On a working day half of all users are active, and each causes 100 requests within an 8-hour day. Peak is 3 times that day’s average.
  • Each customer issues 200 invoices a month. Half of all invoices go out in the last 2 working days of the month, 8 hours each.
  • An invoice is about 5 KB of database rows plus a 200 KB PDF, and rendering a PDF takes 2 CPU-seconds. Use decimal units. Keep invoices for 7 years.
  • Targets: 99.9% availability in a 30-day month, an RPO of 5 minutes, and an RTO of 30 minutes. Assume a database restores at 100 MB/s. Nobody is paged overnight, so a night-time failure must recover on its own.
  • An issued invoice is a financial record. Corrections happen through a new document, such as a credit note, and never by editing the old one.

Reading a design isn’t the same as producing one under a clock. Try it timed: the requirement change stays hidden until partway through.

Loading your draft…

State your scope and assumptions. Estimate peak requests per second, month-end invoice and PDF-rendering rates, and 7-year storage for rows and PDFs. Say which number, if any, could actually hurt you.

0 / 4,000 characters

Name the fewest components you can defend and what each stores or does. Trace issuing one invoice from the click to the emailed PDF. Note the data-model decisions that would be hard to undo.

0 / 4,000 characters

Explain how you meet the RPO and RTO, and check them against the 99.9% budget. Say what happens if a worker crashes mid-render, and how you know your backups work.

0 / 4,000 characters

Respond to the large customer below. Size the 2-hour run first, then say what you would change for capacity and for the audit record, and name one cost of your choice.

The requirement changesA large customer signs on. It will issue 30,000 invoices in one run on the last working day of each month, all of them out within 2 hours. Its auditors also require a record of who created or changed each invoice, when, and what changed, kept for 7 years, with evidence that the record was not edited afterward. Size the run, decide what has to change, and say which demand would have been harder to add late.

0 / 4,000 characters

Write an initial response in all four sections to unlock the checklist and two worked approaches.

Next chapter: Storage Engines

0 of 3 checkpoints answered correctly to complete this lesson.