Bird
Raised Fist0
Microservicessystem_design~10 mins

Architecture decision records (ADR) in Microservices - Scalability & System Analysis

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Scalability Analysis - Architecture decision records (ADR)
Growth Table: ADR Usage at Different Scales
Users / TeamsNumber of ADRsProcess ComplexityTooling & AutomationCollaboration Impact
100 users / 1-2 teams10-20 ADRsManual creation and reviewSimple markdown files in repoDirect communication, informal reviews
10,000 users / 10-20 teams100-200 ADRsStandardized templates, peer reviewsAutomated ADR generation tools, CI integrationCross-team sync meetings, ADR registries
1,000,000 users / 50-100 teams500-1000 ADRsFormal ADR governance, approval workflowsDedicated ADR management platforms, searchCompany-wide ADR knowledge base, training
100,000,000 users / 200+ teamsThousands of ADRsAutomated ADR lifecycle management, versioningIntegrated with enterprise architecture toolsGlobal collaboration, ADR analytics and reporting
First Bottleneck

As the number of ADRs grows, the first bottleneck is managing and retrieving relevant decisions efficiently. Without proper tooling, teams waste time searching or duplicating decisions. Manual ADR maintenance becomes error-prone and slows down development.

Scaling Solutions
  • Standardize ADR format: Use templates to keep records consistent and easy to parse.
  • Automate ADR creation and linking: Integrate ADR tools with code repositories and CI pipelines.
  • Implement ADR registries: Central searchable databases or platforms to store and query ADRs.
  • Version control and lifecycle management: Track ADR changes and deprecations systematically.
  • Governance and review workflows: Define clear approval processes to maintain ADR quality.
  • Training and documentation: Educate teams on ADR importance and usage to improve adoption.
Back-of-Envelope Cost Analysis
  • Assuming 1000 ADRs with average size 2KB -> ~2MB storage, negligible for modern systems.
  • Search queries per day: 100 teams x 10 queries = 1000 QPS peak, manageable with indexing.
  • Network bandwidth for ADR retrieval is low, under 1 MB/s even at scale.
  • Human review time grows linearly with ADR count; automation reduces cost significantly.
Interview Tip

When discussing ADR scalability, start by explaining what ADRs are and why they matter. Then describe how growth in teams and decisions increases complexity. Identify the bottleneck in managing ADRs and propose practical tooling and process improvements. Emphasize automation and governance to maintain quality at scale.

Self Check

Your ADR repository handles 1000 queries per day. Usage grows 10x. What do you do first?

Answer: Implement indexing and caching to speed up ADR retrieval and reduce load. Then consider scaling the ADR platform horizontally if needed.

Key Result
As ADRs grow with more teams and decisions, managing and retrieving them efficiently becomes the first bottleneck. Standardization, automation, and centralized tooling are key to scaling ADR usage in microservices environments.

Practice

(1/5)
1. What is the main purpose of an Architecture Decision Record (ADR) in microservices projects?
easy
A. To document important architecture decisions and their reasons
B. To write detailed code for each microservice
C. To track bugs and issues in the system
D. To monitor server performance metrics

Solution

  1. Step 1: Understand the role of ADRs

    ADRs are used to record key architecture decisions and why they were made.
  2. Step 2: Differentiate ADRs from other documents

    ADRs are not for code, bugs, or performance monitoring but for decision documentation.
  3. Final Answer:

    To document important architecture decisions and their reasons -> Option A
  4. Quick Check:

    Purpose of ADR = Document decisions [OK]
Hint: ADRs capture decisions, not code or bugs [OK]
Common Mistakes:
  • Confusing ADRs with bug tracking
  • Thinking ADRs are code documentation
  • Assuming ADRs monitor system metrics
2. Which of the following is the correct basic structure of an ADR document?
easy
A. Title, Status, Context, Decision, Consequences
B. Title, Code, Tests, Deployment, Logs
C. Summary, Bugs, Fixes, Performance, Metrics
D. Introduction, User Stories, UI Design, API Endpoints

Solution

  1. Step 1: Recall ADR standard sections

    ADRs typically include Title, Status, Context, Decision, and Consequences.
  2. Step 2: Eliminate unrelated structures

    Options with code, bugs, or UI design are unrelated to ADR format.
  3. Final Answer:

    Title, Status, Context, Decision, Consequences -> Option A
  4. Quick Check:

    ADR structure = Title, Status, Context, Decision, Consequences [OK]
Hint: Look for Context and Consequences in ADR structure [OK]
Common Mistakes:
  • Mixing ADR with test or deployment docs
  • Confusing ADR with bug reports
  • Including UI design in ADR
3. Given this ADR excerpt:
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?
medium
A. REST requires stateful connections for speed
B. REST causes stateless communication to fail
C. REST reduces integration complexity and latency
D. REST leads to easier integration but higher latency

Solution

  1. Step 1: Read the Consequences section carefully

    The consequence states "Easier integration but higher latency".
  2. Step 2: Match the consequence with options

    REST leads to easier integration but higher latency matches exactly; others contradict the text.
  3. Final Answer:

    REST leads to easier integration but higher latency -> Option D
  4. Quick Check:

    Consequence = Easier integration, higher latency [OK]
Hint: Focus on Consequences section for effects [OK]
Common Mistakes:
  • Ignoring the 'higher latency' part
  • Assuming REST reduces latency
  • Confusing stateless with stateful
4. You find an ADR with this status:
Status: Deprecated

What does this status indicate about the decision?
medium
A. The decision is newly proposed and under review
B. The decision is no longer recommended or used
C. The decision is currently active and enforced
D. The decision has been accepted but not implemented yet

Solution

  1. Step 1: Understand ADR status meanings

    "Deprecated" means the decision is outdated and should not be used.
  2. Step 2: Compare with other statuses

    New proposals are "Proposed", active ones "Accepted", so deprecated means no longer recommended.
  3. Final Answer:

    The decision is no longer recommended or used -> Option B
  4. Quick Check:

    Status 'Deprecated' = Not recommended [OK]
Hint: Deprecated means outdated, avoid using [OK]
Common Mistakes:
  • Confusing deprecated with accepted
  • Thinking deprecated means new proposal
  • Assuming deprecated means pending
5. Your team must decide between using REST or gRPC for microservice communication. You want to document this choice clearly for future reference. Which is the best way to use an ADR in this situation?
hard
A. Write code samples for both REST and gRPC without explanation
B. Skip documentation and decide by majority vote only
C. Write an ADR with Context explaining needs, Decision stating REST or gRPC, and Consequences of each choice
D. Create a bug report to track this decision

Solution

  1. Step 1: Identify ADR purpose for decision documentation

    ADRs should explain context, decision, and consequences clearly.
  2. 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.
  3. Final Answer:

    Write an ADR with Context explaining needs, Decision stating REST or gRPC, and Consequences of each choice -> Option C
  4. Quick Check:

    Use ADR to document decision and consequences [OK]
Hint: Use ADR to record context, decision, and consequences [OK]
Common Mistakes:
  • Skipping documentation
  • Confusing ADR with bug reports
  • Only writing code without explanation