Architecture Decisions: Immutable ADRs, MADR Format & Rationale Capture
Preventing architectural amnesia through version-controlled Architecture Decision Records (ADRs), status lifecycles, and change control.
Architecture Decision Records (ADRs): Preventing Architectural Amnesia
An Architecture Decision Record (ADR) is a short, version-controlled markdown document that captures a critical architectural choice, the context in which it was made, alternatives evaluated, and the accepted positive and negative tradeoffs. Instead of relying on ephemeral Slack threads or whiteboard memories, ADRs live directly in the Git repository alongside the code.
The Four Immutable ADR Lifecycle States
Under active review by engineering and architecture teams; open for feedback and benchmarking spikes.
Formally approved by principal architects and stakeholders; represents active architectural law in the codebase.
Replaced by a newer decision record (e.g. ADR-028 supersedes ADR-014); preserved immutably for historical audit trails.
Architecture pattern is being phased out; no new services may adopt this approach.
Interactive ADR Inspector: ADR-014 — Asynchronous Ingestion Pipeline for Medical Device Telemetry
1. Context & Problem Statement
Our medical monitoring platform receives continuous vitals telemetry (heart rate, SpO2, glucose) from 50,000+ connected wearable patient monitors. Under peak load, synchronous HTTP ingestion directly to PostgreSQL created connection pool exhaustion, leading to intermittent 504 Gateway Timeouts and potential telemetry packet loss. Regulatory mandate ISO 13485 Cl. 7.3.3 requires zero data loss for critical clinical vitals.
2. Architectural Decision Outcome
We will decouple telemetry ingestion by introducing an asynchronous Apache Kafka event streaming cluster with a redundant Redis cache layer. The public API gateway will validate the cryptographic JWT signature, push the raw telemetry payload to Kafka in <15ms, and return HTTP 202 Accepted. Dedicated consumer microservices will process validation, clinical threshold alerting, and persistent database writes in parallel.
✓ Positive Tradeoffs
- API Gateway ingestion response time reduced from 340ms to 12ms (p95).
- Ingestion tier can buffer up to 48 hours of telemetry during downstream database maintenance windows.
- Achieved 100% telemetry delivery reliability with zero dropped patient packets.
⚠ Accepted Limitations / Maintenance
- Introduces eventual consistency: telemetry records appear in the clinical dashboard with a 250ms–500ms lag.
- Requires operational monitoring and disaster recovery setup for Apache Kafka cluster.
Standard Markdown Architectural Decision Record (MADR) Template
Use this prompt to convert engineering debate notes into an immutable, audit-ready MADR record:
Community Discussion & Feedback
Attributed peer feedback and official Netspective architecture notes.