Architecture decision records
Record why, not just what
An architecture decision record (ADR) explains a consequential choice, its context and consequences. Give it a stable ID, status, date, owner and links to requirements, alternatives and evidence. Record the decision separately from the facts and assumptions supporting it. For the fictional order service, ADR-001 proposes A only if order lookups are by tenant and order ID, fulfillment is asynchronous and all release gates are satisfied. If relational reporting becomes mandatory, reopen the decision; do not silently change the original record.
Map the data and trust boundaries
Draw the proposed flow below. The API checks authentication and object-level authorization before storing an order. Persist an order and an outbox item atomically using a suitable transaction; a dispatcher publishes the outbox to SQS, retries safely, and tracks dispatch. The consumer must handle repeated deliveries using an idempotency key and durable state. A 202 response means accepted for processing, not fulfilled. The client polls an authorized status endpoint. The asynchronous boundary reduces synchronous dependencies but requires queue-age alarms, dead-letter handling and reconciliation. The diagram is conceptual and does not prove connectivity, atomic external delivery or permissions.
Client -> API (authn + authz) -> Order + outbox transaction -> status readOutbox dispatcher -> SQS -> fulfillment worker -> order statusMake the trade-off testable
A relational transaction and flexible joins favor RDS when required; DynamoDB favors predictable key-based access and explicit index design. Neither is automatically cheaper or more reliable. Compare synchronous fulfillment against the queue-based design: a synchronous call can give immediate completion but makes client latency depend on downstream work; the queue separates acceptance from completion. Require p95 acceptance below 300 ms, p95 fulfillment below an invented 60 seconds, duplicate side effects zero in a replay test, and restore within RPO/RTO. Estimate monthly cost at normal and peak load, include data transfer, storage and monitoring, and verify service quotas. Do not rank options by an arbitrary score before checking non-negotiable requirements.
Decision lifecycle and rollback
A proposed ADR moves to accepted after authorized review; acceptance of a design is not permission to deploy. Record the review date, approver, open assumptions and verification plan. If new evidence changes the choice, create a replacement ADR and mark the earlier one superseded, preserving links and history. For a rollout, keep a previous deployable artifact, compatible data changes and a tested recovery path; rolling back code may not undo writes or messages. Trigger a review if actual traffic, query patterns, recovery tests or cost depart from the assumptions. Practice by adding a mandatory SQL join to the worksheet and explaining why B becomes the candidate.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Architecture decision records — knowledge check
Compare architecture constraints, decisions and risk evidence.
What belongs in an ADR?
What does HTTP 202 mean in this design?
Why use an outbox?
A later decision replaces an accepted ADR. What should happen?
When might EKS be justified?