Book 7 · Volume I — Architecture Fundamentals & Architectural Thinking · Topic 1.4
Architecture as Decision-Making
Context, alternatives, constraints and consequences
9 min readStage 3 · Systems8 interview questions
Written byMaheshFounder · Senior Technical Architect
Chapter
Chapter 1 — What Is Software Architecture?
Prerequisites
Topics 1.1–1.3
You will be able to
Treat architecture as a sequence of explicit decisions, describe decision context through drivers and forces, generate and compare alternatives systematically, apply constraints to prune options, anticipate and monitor consequences, calibrate rigour to reversibility, time decisions well, and record them so they can be understood and revisited
Architecture as decision-making views an architecture as the accumulated result of significant decisions — each made in a context, choosing among alternatives, within constraints, and producing consequences that shape later decisions.
Figure 1 — Architecture decision loop (TOC)
TOC element
Definition
Context
The situation that makes a decision necessary: goals, drivers, quality attribute needs, current state and forces in tension
Alternatives
The realistic options considered, each with its benefits, costs and risks — including "do nothing" where relevant
Constraints
Fixed limits (technology, regulation, organisation, budget, time, legacy) that eliminate or restrict options
Consequences
The resulting effects — positive, negative and neutral — on qualities, cost, teams and future decisions, including risks to monitor
Table 1 — The four TOC elements
2Why It Exists
Architectures age while people move on. Teams later ask "why did we do this?" and either repeat old debates or reverse sound decisions. Treating architecture explicitly as decisions improves their quality today and preserves the reasoning for tomorrow.
Treating architecture as decisions also changes where architects spend their effort. Instead of a large upfront design document that tries to settle everything, the architect identifies which decisions are architecturally significant, meaning hard to reverse, wide in scope or strongly affecting a quality attribute, and concentrates rigour there, leaving the rest to teams. Architecture becomes continuous rather than a phase: decisions are taken when enough information exists, recorded in the repository next to the code, and revisited when their context changes. It also makes architecture reviewable. A reviewer can challenge a specific decision's drivers, alternatives or accepted consequences instead of arguing with a diagram, and auditors, new joiners and future architects can trace why the system looks the way it does.
Figure 2 — Decision record anatomy
3Core Concepts
3.1 Context
Context element
Example
Business goal
Launch marketplace in 6 months
Driver
Peak 5k orders/min during sales
Current state
Monolith on VMs, PostgreSQL
Forces
Speed vs scalability vs team size
Trigger
Checkout outages last Diwali
Table 2 — Capturing context
3.2 Alternatives
Figure 3 — Comparing alternatives (TOC)
Good practice
Why
At least 2–3 real options
Avoid confirmation bias
Include "status quo"
Baseline for cost of change
Same criteria for all options
Fair comparison
Spike the uncertain ones
Evidence over opinion
Table 3 — Generating alternatives
3.3 Constraints
Figure 4 — Constraints that shape decisions (TOC)
Constraint
Option eliminated
Data must stay in India
Global multi-region active-active DB
Java/Spring stack mandated
Go-based services
Go-live in 4 months
Full microservices rewrite
Table 4 — Pruning the option space
3.4 Consequences
Figure 5 — Consequences (TOC): every decision has both
Consequence type
Example (microservices split)
Follow-up
Positive
Independent deploys
Measure deployment frequency
Negative
Distributed failures
Resilience patterns, tracing
Risk
Team skill gap
Training, platform team
Future decisions enabled
Per-service scaling
—
Future decisions constrained
Cross-service transactions
Sagas
Table 5 — Consequences drive follow-ups
4How It Works Internally — Rigour by Reversibility
Figure 6 — One-way vs two-way doors
Decision class
Process
Two-way door, small scope
Team decides, lightweight note
Two-way door, wide scope
Short ADR, time-boxed spike
One-way door
Full ADR, alternatives, spike/PoC, review
One-way door, enterprise
Architecture board
Table 6 — Right-sized decision process
Figure 7 — The last responsible moment
4ADeep Dive — Decision Techniques
Technique
Use
Weighted decision matrix
Compare options on agreed criteria
Y-statement
Compact rationale: "In context X, facing Y, we decided Z to achieve Q, accepting D"
Spike / PoC
Reduce uncertainty before committing
Pre-mortem
Imagine the decision failed — why?
Reversibility design
Adapters, feature flags to keep options open
Sensitivity/trade-off points (ATAM)
Identify decisions that affect multiple qualities
Table 7 — Decision toolkit
TEXT
Y-statement exampleIn the context of order notifications,facing the need to decouple checkout from email, SMS and loyalty,we decided for OrderPlaced events on Kafka via a transactional outboxand against synchronous REST calls,to achieve higher checkout availability and independent consumers,accepting eventual processing (≤ 5 s) and additional broker operations.
5APIs / Features / Syntax
Tool
Purpose
MADR / Nygard ADR templates
Record decisions
adr-tools / log4brains
Manage ADRs in repo
Spikes with Spring Boot + Testcontainers
Evidence
Load tests (Gatling/k6)
Validate QA consequences
ArchUnit / fitness functions
Enforce and monitor consequences
Table 8 — Decision tooling
JAVA
// Keeping a decision reversible: port + adapter behind a feature flagpublicinterface NotificationPort { void orderPlaced(OrderPlaced e); }@BeanNotificationPort notifications(FeatureFlags flags, KafkaNotifier kafka, RestNotifier rest) {return e -> (flags.enabled("notify-via-events") ? kafka : rest).orderPlaced(e);}
6Practical Examples
6.1 Re-litigated decision
A team debated "why Kafka and not RabbitMQ?" four times in two years as members changed. Once the original context and alternatives were recorded in an ADR, the next newcomer read it in five minutes and the debate ended — or restarted only when context truly changed.
6.2 Early irreversible decision
A startup chose a multi-region active-active database on day one "for scale". The complexity slowed delivery for a year while traffic stayed small. Deferring to the last responsible moment would have allowed a single-region start with a clear migration path.
6.3 Worked example — full decision walk-through
Element
Content
Context
Checkout depends on 4 sync services; outages cascade
Alternatives
Keep sync + circuit breakers; events via outbox; hybrid
Constraints
Java/Spring, Kafka available, 3-month window
Decision
Hybrid: sync payment auth, events for side effects
Consequences
+availability, −eventual email/loyalty, need idempotent consumers
Table 9 — Decision in five lines
6.4 Worked example — weighted matrix mechanics
Criterion
Weight
Option A score
Weighted
Availability
3
3
9
Complexity
2
1
2
Time to market
2
2
4
Total
—
—
15
Table 10 — Weights agreed before scoring
6.5 Worked example — pre-mortem
Imagined failure
Mitigation
"Events lost during broker outage"
Outbox
"Consumers double-send emails"
Idempotency
Table 11 — Anticipate negative consequences
6.6 Worked example — decision timing
Decision
Last responsible moment
Kafka vs RabbitMQ
Before first event-driven integration
Sharding strategy
When single DB reaches 60% capacity
Table 12 — Decide when information is sufficient and delay starts to cost
6.7 Worked example — reversibility investment
Technique
Cost
Benefit
Port/adapter for payments PSP
Small
Swap PSP later
Abstract cloud storage
Medium
Portability
Table 13 — Buy options where uncertainty is high
6.8 Worked example — consequences monitoring
Consequence
Fitness function
"Checkout independent of notifications"
Chaos test: stop email service, checkout OK
"Event lag ≤ 5 s"
Lag alert
Table 14 — Verify consequences continuously
6.9 Worked example — superseding a decision
ADR
Status
ADR-007 Use RabbitMQ for events
Superseded by ADR-031
ADR-031 Move domain events to Kafka
Accepted
Table 15 — Decisions evolve; history remains
6.10 Worked example — group decision formats
Format
When
Architect decides after consultation
Urgent, clear expertise
Consensus of leads
Cross-team impact
Advice process
Anyone decides after seeking advice
Table 16 — Choose a decision mode deliberately
6.11 Worked example — spike design
Spike question
Measure
Can virtual threads handle 5k rps with blocking JDBC?
p99, CPU, pool waits
Duration
2 days
Output
Numbers + recommendation in ADR
Table 17 — Time-boxed evidence
6.12 Worked example — bias checklist
Bias
Countermeasure
Familiarity
Include unfamiliar option
Sunk cost
Evaluate from today
HiPPO (highest paid opinion)
Criteria first, scoring second
Table 18 — Better decisions
6.13 Worked example — decision log metrics
Metric
Signal
ADRs per quarter
Decisions made explicitly
Superseded ADRs
Healthy evolution
Undocumented major decisions found in reviews
Gap
Table 19 — Measure decision practice
6.14 Worked example — decisions and constraints interplay
Constraint change
Effect
Data localisation regulation introduced
Re-open multi-region ADR
Table 20 — Context changes trigger re-decisions
6.15 Worked example — decision with "do nothing"
Option
Cost
Do nothing (keep monolith)
Outage risk, slow releases
Modularise
3 months
Microservices
9 months
Table 21 — Status quo is an alternative with costs
6.16 Worked example — communicating a decision
Audience
Artefact
Engineers
ADR in repo
Stakeholders
One-slide summary with trade-offs
Table 22 — Decisions need to travel
6.17 Worked example — sensitivity point
Decision
Qualities affected
Kafka partition count
Throughput (+), ordering scope, rebalance time
Table 23 — ATAM: one decision, many qualities
6.18 Worked example — interview answer
Step
Content
Context
Drivers and forces
Alternatives
2–3 scored options
Constraints
What ruled options out
Consequences
Gains, costs, monitoring
Table 24 — Structured decision story
7Common Problems & Mistakes
Single-option "decisions".
Undocumented context.
Ignoring negative consequences.
Deciding too early on irreversible matters.
Deciding too late — letting defaults decide.
Never revisiting when context changes.
These mistakes share a root cause: the decision process is invisible, so nobody notices that it is weak. A single-option decision usually means the conclusion came first and the analysis was written to justify it; asking which options were rejected, and why, exposes this quickly. Missing context and ignored negative consequences turn ADRs into announcements that cannot be evaluated later. Timing errors cut both ways. Committing early to a one-way door such as a multi-region database burns delivery capacity for a year, while waiting too long lets framework defaults, a vendor contract or one team's code decide for everyone. Finally, decisions rot when their context changes, for example a new data-localisation rule or tenfold traffic, and nobody reopens them. Revisit triggers written into each ADR prevent that.
8Performance & Production Considerations
Aspect
Guideline
Context
Drivers, forces, current state written down
Alternatives
2–3+, same criteria, spikes
Constraints
Validated, explicit
Consequences
Positive/negative/risks, monitored
Process
Rigour by reversibility; ADRs
Table 25 — Operational guidelines
9Architecture & Design Considerations
Treat architecture as a stream of explicit decisions.
Match rigour to reversibility and scope.
Decide at the last responsible moment, keep options open.
Record and revisit decisions as context evolves.
10Interview Questions & Answers
Q1L1 · BasicConcept
What are the elements of an architectural decision?
An architectural decision has four elements: context, alternatives, constraints and consequences. Context is the situation that forces the decision, including business goals, quality attribute drivers, the current state and the forces in tension. Alternatives are the realistic options, at least two or three, often including the status quo. Constraints are fixed limits such as regulation, a mandated stack, budget or deadline that eliminate options; data that must stay in India, for example, rules out a global active-active database. Consequences are the positive, negative and risky effects of the chosen option, plus the follow-up work they create. The same four elements structure both the thinking and the ADR that records it.
Q2L1 · BasicConcept
Why document context?
Because a decision can only be judged against the situation in which it was made. Two years later the people, traffic and technology have changed, and without the original context a sound decision looks arbitrary. Teams then either repeat the debate, as in the note's Kafka versus RabbitMQ argument that recurred four times, or reverse a decision whose reasons still hold. Written context, including drivers, forces and the trigger, lets a newcomer understand the choice in minutes. It also tells you when to revisit: if a stated assumption, such as a single region or a peak of 5k orders per minute, no longer holds, the decision deserves a fresh look.
Q3L2 · IntermediateConcept
How many alternatives should you consider?
At least two or three realistic ones, and usually the status quo as well. With a single option you are not deciding, you are rationalising, and confirmation bias goes unchallenged. The status quo matters because it is the baseline for the cost of change: keeping the monolith has real costs, such as outage risk and slow releases, and any new option must beat them. More than four or five options tends to dilute the analysis, so use constraints to prune early. Every remaining option should be judged against the same agreed criteria, and the uncertain ones settled with a short, time-boxed spike rather than opinion.
Q4L2 · IntermediateConcept
What are one-way and two-way door decisions?
The terms come from Amazon: a one-way door is a decision that is expensive or impossible to reverse, while a two-way door is one you can walk back through cheaply. Choosing a primary database, a cloud provider or a data partitioning key is usually one-way; a library inside a service, a feature-flagged rollout or a cache TTL is two-way. The distinction sets the rigour. Two-way doors with small scope should be made quickly by the team with a lightweight note. One-way doors deserve a full ADR, real alternatives, a spike or proof of concept and a review. Treating every decision as one-way slows delivery for no benefit.
Q5L3 · Senior EngineerConcept
What is the last responsible moment?
The last responsible moment is the latest point at which you can make a decision before delaying it starts to cost more than deciding, either by blocking work or by closing off options. Deciding then maximises the information you have, because requirements, load patterns and team skills become clearer over time. It is not procrastination: you must know when that moment is and prepare for it. The note's examples help: choose Kafka or RabbitMQ before the first event-driven integration, and pick a sharding strategy when the single database reaches about 60% capacity. Until then, ports, adapters and feature flags keep the options open at low cost.
Q6L3 · Senior EngineerDesign
How do you monitor consequences of a decision?
I turn each accepted consequence into something measurable and automate the check. Quality attribute consequences become SLOs and alerts: if we accepted eventual email delivery, an alert fires when event lag exceeds the agreed five seconds. Structural consequences become fitness functions, such as ArchUnit tests that stop checkout importing the notifications module, or a chaos test that stops the email service and asserts that checkout still succeeds. Risks get owners and review dates. I also write revisit triggers into the ADR, for example traffic above a threshold or a new regulation, and review accepted trade-offs periodically. A consequence nobody measures is just an assumption waiting for an incident.
Q7L4 · Technical ArchitectDesign
How do you reduce bias in decisions?
By separating the criteria from the scoring and making evidence cheaper than opinion. I agree criteria and weights with stakeholders before anyone scores the options, so the weighting cannot be bent towards a favourite; this also counters the HiPPO effect, where the highest paid opinion wins. I deliberately include an unfamiliar option to fight familiarity bias, and evaluate from today's position to avoid sunk-cost reasoning. Uncertain claims are settled with a time-boxed spike, such as two days measuring virtual threads at 5k requests per second. A pre-mortem, imagining the decision has failed and asking why, surfaces negative consequences that optimism hides. Recording rejected options keeps all this reviewable.
Q8L5 · Solution ArchitectScenario
Describe how you'd lead a major decision such as moving to event-driven integration.
I would run it as a visible, time-boxed decision rather than a slide. First, capture the context: the business driver, such as checkout availability suffering from four synchronous dependencies, and forces such as team skills and a three-month window. Then generate options, including keeping synchronous calls with circuit breakers, events through a transactional outbox, and a hybrid. Constraints such as the Java and Spring stack and the Kafka platform already available prune the list. We score against agreed criteria, spike the unknowns and decide with product and team leads. The ADR records accepted consequences such as eventual email and idempotent consumers, and fitness functions such as lag alerts monitor them.