What if your team could never forget why it made its most important design choices?
Why Architecture decision records (ADR) in Microservices? - Purpose & Use Cases
Start learning this pattern below
Jump into concepts and practice - no test required
Imagine a team building a complex microservices system without writing down why they chose certain tools or designs. Months later, new team members join and ask, "Why did we pick this database?" or "What was the reason for this service split?" The original decisions are lost in chat logs and memory.
Without clear records, teams waste time guessing past choices, repeat debates, and risk making conflicting changes. This slows development and causes errors because no one understands the original reasoning behind the architecture.
Architecture decision records (ADRs) capture each important design choice in a simple, clear document. They explain the problem, options considered, the chosen solution, and why. This creates a shared history that everyone can refer to, keeping the team aligned and speeding up future decisions.
No documentation; rely on memory and scattered chats.# ADR Example Title: Use PostgreSQL for user data Status: Accepted Context: Need reliable relational DB Decision: Choose PostgreSQL for ACID compliance Consequences: Easier joins, but requires setup
Teams can confidently evolve complex systems knowing the reasons behind every key architectural choice.
A microservices team uses ADRs to track why they chose REST over gRPC for communication. Months later, when performance issues arise, they quickly revisit the ADR to evaluate if switching protocols makes sense.
ADRs document key architecture decisions clearly.
They prevent confusion and repeated debates.
They help teams maintain alignment over time.
Practice
Architecture Decision Record (ADR) in microservices projects?Solution
Step 1: Understand the role of ADRs
ADRs are used to record key architecture decisions and why they were made.Step 2: Differentiate ADRs from other documents
ADRs are not for code, bugs, or performance monitoring but for decision documentation.Final Answer:
To document important architecture decisions and their reasons -> Option AQuick Check:
Purpose of ADR = Document decisions [OK]
- Confusing ADRs with bug tracking
- Thinking ADRs are code documentation
- Assuming ADRs monitor system metrics
Solution
Step 1: Recall ADR standard sections
ADRs typically include Title, Status, Context, Decision, and Consequences.Step 2: Eliminate unrelated structures
Options with code, bugs, or UI design are unrelated to ADR format.Final Answer:
Title, Status, Context, Decision, Consequences -> Option AQuick Check:
ADR structure = Title, Status, Context, Decision, Consequences [OK]
- Mixing ADR with test or deployment docs
- Confusing ADR with bug reports
- Including UI design in ADR
Title: Use REST for service communication Status: Accepted Context: Need simple, stateless communication Decision: Use REST over HTTP Consequences: Easier integration but higher latency
What is the main consequence documented here?
Solution
Step 1: Read the Consequences section carefully
The consequence states "Easier integration but higher latency".Step 2: Match the consequence with options
REST leads to easier integration but higher latency matches exactly; others contradict the text.Final Answer:
REST leads to easier integration but higher latency -> Option DQuick Check:
Consequence = Easier integration, higher latency [OK]
- Ignoring the 'higher latency' part
- Assuming REST reduces latency
- Confusing stateless with stateful
Status: Deprecated
What does this status indicate about the decision?
Solution
Step 1: Understand ADR status meanings
"Deprecated" means the decision is outdated and should not be used.Step 2: Compare with other statuses
New proposals are "Proposed", active ones "Accepted", so deprecated means no longer recommended.Final Answer:
The decision is no longer recommended or used -> Option BQuick Check:
Status 'Deprecated' = Not recommended [OK]
- Confusing deprecated with accepted
- Thinking deprecated means new proposal
- Assuming deprecated means pending
Solution
Step 1: Identify ADR purpose for decision documentation
ADRs should explain context, decision, and consequences clearly.Step 2: Evaluate options for documenting architecture choices
Only Write an ADR with Context explaining needs, Decision stating REST or gRPC, and Consequences of each choice uses ADR properly; others ignore documentation or misuse formats.Final Answer:
Write an ADR with Context explaining needs, Decision stating REST or gRPC, and Consequences of each choice -> Option CQuick Check:
Use ADR to document decision and consequences [OK]
- Skipping documentation
- Confusing ADR with bug reports
- Only writing code without explanation
