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.
Updated since you finished it. We changed this lesson after you marked it done. Your progress is kept.
What broke
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.
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
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.
- 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.
- 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.
- 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.
- They choose A, a table in the Postgres database they already run. It is easy to move away from later, so they decide fast.
- They write a one-page ADR. It says what they chose, why, and what they give up: A will not grow forever.
- 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.
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
Trade-offs
| Approach | Good for | Risk | Use it when |
|---|---|---|---|
| Decide fast, small group | Speed and learning. | You may need to undo it. | Two-way doors: easy and cheap to reverse. |
| Slow, careful review | Fewer costly mistakes. | Slowness if used for everything. | One-way doors: data formats, public APIs, core databases. |
| Boring, well-known tech | Known 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 tech | A 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 product | Fast start. Someone else runs it. | Licence cost, lock-in, less control. | Utility functions that do not set you apart. |
| Build your own | Full control over a key feature. | You own every bug and every on-call page. | Strategic functions that customers choose you for. |
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.
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.
Check yourself
Your progress is saved only in this browser. Export it to keep it safe.
You have finished 5 lessons. Your progress lives only in this browser. Export a copy so you don’t lose it.
Go deeper
Show 7 sources and related lessons
- 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. - 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". - 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. - 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. - AWS Well-Architected Framework, “Definitions” (opens in a new tab)
The six pillars, and how you trade between them based on business context. - 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. - 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
Next, read design docs and RFCs, architecture decision records and build vs buy vs open source.