The senior engineer's craft · L2Making architecture trade-offs

Making architecture trade-offs

There is no best architecture, only choices with different costs. Learn how seniors compare options, match the effort to the risk, and write down what they gave up.

L2 SeniorThe senior engineer's craft18 min read
Fact-checked by AI against cited sources · Human review pendingLast reviewed 21 Oct 2026 · How we check content
Senior at work · lesson 23 of 26
Section 1 of 8

What broke

A made-up story to show a common failure. Not about a real company.

This story is made up, but many teams will know it.

A team of four builds a new booking service. In the kickoff, someone says, "Let's do it properly." They choose six microservices, a self-hosted Kafka cluster and a new database nobody on the team has used. Each tool is good. Each one wins a blog post comparison.

The product launches with 300 bookings a day. One Postgres database could hold that many easily. But now the team runs nine separate systems. On-call pages come at night for problems nobody understands. A small feature touches four services and takes three weeks.

A year later, the team spends a full quarter moving back to one service and one database. Nobody wrote down why they chose the first design, so nobody could say when it stopped making sense.

The team did not pick bad tools. They picked tools for a problem they did not have, and they never wrote down what those tools would cost them.

Section 2 of 8

The idea in simple words

There is no best architecture. Every choice makes some things easier and other things harder. A senior's job is to see both sides, choose on purpose, and say out loud what you give up.

The AWS Well-Architected Framework names six areas: operational excellence, security, reliability, performance efficiency, cost optimization and sustainability. It says you trade between them based on your business context. For example, you might accept lower reliability in a development environment to save cost. For a critical system, you might pay more for reliability. AWS adds that security and operational excellence are usually not traded away. 5

The key idea. A good decision is not one with no downsides. It is one where you chose the downsides on purpose, matched the effort to the risk, and wrote it down so others can follow, or change it later.

Not every decision deserves the same effort. Jeff Bezos split decisions into two kinds. Some are one-way doors: hard or impossible to undo, so you decide slowly and carefully. Most are two-way doors: if you are wrong, you can go back. Those should be made quickly, by a person or a small group with good judgement. 1 He warns that big organisations tend to use the slow process for everything. The result is slowness, too much fear of risk and too little experimenting. 1

Section 3 of 8

How it works

Step 1: Requirements and constraints first

Start with the problem, not the tool. Write down the numbers that matter: load, data size, latency target and budget. Then write the constraints. Who will run this at 3 a.m.? What does the team already know? What must it connect to? Do not skip this step and compare tools in general.

Step 2: Ask how hard it is to undo

Martin Fowler offers one way to think of architecture: the things people see as hard to change. 4 He writes that one of an architect's most important tasks is to find ways to remove irreversibility from a design. 4 His example: on one of his projects, a database administrator built a way to change the schema and move the data easily. After that, Fowler says, the schema was no longer architectural. 4

So for each option, ask: if this is wrong in a year, what does leaving cost? A library behind your own interface is cheap to replace. A public API, a data format stored in millions of rows, or a database choice usually is not.

Bezos also gives a rule for speed: most decisions should be made with about 70% of the information you wish you had. If you wait for 90%, in most cases you are probably being slow. Either way, you need to be good at quickly noticing and fixing bad decisions. 2

Step 3: Count the cost of running it

Dan McKinley's essay "Choose Boring Technology" gives a simple model. Each company gets about three "innovation tokens". Choosing a new or unusual technology spends one. His example is writing your website in NodeJS. 3 Boring does not mean bad. His examples of boring tools include MySQL, Postgres, Python and cron. Their strength is that their failure modes are well understood. 3

He also points to the hidden cost of each new tool: operations. You have to monitor it, test it and learn it. 3 The long-term cost of keeping a system working almost always far exceeds the trouble of building it. 3 His practical test: first ask how you would solve the problem with no new technology at all. 3

Step 4: Compare options in a small table

Step through how a team turns options into a written decision. Use Next and Back, or the ← and → keys.

From options to a written decision with a revisit trigger1 · OptionsA Postgres table · B managed queue · C Kafka 2 · Criteriafits load · team knows it · ops work · undo 3 · Example scores (0 to 3 each)A = 11 · B = 10 · C = 6C is strong on load, weak on everything else 4 · Decision: A, for nowa two-way door · cheap to leave 5 · ADR-021 in the repocontext · decision · what we give up 6 · Revisit when…over 1,000 jobs/s, or the main DB slows SeniorPath
  1. This example is made up. A team of three needs a job queue for about 200 jobs a second. They write down three real options.
  2. Before they score anything, they agree what matters: does it handle the load, does the team know it, how much work it is to run, and how easy it is to undo.
  3. These scores are only an example. Each option gets 0 to 3 points per criterion. The table is a tool for talking, not a machine that decides. C wins on load but loses on everything the team must live with.
  4. They choose A, a table in the Postgres database they already run. It is easy to move away from later, so they decide fast.
  5. They write a one-page ADR. It says what they chose, why, and what they give up: A will not grow forever.
  6. The ADR names a clear signal to look again: more than 1,000 jobs a second, or the queue slowing the main database. Then they compare A and B again.
Step 1 of 6

A decision table is useful because it forces you to agree on what matters before you argue about tools. But do not trust the total blindly. If one option scores 0 on something you must have, such as security, it is out, whatever its total. Treat the scores as a way to start a conversation, not to end it.

Step 5: Build or buy

Fowler splits software into two kinds. "Utility" software, like payroll, must work reliably, but it does not set you apart. "Strategic" software is part of why customers choose you. 6 For utility functions, the obvious choice is to buy a package. For strategic functions, you do not want the same software as your competitors. 6 He adds that only a few projects are truly strategic. He suggests the split may be more like 95 to 5. 6 The lesson build vs buy vs open source goes deeper.

Step 6: Decide, write it down, and plan to look again

When people still disagree, Bezos suggests the phrase "disagree and commit". In his words, you ask: "I know we disagree on this but will you gamble with me on it?" He says bosses should do this too. 2

Then write the decision down. For a big change, write a design doc. For one decision, write an ADR. Michael Nygard's format has a title, context, decision, status and consequences. Consequences should list all the effects, not only the good ones. 7

Good ADRs make it clear when to revisit. Nygard says the time to change an old decision becomes clear from changes in the project's context. 7 Help that happen. Write a revisit trigger, such as "if load passes 1,000 jobs a second". When you reverse a decision, keep the old ADR and mark it as superseded, which means replaced by a newer decision. 7

Section 4 of 8

Trade-offs

ApproachGood forRiskUse it when
Decide fast, small groupSpeed and learning.You may need to undo it.Two-way doors: easy and cheap to reverse.
Slow, careful reviewFewer costly mistakes.Slowness if used for everything.One-way doors: data formats, public APIs, core databases.
Boring, well-known techKnown failure modes. Easy to hire for and run.May need more effort for a special need.Most of your system, most of the time.
New, exciting techA real edge for one hard problem.Unknown failures. Spends an innovation token.The problem is core to your business and old tools truly cannot solve it.
Buy a productFast start. Someone else runs it.Licence cost, lock-in, less control.Utility functions that do not set you apart.
Build your ownFull control over a key feature.You own every bug and every on-call page.Strategic functions that customers choose you for.
Section 5 of 8

At work: how a senior uses this

  • Before you compare tools, write the problem, the numbers and the constraints in five lines.
  • Always show at least two real options. One of them should be "use what we already have".
  • Ask: "Is this a one-way or a two-way door?" Match the review effort to the answer.
  • Name the cost of running each option: who is on call, what to monitor, what the team must learn.
  • Say what you give up, in writing. "We accept X to get Y."
  • Write a revisit trigger with a number or a date, not "if things change".
  • When you lose an argument, disagree and commit. Then help the decision work.
  • When you join a team, read the ADRs before you suggest a rewrite. The reason may still be valid.
Section 6 of 8

With AI

What to ask the agent

"Here are our requirements, team size and current stack. Give me three real options for this job queue, including 'use what we already have'. For each, list the cost of running it, the hardest thing to undo, and the main failure mode."

"Act as a skeptical staff engineer. Argue against my preferred option. What will hurt in a year?"

"Turn this decision into an ADR with title, context, decision, status and consequences. Include the negative consequences and a revisit trigger."

"Is this decision a one-way door or a two-way door? List what would make it hard to reverse."

What to check yourself

  • The requirements and numbers are yours. The agent does not know your real load or budget.
  • The options are real. Agents tend to suggest popular tools, even when you do not need them.
  • Every claim about a tool's limits or price comes from its official docs, not the agent's memory.
  • The team's skills and on-call load are in the decision. The agent cannot see who will be paged at night.
  • The decision is yours. You can defend it in review without the agent.
Section 7 of 8

Check yourself

1. Your team wants to switch the logging library in one service. It takes a day and is easy to switch back. How should you decide?

Show answer

Treat it as a two-way door. Let a small group decide quickly and move on. Bezos says reversible, two-way door decisions should be made quickly by people with good judgement or small groups. A heavy process here only makes you slow.

2. What does Dan McKinley mean by "innovation tokens"?

Show answer

A small, fixed number of new or unusual technologies a company can afford to adopt. McKinley says each company gets about three. Every new technology spends one, because its failure modes are not yet well known.

3. In a scoring table, option C wins on performance but scores low on team skill, operations and ease of undo. What is the senior move?

Show answer

Look at the total and the reasons. Choose what the team can run, and name a signal that would make you revisit. The table is a tool for talking. The point is to see what each option costs you to live with, and when to look again.

4. According to Martin Fowler, when should you usually buy a package instead of building your own software?

Show answer

When the function does not set your business apart from competitors. Fowler calls such functions "utility", like payroll. You want them to work at low cost, so a package is the obvious choice.

5. Six months after an ADR, the facts that led to the decision have changed. What should you do with the old ADR?

Show answer

Write a new ADR, and mark the old one as superseded with a link to the new one. Nygard keeps old ADRs. It still matters that this was the decision, even though it is no longer the decision.

Your progress is saved only in this browser. Export it to keep it safe.

Was this clear?
Report a mistake (opens GitHub in a new tab)
Section 8 of 8

Go deeper

Show 7 sources and related lessons
  1. Jeff Bezos, 2015 Letter to Shareholders, Amazon.com (filed with the US SEC, April 2016) (opens in a new tab)
    The original "one-way door" and "two-way door" passage, and why one heavy process for every decision makes a company slow.
  2. Jeff Bezos, 2016 Letter to Shareholders, Amazon (opens in a new tab)
    The section on high-velocity decisions. Deciding with about 70% of the information, and "disagree and commit".
  3. Dan McKinley, “Choose Boring Technology” (2015) (opens in a new tab)
    Innovation tokens, why known failure modes matter, and the hidden cost of adding one more tool.
  4. Martin Fowler, “Who Needs an Architect?”, IEEE Software, July/August 2003 (opens in a new tab)
    Architecture as the things that are hard to change, and why a good architect removes irreversibility.
  5. AWS Well-Architected Framework, “Definitions” (opens in a new tab)
    The six pillars, and how you trade between them based on business context.
  6. Martin Fowler, “Utility Vs Strategic Dichotomy” (2010) (opens in a new tab)
    Why software that does not set you apart should usually be bought, and software that does should be built well.
  7. Michael Nygard, “Documenting Architecture Decisions”, Cognitect (2011) (opens in a new tab)
    The original ADR post. Five short sections, and why reversed decisions are kept and marked superseded.

Case studies: Shopify: Choosing a modular monolith over microservices · Zerodha: Scaling a large broker with simple, boring choices

Related: Design docs and RFCs · Architecture decision records (coming soon) · Build vs buy vs open source (coming soon) · Requirements and non-functional needs · Monolith, modular monolith or microservices · Managing technical debt

Term

See full entry

Jump to a section

  1. 1What broke
  2. 2The idea in simple words
  3. 3How it works
  4. 4Trade-offs
  5. 5At work
  6. 6With AI
  7. 7Check yourself
  8. 8Go deeper