Skip to content
mentoor

Topic 4 of 6 · 5 min read

Weighing design trade-offs explicitly

Goal: Compare two designs against the stated requirements, pick the simpler one that meets them, and name what it gives up.

Every design choice gives something up, so a good review asks what each option costs and picks the simplest one that meets the written requirements. A design that claims to have no downsides has not been examined.

Check yourself · 1 of 3

Two designs both meet every stated requirement. Which should you pick?

Choose one answer

Why it matters

Engineers and agents both drift toward the impressive option: microservices, event sourcing, multi-region databases. Each adds operating work, failure modes and learning cost. If the requirements do not need it, it is cost with no return. The aim is not the best design in the abstract. It is the cheapest design that does the job and can be changed later.

The common trade-offs

  • Consistency versus availability. When the network splits a distributed system, it must choose between answering with possibly stale data and refusing to answer. A shopping cart can be stale. A seat reservation usually cannot.
  • Latency versus cost. More replicas and caches are faster and cost more to run.
  • Simplicity versus flexibility. One database is easy to run; ten services allow independent releases but need networking, tracing and deployment pipelines.
  • Reversibility. A choice that is easy to undo (a library, a queue name) needs less debate than one that is not (a data model, a public API, a cloud provider's proprietary store).

How to review it

  1. Write the requirements the design must meet: load, latency, correctness, budget, team size.
  2. Put the options in a table with one row per requirement.
  3. Mark each cell met, not met or unknown.
  4. Pick the simplest option with no "not met". Resolve each "unknown" with a number or a test.
  5. Write down what it gives up and the trigger to revisit it, for example "move to a replica when reads pass 500 per second". A short architectural decision record keeps this for the next person.

Before and after

Weak: "We will use microservices for scalability."

Better: "Requirement: 50 requests per second, one team of four. A single service with a PostgreSQL database meets this. Microservices would add deployment and tracing work for no stated benefit. We give up independent scaling and will split out the video processing when it needs separate capacity."

What goes wrong

  • Resume-driven design. Technology chosen because it is current.
  • Hidden requirements. "It must be real-time" appears after the decision, without being written down.
  • No exit. Choices made with no trigger for revisiting them.

Examples

One database or three services

Requirements: 50 requests per second, a team of four, one deploy a week. A single service with one database meets all of them. Three services meet them too, but need three pipelines and cross-service tracing. The simpler design wins, and the record notes that splitting out image processing is the first likely change.

Stale or unavailable

A ticket site shows remaining seats from a replica that may lag by seconds. For browsing that is fine. For the final purchase the check must read the primary database, even if that is slower or briefly unavailable.

Key points

  • Write the requirements first, then compare options against them in a table.
  • Choose the simplest option that meets every stated requirement.
  • Name what the chosen design gives up and the signal that would make you revisit it.
  • Reversible decisions deserve less debate than data models and public interfaces.
  • Consistency versus availability depends on the data: a cart can be stale, a seat booking cannot.

Common mistakes

  • Choosing the most scalable option when no requirement asks for it.
  • Comparing options without written requirements to compare against.
  • Listing only the benefits of the preferred design.
  • Treating hard-to-reverse choices, such as the data model, as lightly as easy ones.

Check yourself · 2 of 3

For which data is a slightly stale read most acceptable?

Choose one answer

Check yourself · 3 of 3

What makes a design decision easy to reverse?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic