Technical tradeoffs
Weighing speed, cost, quality and flexibility in technical decisions.
Every technical decision trades something for something else. Writing tradeoffs down, for example in decision records, makes them reviewable later. Product engineers weigh them against the product's stage and goals, not only technical taste.
Why it matters for a product engineer
Every technical decision trades something for something else: speed for safety, simplicity for flexibility, cost now for cost later. A product engineer weighs these against the product’s stage and goals, not only against technical taste. Writing the trade-off down makes it possible to review it later, when the situation changes.
How to do it
- Name what you gain and what you give up, in concrete terms. “Faster” is not enough: faster for whom, and at what cost?
- Tie each trade-off to the product’s stage. An early product needs speed of learning more than scale.
- Ask how reversible the decision is. Easy-to-reverse decisions need less analysis.
- Write a short decision record: the context, the decision, the status and the consequences, good and bad.
- Say what would make you change your mind, such as a load level or a team size.
- Review old records when that condition happens.
Common mistakes
- Presenting a decision as free, with no cost.
- Choosing the architecture of a large company for a small product.
- Decisions that live only in a chat thread or one person’s memory.
- Never revisiting a trade-off after the context changed.
Example
Segment sends customer events to over 100 kinds of destinations. It had grown to more than 140 services, one per destination, and three full-time engineers spent most of their time keeping them alive. The team merged them into one service. In their post they listed what they gave up and why they accepted each loss. The team made 32 improvements to its shared libraries under the old design, and 46 in the year after the merge.
What Segment gave up when it merged 140 services into one
- Fault isolationSimple operationsA bug in one destination can now crash the service for all.
- Hot in-memory cachesOne shared pool of workersThe cache is spread across 3,000+ processes. They chose not to add Redis.
- Each destination picks its versionsOne version of each libraryAn update may break several destinations. Tests show which.
Each loss was written down with the reason to accept it. The positions are our reading of the post.
ReportedTwilio Segment, 'Goodbye microservices'
Sources: Documenting architecture decisions (Michael Nygard) ↗ · Goodbye microservices (Alexandra Noonan, Twilio Segment) ↗
Resources
1- articleStart here
Documenting architecture decisions ↗
Michael Nygard · 2011 · 6 minThe original proposal for short architecture decision records, so trade-offs stay visible later.