Architecture Documentation and Communication Questions
Making an architecture legible to others: architecture decision records (templates, alternatives and consequences, lifecycle, supersession, tagging and discoverability), diagramming and visualization (C4, sequence, deployment, data-flow and trust-boundary diagrams, notation conventions), and communicating designs to technical and non-technical stakeholders. Covers capturing rationale, documenting what a system does under failure, load and consistency trade-offs, recording observability, SLO and security content, running design reviews, keeping docs and diagrams current, and presenting a system clearly under time pressure. The communication skill that separates a good design from an understood one.
A product manager asks which architecture decisions affect a given feature, and an engineer asks which services a decision touches. How would you link requirements, decisions and services so both questions have a quick answer?
Sample Answer
Direct answer
Give each ADR (architecture decision record: a short document capturing one decision) machine-readable metadata that holds the IDs it relates to: the requirement IDs it serves and the services it touches. Make the ID the link between systems, in both directions, and generate views from it. Then "which decisions affect this feature?" and "which services does this decision touch?" become lookups, not searches.
The chain
R-123 (Jira requirement) -> ADR-45 (decision) -> checkout-api, payments-gateway (services)
R-123 (same requirement) -> ADR-52 (decision) -> checkout-api, notifications (services)
One requirement can be shaped by several decisions, and one service can be governed by several decisions, so the links form a small graph, not a single line.
- The requirement lives in the tracker (Jira or GitHub Issues) with ID
R-123. - The ADR lives in the repository, named
0045-tokenise-cards.md, with front matter (a metadata block at the top of the file) listingrequirements: [R-123]andservices: [checkout-api, payments-gateway]. - Pull requests mention the ADR ("Implements ADR-45, refs R-123"), and the tracker ticket links to the ADR.
- Each service repository has a small service catalog file (a registry entry: service name and owning team). The list of ADRs that apply to a service is not typed into it; it is generated from the ADRs'
servicesfront matter, so the service side is queryable without storing the link twice.
Metadata fields for impact tracing
id, title, status (proposed, accepted, superseded), date, requirements, services, supersedes, pull_requests, owner, review_by, and optionally compliance_refs for audit items.
Superseded ADRs (how the chain shows the current one)
Superseded means replaced by a newer decision. If ADR-60 replaces ADR-38, ADR-60 carries supersedes: ADR-38 and ADR-38's status becomes superseded. The current decision in a chain is the one that nothing supersedes, and the lookups below filter on status == accepted, so superseded ADRs drop out of the answers automatically.
Queryable lineage model
{
"requirement": {"id": "R-123", "title": "Pay with saved card in one click", "tracker": "jira"},
"decisions": [
{
"id": "ADR-45",
"title": "Tokenise cards via vendor vault",
"status": "accepted",
"requirements": ["R-123"],
"services": ["checkout-api", "payments-gateway"],
"supersedes": null,
"prs": ["payments-gateway#812"],
"review_by": "2027-03-12"
}
]
}
A script that builds the index from the front matter of all ADRs makes both questions instant. The version below uses a plain list standing in for the parsed files, and you can run it as is:
decisions = [
{"id": "ADR-45", "title": "Tokenise cards via vendor vault", "status": "accepted",
"requirements": ["R-123"], "services": ["checkout-api", "payments-gateway"]},
{"id": "ADR-52", "title": "Async receipts via queue", "status": "accepted",
"requirements": ["R-123", "R-140"], "services": ["checkout-api", "notifications"]},
{"id": "ADR-38", "title": "Cache product pages", "status": "superseded",
"requirements": ["R-098"], "services": ["catalog"]},
]
def decisions_for_requirement(req):
return sorted(d["id"] for d in decisions if req in d["requirements"] and d["status"] == "accepted")
def services_for_decision(adr_id):
return next(d["services"] for d in decisions if d["id"] == adr_id)
def decisions_for_service(svc):
return sorted(d["id"] for d in decisions if svc in d["services"] and d["status"] == "accepted")
print(decisions_for_requirement("R-123"))
print(services_for_decision("ADR-45"))
print(decisions_for_service("checkout-api"))
Running it prints:
['ADR-45', 'ADR-52']
['checkout-api', 'payments-gateway']
['ADR-45', 'ADR-52']
How the code works: decisions is the index (in real life built by parsing each ADR's front matter). decisions_for_requirement keeps accepted ADRs whose requirements list contains the ID and returns their sorted IDs; services_for_decision finds one ADR and returns its services; decisions_for_service is the same filter on the service side. ADR-38 is excluded from every answer because its status is superseded.
The product manager's question is the first line (feature R-123 is shaped by ADR-45 and ADR-52); the engineer's question is the second (ADR-45 touches checkout-api and payments-gateway). The third handles the service owner asking what governs their service.
The process that keeps it true
- Record before implementing. A pull-request template requires an ADR link for changes labelled "architectural", and a CI (continuous integration) check fails if the linked ADR is missing or still "proposed".
- Async decision log (decisions proposed and discussed in writing rather than in a meeting). Decisions are proposed as pull requests to the ADR repository, discussed in comments, and merged when accepted; the merge is the timestamped record.
- Tickets, code and audits. The tracker ticket, the code change and any compliance item (for example an audit control, a rule an auditor tests, such as documented approval for changes;
compliance_refsholds its ID) all carry the ADR ID, so an auditor can walk from control to decision to code. - Drift check. A drift check (a scheduled comparison of what the records say against what actually exists) flags ADRs whose service names do not exist in the catalog, or services with architectural pull requests and no ADR.
Trade-offs and pitfalls
- Manual metadata rots. Validate in CI and generate what you can (for instance, the service list from the code owners file, a repository file that maps folders to the team responsible for them).
- Too many fields means nobody fills them; keep required fields to the few the two questions need.
- Bidirectional links stored in two places disagree. Choose one source of truth (front matter) and derive the reverse view.
- Requirement IDs change when trackers migrate: keep a stable ID and a mapping.
You are presenting a database sharding plan that needs several teams to agree. Which sections would the design-review deck contain, and what would you expect to be challenged on?
Sample Answer
Direct answer
A cross-team design review deck for sharding (splitting one database's data across several database servers by a key so no server holds it all) should walk the audience from the problem to the decision they must make, not through the design's history. I would order it: problem and evidence, goals and non-goals, options considered, recommended design, migration and rollback, operations and cost, risks, and a clear ask. The ask is stated on slide 1 so the room knows why it is there, and restated as the closing decision slide. I would expect the hardest challenges on the shard key, cross-shard queries, resharding, and who pays for the migration.
Sections
- The decision needed and the ask (slide 1). State what you need from each team and by when, so the room knows why it is there.
- Problem and evidence: current size, growth, the write bottleneck. Measured numbers only.
- Goals and non-goals: for example handle three times current write volume; not changing the product's consistency guarantees (what a reader is promised to see right after a write).
- Options: vertical scaling, read replicas, caching, archiving old data, sharding. Show why the cheaper ones are or are not enough. This pre-empts "have you tried X?".
- Recommended design: shard key, routing layer, shard count and growth path, how IDs are generated.
- Impact on each team: API changes, query restrictions, on-call load. Each team sees its own row.
- Migration and rollback: phased plan (dual-write, backfill, verify, cut over reads, cut over writes), with a way back at every phase.
- Operations and cost: backups, monitoring, rebalancing, added running cost.
- Risks and open questions.
- Decision, owners, timeline. Record the outcome as an ADR (architecture decision record).
Terms in the migration plan: dual-write means the application writes every change to both the old database and the new shards during the move; backfill copies the existing old data into the shards; verify compares the two; cut over reads means reads switch to the new shards first, then cut over writes, and the old database stops being the source. The routing layer is the code that looks at the shard key and sends each query to the right server. A read model is a separate copy of data shaped for reporting queries. A shard key is the field (such as customer ID) that decides which shard holds a row. Read replicas are extra copies of the database that serve reads; vertical scaling means buying a bigger single server.
Sample ask slide (slide 1, illustrative)
Decision needed by 15 March: approve moving the orders database to 64 logical shards on 4 servers, sharded by customer ID.
Payments team: accept that reports over all customers move to the analytics copy. Mobile team: no API change. On-call: one extra runbook.
Cost: about two engineers for a quarter plus added server cost (numbers on slide 8). If we do nothing: current capacity runs out at the growth rate on slide 2.
What I would expect to be challenged on
| Challenge | Prepared answer |
|---|---|
| "Why this shard key?" | Show the access patterns, and how the key avoids hot shards (one shard receiving most traffic) |
| "What about queries and joins across shards?" | Which ones become slower or unsupported; which get a separate read model |
| "How do we add shards later?" | Resharding plan, for example many small logical shards mapped onto few servers so data moves in whole units. Numbers: hash the customer ID into 64 logical shards once and never change that mapping; 4 servers hold 16 shards each. Adding a fifth server moves about 12 whole shards (targets 13, 13, 13, 13 and 12), roughly 19% of the data, instead of re-hashing every row |
| "Transactions across shards?" | Which operations need them, and the design to avoid or handle them |
| "Cost and timeline versus benefit?" | Cheaper alternatives already ruled out with data |
| "What if the migration fails?" | Rollback at each phase, and the abort criteria |
| "Why now?" | Growth curve and the date current capacity runs out |
Worked example of the key discussion. Sharding orders by customer ID keeps one customer's orders on one shard, so a "my orders" query touches one server. But a large customer becomes a hot shard, and a company-wide report must query all shards. The deck states this trade-off, names the accepted cost (reports read from a separate analytics copy) and asks reviewers for objections against those specific points.
Handling the room: pre-meet the most skeptical teams before the review, so no major objection is a surprise; timebox debate; write down objections and answers; if a point cannot be resolved, assign an owner and a date rather than deferring indefinitely. What would change my recommendation: evidence that caching plus replicas meets the growth target for the next two years cheaply.
A client asks why the design you proposed uses eventual consistency for one service. How do you explain the trade-off in plain language, what user-visible behaviour do they need to expect, and how do you reduce the confusion it could cause?
Sample Answer
Direct answer
Explain it as a deliberate choice: keeping copies of the data in several places keeps the service fast and available, and the price is that after a change the copies take a short moment to agree. Then say what a user might briefly see, and pick one concrete mitigation. Eventual consistency means all copies of the data end up identical, but not at the same instant.
Client-ready paragraph
"To keep your shop fast and running even if one data centre has a problem, we store your customers' data in more than one place. The trade-off is that after a change, the copies need a moment to catch up (we will agree a target with you, for example under five seconds). During that moment, a customer who has just updated their delivery address might still see the old one on another page. Nothing is lost, and the order itself is always safe. We have designed the screens so that people see their own change straight away."
What the client should expect to see
- Right after a change, a different page or device may show the old value for a few seconds.
- Counts such as stock levels may lag slightly, so the final availability check happens at checkout.
- Money-critical steps, such as taking a payment, are not eventually consistent: they are done in one authoritative place.
What the alternative would cost (so the client can weigh it)
The alternative is strong consistency: a change is confirmed only after every copy has it. That removes the stale moment, but each save then waits for the slowest copy (slower screens), and if the link between data centres fails the service must either refuse changes or go offline for some users. Eventual consistency accepts a brief stale read to keep saves fast and the service up. Say this in one sentence to the client: "you are choosing between a few seconds of possible lag and a slower, less available service". For the few data items where lag is unacceptable (payments, stock reservation at checkout) the design pays the strong-consistency price on purpose.
One concrete mitigation: read your own writes
After a user saves a change, show the new value from the save response, and for a short window send that user's next reads to the most up-to-date copy. The person who made the change never sees stale data, while everyone else's tiny delay goes unnoticed. Add a message such as "Saving..." until the change is confirmed.
Pitfalls
- Explaining replication mechanics. The client needs behaviour and consequences.
- Promising "instant". Promise a target and how it is monitored.
- Applying the trade-off to data where a stale read costs money or trust.
What goes on a high-level architecture diagram and short narrative meant for executives or product managers, and what do you deliberately omit? Give me the element list.
Sample Answer
Direct answer
An executive architecture diagram shows the system as its users and business would describe it: who uses it, the handful of major capabilities, what external systems it depends on, and where the risks and costs sit. It omits protocols, ports, libraries, class names and anything that only changes an engineer's decision. The narrative is a short paragraph that says what the system does for customers, how big it is, the main risk and the decision needed.
Element list for the diagram
- Users and actors: customers, staff, partner systems, named in their own words.
- The system boundary (the line separating your product from the outside world): one labelled box for the product.
- Five to eight major capabilities or building blocks (for example Catalogue, Orders, Payments), not individual microservices (small, separately deployed services).
- External dependencies (outside services the system relies on): payment provider, identity provider, data sources.
- Data flow direction: labelled arrows in business terms ("places order", "sends receipt").
- Boundaries that matter to the business: regions, regulated data, third-party ownership.
- A risk or cost marker: one colour or icon on the part that is fragile or expensive.
- Legend and date: what a box and arrow mean, and when it was checked.
What I deliberately omit
Protocols and ports, cloud service names, database engines, class or component detail, deployment scripts, internal team names. If a viewer would need a glossary, it has too much.
Worked example: order service one-slide summary
Title: "Orders: turning a customer's basket into a paid, shipped order." Diagram: Customer, then Orders (the boxes Basket, Checkout, Fulfilment), connected to Payment provider and Warehouse system. One box, Checkout, is flagged amber: "single point of failure until August" (one part whose failure stops the whole flow). Below it, three lines: user value ("customers can buy in three taps"), main risk (checkout has no fallback), two operational KPIs (key performance indicators, the few numbers that show whether the system is healthy): checkout success rate and delivery-on-time rate.
Two more cases: an ML service and a one-page sales summary
- ML recommendation service (a machine learning model that suggests products; it learns from past shoppers' clicks and purchases): the same shape, showing Shopper, Recommendations (a box labelled "suggests products using past behaviour") and the data it learns from ("past clicks and purchases"), with a KPI such as click-through, the share of shown suggestions that get clicked. For example, 1,000 suggestions shown and 50 clicked is 50/1,000 = 5% click-through. Model architecture stays in the appendix.
- A one-page summary for a salesperson, or for a colleague who will pass it on: user value first, major components, key risks, and two operational KPIs the listener can repeat accurately.
Pitfalls
Drawing the engineering diagram smaller; forgetting to say what decision the page supports; using colour without a legend.
Describe the lifecycle of an ADR from proposal to retirement. Who can change its status, what evidence is required, why do you supersede a decision rather than edit it, and how are impacted teams told?
Sample Answer
Direct answer
An ADR (Architecture Decision Record, a short document capturing one design decision and its reasoning) moves through Proposed, Accepted (or Rejected), then Deprecated or Superseded. The author proposes it, named deciders accept or reject it after review, and later it is retired when the assumptions behind it stop being true. Each status change is a reviewed pull request, requires stated evidence, and is announced to the teams affected. A decision is superseded, not edited, because people already acted on the original text, and an honest history is worth more than a tidy one.
The lifecycle
The diagram below is Mermaid (a text format that renders as boxes and arrows). Each box is a status and each arrow is a move between statuses, labelled with what causes it. [*] --> Proposed means every ADR starts as Proposed. Deprecated means still working but no longer recommended for new use.
stateDiagram-v2
[*] --> Proposed
Proposed --> Accepted: deciders approve
Proposed --> Rejected: deciders decline, reasons recorded
Accepted --> Deprecated: no longer recommended
Accepted --> Superseded: replaced by a new ADR
Deprecated --> Superseded: successor written
Who can change status, and what evidence is required
| Transition | Who | Evidence required |
|---|---|---|
| Proposed | Any engineer (the author) | Context, at least two alternatives, honest consequences |
| Accepted | The named deciders (for example the tech lead, plus reviewers for the change size) | Review comments resolved; test or prototype results where a claim needs them |
| Rejected | The same deciders | Reasons written down, so the idea is not re-proposed blindly |
| Deprecated | Owning team lead | A list of who still depends on it (from the service catalog, the internal directory of services and their owners) |
| Superseded | Owner of the new ADR, plus owners of affected services | What assumption broke or which revisit trigger fired (a measurable condition written into the old ADR that says when to reopen it), and a migration plan (the steps and dates for moving consumers from the old approach to the new one) |
Status changes happen through a pull request that the deciders (via a CODEOWNERS file, which routes reviews to named owners) must approve, so the change is dated, attributable and reviewable.
Why supersede instead of edit
- History: the old text explains why systems built during that period look as they do.
- Trust: if accepted ADRs can be silently rewritten, nobody can rely on them or audit them.
- Learning: the reason a decision changed is itself valuable, and it lives in the new ADR's context.
- Only typos and links get edited in place. Any change of meaning gets a new ADR with two-way links: "Superseded by ADR-0142" on the old one, "Supersedes ADR-0087" on the new one.
How impacted teams are told, and how migration is tracked
- The pull request mentions the owners of every consumer, found in the service catalog.
- A short announcement in the engineering channel and the weekly digest says what changed, why, and by when.
- Each affected team gets a ticket with a named migration owner and a deadline.
- A label or dashboard counts outstanding migrations, so "superseded" is not the end of the story until the count reaches zero.
Code-level action triggered by each state
- Accepted: create implementation tickets; add a lint rule or architecture test (an automated check that fails the build if code breaks the rule).
- Rejected: nothing in code; the record prevents re-litigating.
- Deprecated: CI warns on new use of the deprecated approach; new projects may not adopt it.
- Superseded: the check is updated to the new rule; old code paths are removed after migration; README links updated.
Worked example
ADR-0087 (accepted 2024) says "use long-lived API keys". A security review shows key leaks were a recurring issue, so the revisit trigger fires. ADR-0087 had recorded it as "reopen if more than 2 API keys leak in any quarter, review by 2025-06-30", and 3 leaked in one quarter. ADR-0142 proposes short-lived tokens, is accepted after two reviewers approve, and ADR-0087 becomes "Superseded by ADR-0142". Four consuming teams each get a ticket and a deadline (each ticket names a migration owner, the one person accountable for finishing that team's move), and CI warns on new API-key use.
Pitfalls
- Leaving ADRs "Accepted" forever. Add a review-by date.
- Marking superseded without a migration owner: the label changes but nothing else does.
- Letting the author alone approve their own ADR.
Unlock Full Question Bank
Get access to all Architecture Documentation and Communication interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.