Article · Solution Architect – role and craft · Modular Monolith
Architecture decisions and ADRs: how to choose, weigh trade-offs and record the “why”
How a solution architect makes decisions that are hard to reverse: options analysis (build or buy, microservice or module, REST or Kafka), a weighted decision matrix with the calculation, a sensitivity test, an ADR template in the MADR format, two complete examples, adr-tools and the rules for communicating decisions.
A year from now nobody will remember why you chose Kafka over REST, why orders didn't stay in the old shop platform, and why the event carries no customer address. A new developer will only see the consequences and ask: "who came up with this?". Without a record there are two options left – blindly stick to a decision whose purpose nobody knows, or change it and repeat the mistake it was protecting against. That is why architecture decisions are analysed, scored and recorded.
- 2011
- Michael Nygard describes ADRs – the post "Documenting Architecture Decisions"
- 1–2
- pages per ADR – one decision, not the whole project
- 4.05
- score of the winning option – the example OrderFlow matrix below
Which decision is architectural
Grady Booch measures the significance of a decision by the cost of change. In practice, control questions help – if you answer "yes" to any of them, the decision deserves an analysis and an ADR:
- Does it affect more than one team or system?
- Does it concern data (model, ownership, location, retention) or a contract with someone outside?
- Does it change whether we meet an NFR – response time, availability, security?
- Does it bind us to a vendor or a licence for years?
- Would reversing it take more than a sprint?
Choosing a logging library – no. Choosing whether the ERP learns about an order from an event or from a REST call – definitely yes.
Everything in software architecture is a trade-off.
The same book states the second law of software architecture: "why" is more important than "how". A diagram shows how the system is built. Only a decision record says why.
Options analysis: three classic dilemmas
The process is always similar: establish the decision drivers (usually straight from the NFR catalogue and the constraints), list 2–3 real options (often including "leave it as is"), assess them, verify uncertain assumptions with a PoC, decide and record. Three dilemmas come back in almost every project.
Build or buy
| Signal | Rather build | Rather buy |
|---|---|---|
| Type of domain (DDD) | core domain – what the company beats competitors with | generic domain – payroll, e-mail, identity, accounting |
| Volatility | rules change every week | a stable process, similar across the industry |
| Skills | the team knows the domain and the stack | no people, and the market has mature products |
| Five-year cost (TCO) | team effort + maintenance | licences + integration + customisation + exit |
| Regulations and risk | the data must stay with us | the vendor meets the requirements and we have an exit strategy (NIS2: supply-chain security) |
The worst option is often a third, unnamed one: buy and heavily customise. You pay for the licence, and then for every upgrade that breaks your modifications.
Microservice or module
The default answer is a module in an existing or new modular monolith. A separate service makes sense when that part must be deployed independently, has a different scaling or security profile, or belongs to a different team with a different rhythm. Every service means a pipeline, monitoring, on-call and contracts – a cost that has to pay off. Details are in the articles on the modular monolith and microservices.
REST or Kafka
The rule of thumb: ask synchronously, inform asynchronously. When you need the answer now (the payment authorisation for the order confirmation), you call synchronously – with a timeout and a fallback path. When you inform others of a fact (an order was confirmed), you publish an event – the sender then doesn't depend on the availability of the receivers, and a new consumer requires no changes on the sender's side. The price is eventual consistency, an outbox and idempotent consumers. More in the article on integrations and contracts.
The decision matrix: an example with the calculation
OrderFlow at Bazario, the decision: where to build order handling. Three options from the HLD article: A – extend the shop platform, B – a new OrderFlow service, C – a SaaS OMS platform. The criteria and weights were agreed with the PO, finance and legal before anyone scored the options. Scale: 1 – doesn't meet, 3 – meets with trade-offs, 5 – fully meets.
| Criterion | Weight | A. Extend the shop platform | B. New OrderFlow service | C. SaaS OMS platform |
|---|---|---|---|---|
| Confirmation time < 2 s and scalability | 25% | 2 | 5 | 4 |
| Compliance (GDPR), audit and no overselling | 20% | 4 | 4 | 3 |
| Deadline – launch in Q2 | 15% | 4 | 2 | 5 |
| Five-year cost (TCO) | 15% | 3 | 3 | 2 |
| Flexibility of promotion rules | 15% | 2 | 5 | 3 |
| Vendor dependency and exit strategy | 10% | 2 | 5 | 1 |
| Weighted score | 100% | 2.85 | 4.05 | 3.20 |
The score is the sum of weight × rating. For option B: 0.25 × 5 + 0.20 × 4 + 0.15 × 2 + 0.15 × 3 + 0.15 × 5 + 0.10 × 5 = 1.25 + 0.80 + 0.30 + 0.45 + 0.75 + 0.50 = 4.05. The chart shows what each score is made of – you can see at once that B wins on performance and flexibility and loses on the deadline:
| Confirmation time and scalability | GDPR, audit, stock | Q2 deadline | Five-year cost | Promotion flexibility | Vendor exit | |
|---|---|---|---|---|---|---|
| A. Shop platform | 0.5 weighted points | 0.8 weighted points | 0.6 weighted points | 0.45 weighted points | 0.3 weighted points | 0.2 weighted points |
| B. New OrderFlow service | 1.25 weighted points | 0.8 weighted points | 0.3 weighted points | 0.45 weighted points | 0.75 weighted points | 0.5 weighted points |
| C. SaaS OMS | 1 weighted points | 0.6 weighted points | 0.75 weighted points | 0.3 weighted points | 0.45 weighted points | 0.1 weighted points |
Sensitivity test: what if the deadline matters more than we assumed? With weights of 30% for the deadline, 15% for performance and 10% for flexibility (the rest unchanged), the scores are A 3.15, B 3.60, C 3.40. B still wins, but its lead drops from 0.85 to 0.20 points. That is important information for the committee: if the Q2 date is immovable, the decision is fragile – which is why the team narrowed the MVP to own sales (third-party sellers in phase two) and recorded the deadline risk in the register.
The rest of this article is for members
Create a free account or sign in to read it all. Still ahead:
- The trade-offs of the chosen option
- ADR – recording one decision
- Where to keep ADRs
- How to communicate decisions
- Related
- Check yourself