# System Design Fundamentals

> From a blank requirement to a system running in production. Fourteen layers, one continuous thread — scroll to move through each one.
>
> Canonical: https://technical.nqdiepoii.com/

_Markdown rendering of https://technical.nqdiepoii.com/, returned to clients that send_ `Accept: text/markdown`.
_The interactive WebGL experience is the default for browsers._

## The 14 fundamentals

### 01 · Requirement Analysis — Define before you design

Every system begins with clarity. Separate functional needs from non-functional constraints, then turn them into measurable targets that shape every later decision.

Key concepts:
- Functional vs non-functional requirements
- Scale estimates: QPS, storage, bandwidth
- Latency, availability & consistency targets
- Constraints, assumptions & success metrics

### 02 · High Level Architecture — The shape of the system

Sketch the major building blocks and how they talk. The high-level diagram is the contract the whole team designs against — components, data flow, and boundaries.

Key concepts:
- Core components & responsibilities
- Data flow between services
- Sync vs async boundaries
- Monolith vs microservices trade-offs

### 03 · Networking Layer — How bytes find their way

Clients, load balancers, gateways and DNS route every request. The decisions here set the latency floor and the blast radius of any failure.

Key concepts:
- DNS, CDN & edge routing
- Load balancing: L4 vs L7
- Reverse proxy & API gateway
- TLS, TCP/UDP & connection reuse

### 04 · API Design — The contract with the world

APIs are the surface everyone integrates against. Design for clarity, versioning and backward compatibility — they are expensive to change once published.

Key concepts:
- REST, gRPC & GraphQL trade-offs
- Versioning & backward compatibility
- Pagination, filtering & idempotency
- Rate limiting & auth at the edge

### 05 · Application Layer — Where business logic lives

Stateless services that hold your domain logic. Keep them horizontally scalable, well-bounded and free of hidden state so any instance can serve any request.

Key concepts:
- Stateless service design
- Domain boundaries & separation of concerns
- Concurrency & connection pooling
- Configuration & feature flags

### 06 · Database Layer — The source of truth

Pick the store that fits the access pattern, not the trend. Model the data, choose your consistency, and plan for replication and sharding before you need them.

Key concepts:
- SQL vs NoSQL by access pattern
- Indexing & query optimization
- Replication, partitioning & sharding
- Transactions, ACID & isolation levels

### 07 · Cache Layer — Speed through locality

Caching trades freshness for latency. Put it where reads dominate, pick an eviction and invalidation strategy, and always respect the cost of staleness.

Key concepts:
- Cache-aside, read/write-through
- Eviction: LRU, LFU, TTL
- Invalidation & the stampede problem
- Local vs distributed (Redis / Memcached)

### 08 · Messaging Layer — Decouple with events

Queues and streams let producers and consumers move at their own pace. They absorb spikes, enable async workflows, and turn tight coupling into clean contracts.

Key concepts:
- Queues vs pub/sub vs streams
- Delivery: at-least-once vs exactly-once
- Ordering, partitions & consumer groups
- Backpressure & dead-letter queues

### 09 · Storage Layer — Bytes that persist

Beyond the database: blobs, files and object stores for large, durable artifacts. Match durability, access frequency and cost to each class of data.

Key concepts:
- Object, block & file storage
- Blob stores & CDNs for media
- Durability, tiering & lifecycle
- Hot, warm & cold data classes

### 10 · Scaling Strategy — Grow without breaking

Scale the bottleneck, not everything. Combine horizontal scaling, partitioning and statelessness so that capacity grows roughly linearly with demand.

Key concepts:
- Vertical vs horizontal scaling
- Stateless services & autoscaling
- Sharding & data partitioning
- Read replicas & write fan-out

### 11 · Reliability — Design for failure

Everything fails eventually. Add redundancy, isolate faults and degrade gracefully so a single broken part never takes the whole system down with it.

Key concepts:
- Redundancy & failover
- Retries, timeouts & circuit breakers
- Graceful degradation & bulkheads
- SLO, SLA & error budgets

### 12 · Observability — See inside the system

You can't fix what you can't see. Metrics, logs and traces turn a black box into a glass box and shrink the time from incident to insight.

Key concepts:
- Metrics, logs & distributed tracing
- Dashboards & the RED / USE methods
- Alerting & on-call signals
- SLIs and the golden signals

### 13 · Security — Trust, but verify everything

Security is a property of the whole system, not a feature. Authenticate, authorize, encrypt and validate at every boundary — and assume breach by default.

Key concepts:
- AuthN vs AuthZ & least privilege
- Encryption in transit & at rest
- Input validation & secret management
- Defense in depth & zero trust

### 14 · Deployment / Infrastructure — From commit to production

Ship safely and repeatably. Containers, CI/CD and infrastructure-as-code make deployments boring — and boring deployments are exactly the goal.

Key concepts:
- Containers & orchestration (K8s)
- CI/CD pipelines & rollbacks
- Blue-green & canary releases
- Infra-as-code & multi-region

## End of the journey

Fourteen fundamentals, one coherent system. The rest is practice — and trade-offs.

---

Agent surface: this site exposes WebMCP tools on `navigator.modelContext`
(list chapters, navigate, open a chapter detail, switch language EN/VI).
Skill docs: https://technical.nqdiepoii.com/.well-known/agent-skills/navigate/SKILL.md
