Technical design document
A design doc template covering context, goals and non-goals, proposed design, alternatives, risks, rollout plan and open questions.
المعاينة
| Field | Value |
|---|---|
| Author | {{author_name}} |
| Team | {{team_name}} |
| Reviewers | {{reviewers}} |
| Status | Draft / In review / Approved |
| Target date | {{target_date}} |
1. Context
[[Two or three paragraphs: what exists today, what is broken or missing, and why now. Link the PRD or ticket.]]
2. Goals and non-goals
Goals
- [[Measurable goal, e.g. p95 latency under 200 ms]]
- [[Measurable goal]]
- [[Measurable goal]]
Non-goals
- [[Something reasonable people might expect but is explicitly out of scope]]
- [[Another explicit non-goal]]
3. Background
[[Terms, existing components and constraints a reviewer needs in order to follow the design.]]
4. Proposed design
4.1 Overview
[[One paragraph summary of the approach.]]
Mermaid
flowchart LR
U["Client"] --> G["API gateway"]
G --> S["{{feature_name}} service"]
S --> D[("Database")]
S --> Q["Queue"]
Q --> W["Worker"]4.2 Components
| Component | Responsibility | Owner |
|---|---|---|
| [[Service A]] | [[What it does]] | [[Team]] |
| [[Service B]] | [[What it does]] | [[Team]] |
4.3 Data model
SQL
CREATE TABLE [[table_name]] (
id BIGINT PRIMARY KEY,
created_at TIMESTAMP NOT NULL DEFAULT now(),
status TEXT NOT NULL
);4.4 API changes
| Method | Path | Change |
|---|---|---|
| POST | /v1/[[resource]] |
New |
| GET | /v1/[[resource]]/{id} |
New |
4.5 Capacity and performance
Expected load is requests per second with mean service time . By Little's law the average concurrency is
[[Plug in your numbers and state the headroom you are designing for.]]
4.6 Security and privacy
- [[AuthN and AuthZ model]]
- [[Data classification and retention]]
- [[Threats considered]]
5. Alternatives considered
| Option | Pros | Cons | Decision |
|---|---|---|---|
| Proposed design | [[Pros]] | [[Cons]] | Chosen |
| [[Alternative 1]] | [[Pros]] | [[Cons]] | Rejected: [[reason]] |
| [[Alternative 2]] | [[Pros]] | [[Cons]] | Rejected: [[reason]] |
| Do nothing | No cost | [[Impact of the status quo]] | Rejected |
6. Rollout plan
Mermaid
gantt
title Rollout
dateFormat YYYY-MM-DD
section Build
Implementation :a1, 2026-11-01, 21d
Internal testing :a2, after a1, 7d
section Launch
Canary 5% :b1, after a2, 3d
Gradual to 100% :b2, after b1, 7d- Feature flag created and defaulted off
- Dashboards and alerts in place
- Runbook written and reviewed
- Rollback tested in staging
Rollback: [[How to revert and how long it takes.]]
7. Observability
| Signal | Metric | Alert threshold |
|---|---|---|
| Latency | p95 request duration | [[> 300 ms for 5 min]] |
| Errors | 5xx rate | [[> 1% for 5 min]] |
| Saturation | Queue depth | [[> 1,000 messages]] |
8. Risks
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| [[Risk 1]] | [[Low / Medium / High]] | [[Low / Medium / High]] | [[Mitigation]] |
| [[Risk 2]] | [[Low / Medium / High]] | [[Low / Medium / High]] | [[Mitigation]] |
9. Open questions
- [[Question that needs an owner and a date]]
- [[Question that needs an owner and a date]]
10. Milestones
| Milestone | Date | Owner |
|---|---|---|
| Design approved | [[Date]] | {{author_name}} |
| Implementation complete | [[Date]] | [[Owner]] |
| General availability | {{target_date}} | [[Owner]] |