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 stakeholder left a review with a wrong picture of your system because of how your diagram was drawn. What are the common ways architecture diagrams mislead readers, and how do you guard against each when you draw or review one?
Sample Answer
Direct answer
Diagrams mislead through what they leave out, what their shapes imply, and what their lines hide. The common cases are omitted dependencies, misleading scale or layering, hidden asynchronous or failure paths, ambiguous arrows, mixed abstraction levels and missing context. For each, draw or review with a specific guard, and test the result by asking a reader to explain it back. Asynchronous (async) means the caller sends a request and does not wait for the reply.
Common ways diagrams mislead, and the correction for each
| How it misleads | Example | Guard when drawing or reviewing |
|---|---|---|
| Omitted dependencies | Identity provider (the service that logs users in), DNS, a third-party payment API, a shared database or a scheduled job are missing | Build the dependency list from real sources (infrastructure code, the files that define what is deployed; egress rules, the firewall settings listing which outside addresses our systems may call; the service catalogue, the registry of services and their owners), and draw external systems inside a dashed "outside our control" boundary (a dashed box around everything we do not operate) |
| Misleading scale | One box stands for 40 services, or a three-node cluster looks like one machine; a bigger box looks more important | Uniform box sizes; annotate counts ("x40 instances", "cluster of 3"); state which C4 level (context, containers, components, code) the diagram shows |
| Misleading layering | Neat tiers imply calls only go downward when some skip layers | Draw layers only when enforced; otherwise show real call arrows |
| Hidden async or failure paths | Every arrow is a solid line; queues, retries, timeouts, fallbacks and the dead-letter queue (a holding queue for messages that keep failing) are absent | Distinct line style for async, label the mechanism, and for each arrow that can fail add what the caller sees when the target is down |
| Ambiguous arrows | An arrow may mean who initiates, where data flows, or ownership | Label every arrow with a verb, data and protocol, and define direction in a legend |
| Mixed abstraction and no context | A table, a service and a team share one canvas; no date, legend or owner | One level per diagram; header with owner and last-reviewed date; colour never the only signal |
Worked example: the stakeholder who misread the system
The original diagram drew the web app, the Orders API and the Payments service joined by solid, unlabelled arrows. The stakeholder concluded the customer sees the payment result immediately. In reality the Orders API publishes an event, and payment confirmation arrives seconds later, is retried on failure and sometimes ends in manual review. Corrected version:
flowchart LR
web[Web app] -->|"HTTPS, JSON, waits for reply"| orders[Orders API]
orders -.->|"async event via queue, retried"| q[(Payments queue)]
q -.->|"consumed later"| pay[Payments service]
q -.->|"after 5 failed tries"| dlq[(Dead-letter queue)]
How to read it: a solid arrow means the caller waits for the reply; a dotted arrow means it sends and moves on. The web app waits only for the Orders API. Everything after the queue is dotted, so the reader sees that payment happens later, and failed messages end in the dead-letter queue, where a person reviews them by hand (the manual review the story mentions).
A note beside it reads: "Customer sees 'order received', not 'payment confirmed'. Confirmation arrives by email." The line style, the labels and the dead-letter queue now show the delay and the failure path.
Reviewing someone else's diagram
- Trace one request end to end aloud, following the arrows box by box (for example "the customer clicks Pay, the web app calls Orders, Orders queues an event, ..."). If the diagram cannot answer "what happens if this box is down?", it is hiding a failure path.
- Compare it with the real dependency list.
- Use the teach-back test: ask a person who did not draw it to explain it back in their own words, then compare their account with what happens. If they say "the customer sees payment confirmed instantly", the diagram failed.
Pitfalls
- Adding more boxes to fix confusion. The fix is usually a clearer level or labelled arrows.
- Relying on colour or a tiny legend nobody reads.
- Assuming the reviewer's mental model is shared. It rarely is.
You depend on external systems for tax calculation, identity verification and analytics. How do you document each integration point so the failure behaviour and ownership are clear to someone on call?
Sample Answer
Direct answer
For each external dependency I keep one short "integration card" in the repo of the service that calls it, written for the person on call: what the dependency does for us, who owns it on both sides, how it fails, what our system then does, what the user sees, and where to look first. The failure behaviour must be decided and written down per dependency, because "the tax API is down" needs a different response from "the analytics API is down".
The card (fields)
- Purpose and criticality: what breaks for users if it is gone (blocks checkout, degrades, invisible).
- Owner: our owning team and on-call channel, plus the vendor's support route, account or contract reference, and status page.
- Call details: endpoint, timeout, retry policy, circuit breaker (a switch that stops calling a failing dependency for a while so it can recover and so we do not pile on).
- Failure behaviour: fail closed (refuse the action) or fail open (proceed without it), any fallback, and what the user sees.
- Data sent: especially personal data, which affects vendor risk and incident duty.
- Signals: dashboard link, the alert, and what "unhealthy" means.
- Runbook link (a step-by-step operating guide) with first three steps, and the credential rotation procedure.
Worked example: the three dependencies (timeouts and thresholds are illustrative values to be tuned)
| Tax calculation | Identity verification | Analytics | |
|---|---|---|---|
| Criticality | High: needed to price an order | High for new high-risk accounts, none for existing users | Low: no user impact |
| Timeout / retry | 2 s, one retry | 5 s, no automatic retry (the vendor step is not safe to repeat blindly) | 500 ms, none |
| On failure | Fail closed for checkout by default; finance may approve a fallback to last known rates per region, with orders flagged for reconciliation | Fail closed: put the account in "pending review" and queue for later retry or manual review | Fail open: drop or buffer events, never block the request |
| User sees | "We cannot calculate tax right now, try again shortly" | "Verification is taking longer than usual, we will email you" | Nothing |
| Page the on-call? | Yes when error rate stays high for 5 minutes | Yes when the pending queue keeps growing | No, ticket only |
| Vendor-side owner | Vendor support plus account manager | Vendor support | Vendor support |
Notice that the fallback for tax is a business and legal decision, so the card names who approved it, rather than an engineer guessing at 3 a.m.
How the card helps at 3 a.m.
The on-call engineer reads the page from the alert, sees "fail closed, checkout blocked, check vendor status page, then the circuit breaker dashboard", and knows within a minute whether the problem is theirs, the vendor's, or a bad credential.
Trade-offs and pitfalls
- Documenting only the happy-path API contract is the common miss; the failure column is the valuable one.
- Cards rot. Put them next to the code, require a card in the pull request that adds a new integration, and review them when the vendor contract renews or an incident involves that vendor.
- Do not copy the vendor's docs into the card; link to them and record only our decisions and our numbers.
How would you represent, and keep current, the dependency map between many teams' APIs so that single points of failure are visible? What signals tell you the map has drifted from reality?
Sample Answer
Direct answer
I keep two maps and compare them. The declared map is what teams say they depend on, written in each service's descriptor file and rendered as a graph. The observed map is what traffic really does, built from distributed traces (records that follow one request across services) or from logs of the API gateway (the front door that receives external calls) and of the service mesh (infrastructure that proxies every service-to-service call and records it). Single points of failure are visible on the declared graph by fan-in (how many services depend on a node) and by whether the dependency is hard (no fallback), and drift is the difference between the two maps.
Representing it
A descriptor file is a small file kept in each service's repository that describes the service for tools (name, owner, dependencies). A sketch (illustrative field names):
name: checkout
owner: checkout-team
dependsOn:
- service: payments
contract: payments-api@v2
criticality: hard
- service: recommendations
contract: reco-api@v1
criticality: soft
- service: order-events
contract: OrderCreated@v3
criticality: async
A script reads every such file and turns each dependsOn entry into one directed edge (checkout -> payments, and so on), tagged hard, soft or async. In more detail:
- Each service declares
dependsOnentries with the callee's name, the API contract version, and a criticality flag: hard (requests fail without it), soft (degrades gracefully) or async (event-based, buffered). - A script builds a graph from all descriptors, in the catalog or as generated diagrams per domain.
- SPOF (single point of failure) flags: a node with fan-in of 2 or more, a hard dependency, and no redundancy or fallback recorded.
- Ownership is attached to each node, so a risky node always has a team behind it.
Keeping it current: declared versus observed
Illustrative example:
| Edges | |
|---|---|
| Declared | A to B, A to C, B to D, C to D, C to E |
| Observed in the last 30 days | A to B, B to D, C to D, C to E, A to E, B to F |
Comparing the two sets:
- Observed but undeclared: A to E and B to F. These are the dangerous ones, since nobody documented them and nobody is planning around them.
- Declared but never seen: A to C. Either the dependency is dead code, or it is a rarely used path such as a failover, which the team should confirm.
- Fan-in: D is called by B and C (fan-in 2), and E by C and A (fan-in 2, counting the undeclared edge). If D is a hard dependency with no fallback, it is the first SPOF to review, and the undeclared A to E edge shows E was underrated.
What to fix first. Fan-in of 2 or more only makes a node a candidate, because almost every shared service has that. Rank the candidates: first those where the dependency is hard and there is no fallback, then by how much traffic or revenue passes through, then by how weak the node is (single instance, unowned, poor reliability history). In the example, D (hard, no fallback, called by B and C) goes first; E is next only if the A to E path turns out to be hard.
Signals that the map has drifted
- Undeclared observed edges, and declared edges with zero traffic for 30 days (the set difference above).
- Services in traces or in the deploy system that have no descriptor, or descriptors whose service no longer deploys.
- Descriptors whose last-modified or last-verified date is older than a threshold such as 90 days while the service's code changed.
- A new owner or on-call team that no descriptor mentions.
- An incident where the postmortem (written review after an outage) says "we did not know X depended on Y".
- Contract version mismatch: the caller declares
v1while traffic showsv2.
Process to keep it honest
A weekly job diffs declared against observed and opens a ticket on the owning team for each mismatch. Declarations are updated in the same pull request as a new integration, and a CI (continuous integration, the automated build) check refuses names that do not resolve to a descriptor.
Trade-offs and pitfalls
- Traces are sampled (only a fraction of requests are recorded as traces to save cost), so a rare path may be missing from the observed map; use the mesh or gateway logs for completeness, and treat "not seen" as a question, not proof.
- The observed map cannot say whether an edge is hard or soft; that judgement stays with the owning team, and chaos or failure-injection tests (deliberately switching a dependency off in a controlled way to see whether callers survive) can confirm it.
- If the tool requires heavy manual entry, teams will skip it. Generate as much as possible from traces and treat declarations as the reviewed layer.
Two teams use different icons and naming in their architecture diagrams, and it is confusing readers. How do you get to a shared convention, what do you require in the docs, and how do you make it stick?
Sample Answer
Direct answer
I would not pick a winner between the two teams' styles. I would run one short working session with both teams and a few readers, agree on a minimal shared convention built on an existing notation (for example the C4 model, a common way to draw architecture at four zoom levels: context, container, component and code views), record it, and enforce it with a template and an automated check so it survives after the meeting. The aim is fewer than ten rules that fix the actual confusion, not a style guide nobody reads.
Step 1: diagnose what actually confuses readers (a day)
Collect five or six real examples: the same service called "Payments Svc" in one diagram and payments-api in another, a cylinder meaning "database" in one and "queue" in the other, one team colouring by owner and the other by environment. Ask readers, such as on-call engineers and new hires, which ambiguity cost them time. That evidence keeps the debate off taste.
Step 2: agree the convention (one 60-minute session)
Both teams attend, I facilitate, and the decision rule is stated up front: the readers' confusion decides, not team preference. Output, for example:
- Names come from the service catalog (the registry listing every service with its exact name and owner), exactly as registered.
- One shape means one thing: box for service, cylinder for datastore, a queue symbol for message queue; vendor icons only inside a labelled cloud boundary.
- Solid arrow for synchronous call, dashed for asynchronous; arrows point in the direction of the call.
- Colour is reserved for one meaning (health, or environment), never for teams.
Step 3: what the docs must contain
Every diagram needs: a title that states its type and level (for example "Container view: checkout"), a legend, an owner, the date last reviewed, and a link to the diagram source file, not only an image. The decision is recorded as a short ADR (architecture decision record: a dated note stating the decision and why), so nobody reopens it without new evidence.
Step 4: make it stick
- Ship a template and a shared icon and shape library in the diagramming tool, so following the convention is the easy path.
- Add a check in continuous integration (the automated build that runs on each change) for diagrams stored as text: names must exist in the catalog, a legend and owner must be present.
- Add one line to the review checklist for architecture pull requests.
- Migrate old diagrams when they are next edited, not in a big-bang rewrite (redrawing everything at once, which stalls and gets abandoned); name a champion in each team (one person who answers questions and nudges colleagues).
- Review after one quarter: which rule was ignored, and why?
What "diagram as text" and the check look like (illustrative)
A text diagram is a small file that a tool renders into a picture, so it can be reviewed like code. For example, a Mermaid file docs/checkout.mmd:
flowchart LR
web["web-store"] -->|sync| pay["payments-api"]
pay -.->|async| q[("payment-events queue")]
A CI check reads the names in the file and compares them with the catalog. If payments-api were mistyped as "Payments Svc", the build would fail with a message like this (wording depends on the script you write):
docs/checkout.mmd: unknown service name "Payments Svc" (not in catalog). Did you mean "payments-api"?
docs/checkout.mmd: missing legend
Trade-offs and pitfalls
- A strict, long standard gets ignored; a five-to-eight-rule standard survives. I would drop any rule nobody can point to a confusion for.
- If one team's diagrams are generated from code, adopt its naming as the base, because a rule that is enforced by a tool beats one that relies on discipline.
- If the two teams have a history of conflict, get their shared manager to endorse the outcome, but do not let it become an order handed down; adoption came from the teams shaping it.
You join a team that has resisted formal documentation. How do you introduce decision records so they get used, what format do you pick, and how do you keep them from going stale?
Sample Answer
Direct answer
I start by finding out why they resist, then make decision records small, useful on day one, and attached to work they already do. I pick a one-page markdown format in the repository (context, decision, alternatives, consequences, and a status line), introduce it on one real decision that is happening this week, and keep it alive with a review-by date and a short recurring triage. I do not announce a documentation policy.
Step 1: understand the resistance (first week)
Ask three engineers what happened to past documentation. Typical answers: "it was out of date within a month", "the template took an hour", "nobody read it". Each answer shapes the design. If the pain is staleness, the format must be cheap to keep current; if it is bureaucracy, no approvals.
Step 2: pick the format
An ADR (Architecture Decision Record, a short document capturing one significant decision, what else was considered and its consequences) in the lightweight style popularised by Michael Nygard (who described it in a short blog post as a few sentences each for title, status, context, decision and consequences), extended with a one-line "alternatives considered". Reasons:
- Markdown in the repo (for example
docs/adr/0001-use-postgres.md): no new tool, reviewed in the pull request like code, and history comes free from Git. - One page, about ten minutes to write. Longer formats can come later if wanted.
- Where it lives and who owns the habit: in the repository of the service it governs, with a shared index for cross-team ones. The team's tech lead approves the content; the engineering manager (the person who manages the team, not its technical design) makes sure the habit exists.
Step 3: introduce it on a live decision
Choose an upcoming choice the team is already debating (for example which queue to use). In the design discussion, write the ADR together in 20 minutes on a shared screen. The team experiences the payoff immediately: the argument ends, the reasoning is saved, and the next person will not repeat it.
Step 4: rules of thumb, not mandates
Write one when a decision is hard to reverse, affects another team, or was argued about. Skip it for small choices. This keeps volume low and value high.
Step 5: embed it in existing work
- The pull request template asks "does this change a recorded decision?".
- Code review comments link to the ADR instead of re-arguing.
- The onboarding list (what new hires work through in their first weeks) includes the 5 most important ADRs.
Step 6: keep them from going stale
| Mechanism | How it works |
|---|---|
Status and review_by date | Every ADR states its status and a date by which someone must re-check it (for example review_by: 2027-03-12) |
| Owner | The team that owns the service owns the ADR, not "the architects" |
| 30-minute quarterly triage | List accepted ADRs past their date; confirm, update or supersede each one |
| Supersede, don't edit | When a decision changes, write a new ADR that replaces the old one instead of rewriting it; keeps history trustworthy |
| Link from code | README and config point to the ADR so it is found when the code is touched |
Worked 90-day plan
- Days 1-10: listen; agree the format and folder.
- Days 10-30: write two ADRs on live decisions, with the team.
- Days 30-60: add the pull request template question; new hire reads them.
- Days 60-90: first triage meeting; ask the team whether it helped and drop anything that did not.
Success measures (qualitative first): people cite ADRs in reviews; a new hire finds the reason for a design without asking; the number of repeated debates falls. Counting ADRs alone is a vanity metric (a number that looks impressive but says nothing about whether anyone benefits).
Pitfalls
- Mandating from the top before any value is seen.
- Backfilling years of history; write only the decisions that still matter.
- Turning the ADR into an approval gate so people avoid writing them.
What would change my choice
If the team truly lives in a wiki and never opens the repo docs, I would put ADRs in the wiki with page history, but the repo is preferable because it sits with the code.
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.