Search Sreeni's Insights

Filter by content type
technical May 18, 2017 6 min read

Architecture Decision Records (ADR) - documenting the "why"

Architecture Decision Records preserve the context behind technical choices, showing how to write, store, review and evolve an ADR through a fund-domain example.

Share:

Architecture Decision Records (ADR) - documenting the why

Teams are making architecture decisions every week, but after few months nobody remembers why the decision was made. A fund platform may be using Azure Redis Cache for price lookups, while a new developer is asking why SQL is not queried directly. If the answer is only in a meeting or a person’s memory, the same discussion is happening again.

In this article, we are going to see how Architecture Decision Records (ADR) document the context and reasoning behind an architecture choice. We will use a small Markdown ADR from our fund domain, define statuses and review the record through its lifecycle.

TL;DR Summary

  • An ADR records an important architecture decision and the reasoning behind it.
  • The useful parts are Title, Status, Context, Decision and Consequences.
  • Store ADRs as Markdown in the repository, for example docs/adr/0001-use-redis-for-price-lookups.md.
  • A decision is not a task list or a complete design document.
  • Statuses such as Proposed, Accepted, Deprecated and Superseded make the current position visible.
  • Review the ADR when evidence changes, but do not rewrite history without recording the new decision.

Challenges

The decision disappears

A team decides to cache prices because the database is becoming a bottleneck, then a new team member sees Redis and asks whether it is still required. Without context, the decision looks like an arbitrary technology preference.

Many discussions, one outcome

Architecture meetings can cover alternatives, constraints and rejected options. The final code is only showing the selected path, not the alternatives which were considered. A future team is repeating the investigation because the rejected options are forgotten.

Decisions become outdated

A decision which was correct for one scale or dependency may become wrong after a platform change. The team needs a way to mark a decision superseded without pretending that the old context never existed.

What is an ADR?

An Architecture Decision Record is a short document which captures an architecture decision, its context, alternatives and consequences.

In simple terms, an ADR is the memory of why the system is shaped this way. It is not replacing a design document, but it is keeping the important decision close to the code and review process.

The following diagram depicts the ADR lifecycle from proposal to a later superseding decision.

ADR lifecycle
ADR lifecycle

The purple path is the normal route from Proposed to Accepted. A later decision can mark the record Deprecated or Superseded while keeping the original reasoning available.

Why ADRs are important?

ADRs are important because architecture is involving trade-offs. A short record is helping developers understand what was optimised, which constraint mattered and what consequence must be accepted.

In our case, an ADR can say why Azure Redis Cache is used for price lookups, why a 30-second stale window is acceptable and why direct database reads remain the source of truth. This is more useful than a README which only says “Redis is required”.

ADR template

Michael Nygard’s 2011 ADR style is providing a lightweight structure,

# 0001 - Use Azure Redis Cache for price lookups

Status: Accepted

## Context

Fund price reads are repeated by the factsheet API. The relational database remains
the source of truth, but repeated reads are increasing latency.

## Decision

Use Azure Redis Cache with cache-aside reads and a short TTL. Invalidate the fund
price key after a successful price update.

## Consequences

The API gets lower read latency and the database receives fewer repeated reads.
The team must handle stale values, cache misses and Redis availability.

The headings are making the record easy to scan. Add links to dashboards, pull requests and related ADRs when they provide useful evidence.

The context should explain the problem in business language as well as technical language. “Price reads are slow” is useful, but “factsheet users wait while every request reaches the database” is helping a reviewer understand the impact. The consequences should include operational cost, team ownership and a risk which the decision is accepting.

Store and name the record

Store ADRs in the repository,

docs/
  adr/
    0001-use-redis-for-price-lookups.md
    0002-version-public-fund-api.md

The number is giving the decision a stable reference, and the short name is helping search. Use adr-tools when the team wants commands to create and list records, or create Markdown manually when a lightweight process is more suitable.

Review the decision

The decision owner should collect context before writing the record. Discuss the alternatives, make the trade-off explicit and ask the affected teams to review it. A small decision can be accepted in a pull request, while a platform-wide decision may need an architecture review.

Keep the ADR short. Put API schemas, deployment runbooks and detailed implementation plans in their own documents, then link them from the record.

Status and change

StatusMeaning
ProposedUnder discussion and not yet the team standard
AcceptedThe team has selected and is implementing the decision
DeprecatedThe decision should not be used for new work
SupersededA newer ADR has replaced it

When a new caching strategy replaces Redis, do not silently edit the old decision to describe the new system. Mark ADR 0001 as Superseded and link ADR 0003. The history is showing how the architecture evolved.

Review accepted ADRs during a significant platform or business change. A review does not mean reopening every decision; it means checking whether the assumptions are still valid and recording a new decision when they are not.

An ADR can also prevent a local optimisation from becoming an accidental platform standard. If one team chooses a cache because its price workload needs a short read path, another team can read the context before copying the choice to a document workflow with different consistency needs.

Link the ADR from the pull request which introduces the architecture. Reviewers can then ask whether the decision is solving the stated problem and whether the consequences are acceptable. This is keeping architecture review close to the change instead of making it a separate ceremony.

Selection criteria

Create an ADR when a choice is having a long-lived impact, several alternatives have real trade-offs or reversing the choice is expensive. Do not create a record for every method name or minor implementation detail.

Ask whether a future developer will need to understand the reason, whether a rejected option may appear again and whether the decision affects multiple teams. In our case, cache technology, API versioning and message delivery deserve records, while a private helper class normally does not.

Must Do / Should / Don’t

Must Do

  • Must record context, decision and consequences.
  • Must store the record near the code and review it through the repository.
  • Must make status and superseding decisions visible.

Should

  • Should link metrics, incidents and related ADRs.
  • Should keep the document short and focused on the why.
  • Should ask affected teams to review a cross-boundary decision.

Don’t

  • Don’t use an ADR as a replacement for a full technical design.
  • Don’t rewrite history when the decision changes.
  • Don’t record only the technology name without the trade-off.

Wrap up

In this article, we have looked at ADRs, the Nygard template, repository storage, statuses, review and the example of Azure Redis Cache for fund price lookups.

I appreciate your time and efforts to read this article. In the next article, I will walk you through technical debt, how to measure it and when to pay it back.

Related Posts