Requirements
Start with user behavior and business constraints. Functional requirements describe what the system does; non-functional requirements define how well it must do it.
A PRACTICAL FIELD GUIDE
System design is the practice of turning product requirements into software that remains useful as traffic grows, dependencies fail, and teams evolve.
THE CORE IDEA
There is no perfect architecture.
There is an architecture whose trade-offs match the problem.
01 / START WITH THE PROBLEM
A useful design explains why each component exists. These four questions establish the evidence for every later decision.
Start with user behavior and business constraints. Functional requirements describe what the system does; non-functional requirements define how well it must do it.
Estimate traffic, storage, bandwidth, and growth. Rough numbers expose the shape of the problem before a single technology is chosen.
Model the entities, access patterns, ownership, retention, and consistency needs. The best database depends on how the data will be used.
Assume networks partition, machines restart, dependencies slow down, and messages arrive twice. Reliability comes from designing those states explicitly.
02 / THE BUILDING BLOCKS
Components are not goals. Add one when it solves a measured constraint or isolates a meaningful failure mode.
Initiates work and renders results. Web, mobile, devices, or another service.
Terminates connections and serves content near users to reduce latency and origin load.
Distributes requests across healthy instances and removes failed ones from rotation.
Applies domain rules. Stateless services are easier to replicate horizontally.
Trades freshness and complexity for lower latency and database pressure.
Persists source-of-truth state with a consistency model and access strategy.
Decouples producers from consumers and absorbs bursts of asynchronous work.
Makes behavior visible through metrics, logs, traces, alerts, and business signals.
03 / SCALE WITH INTENT
Scaling is not adding everything at once. It is locating the current constraint and applying the smallest useful pattern.
Read replicas increase read capacity and resilience. They introduce replication lag, so not every read is guaranteed to be current.
Partition data by a stable key to distribute storage and writes. Poor keys create hot partitions and painful rebalancing.
Cache frequent reads near consumers. Define eviction, invalidation, fallback, and acceptable staleness before relying on it.
Queues absorb bursts and isolate failures. Plan for retries, duplicates, poison messages, backpressure, and monitoring.
04 / SYSTEMS IN CONTEXT
Compare how product behavior changes the architecture. Each example optimizes a different critical path.
Read-heavy · global · small objects
How do we redirect billions of short links with very low latency?
Connection-heavy · real-time · ordered
How do we preserve conversation order while users move between devices?
Storage-heavy · bandwidth-heavy · asynchronous
How do we accept large uploads and stream efficiently to a global audience?
Write-critical · multi-service · correctness-first
How do we coordinate inventory, payment, and orders without a distributed transaction?
05 / MAKE TRADE-OFFS EXPLICIT
A mature design states what it protects, what it relaxes, and how users experience that choice.
| Priority | What it means | Often critical for | Typical cost |
|---|---|---|---|
| Consistency | Every reader sees the latest accepted write. | Payments, inventory, permissions. | More coordination and potentially higher latency. |
| Availability | The system responds even when part of it is impaired. | Feeds, catalogs, cached content. | Responses may be stale or incomplete. |
| Low latency | The user receives a response quickly. | Search suggestions, gaming, chat. | Caching, replication, and operational complexity. |
| Durability | Accepted data survives failures. | Orders, files, audit records. | Extra replicas, acknowledgements, and cost. |
During a network partition, a distributed system must choose how strongly to preserve consistency or availability for a given operation. CAP is not a database ranking; it is a framework for reasoning about behavior under partition.
06 / A REPEATABLE DESIGN METHOD
The order prevents premature technology choices and keeps the design connected to user outcomes.
Users, core actions, boundaries, constraints, and what is explicitly out of scope.
Peak requests, data size, read/write ratio, bandwidth, and expected growth.
Define the contract and make retries, pagination, errors, and versioning explicit.
Choose entities, keys, indexes, partitions, retention, and consistency per workflow.
Place the minimum components needed for the critical read and write paths.
Find bottlenecks, hot keys, dependency failures, overload behavior, and recovery paths.
Add service-level objectives, signals, alerts, capacity plans, and safe deployment paths.
08 / FIELD NOTES
Practical essays that connect execution and data models with the behavior, limits, and failure modes of production systems.
POSTGRES · STORAGE & MVCC · 16 MIN · ES/EN
Pages of 8 KB, line pointers, ctid, what a B-tree index really stores, xmin/xmax visibility, HOT updates, dead tuples, bloat, and why one long transaction holds vacuum back across the whole instance.
DATABASES · DATA MODELING · 18 MIN · ES/EN
A practical guide to access patterns, relational and NoSQL models, normalization, indexes, sharding, CAP, and polyglot persistence with one source of truth.
PYTHON · CONCURRENCIA · 16 MIN
Una guía para distinguir espera de cómputo, elegir entre asyncio, threads y procesos, y convertir esa decisión en un sistema con límites, backpressure y fallos controlados.
Leer el artículo ↗ALGORITHMS · DATA STRUCTURES · 14 MIN · EN
A practical comparison of arrays, hash tables, trees, heaps, queues, and tries— including the operations each one makes cheap and the real-world costs Big O leaves out.
Read the article ↗09 / READING THE CLASSICS
Kleppmann's book is the reference most system design conversations quietly borrow from. These are my own notes, written to be studied: one page per chapter, with the arguments redrawn as diagrams.
CHAPTER 01 Available
The three concerns that justify every later decision, and why "is it scalable?" is the wrong question.
Designing Data-Intensive Applications Martin Kleppmann · 1st edition, 2017
Original study notes and diagrams. The book itself is by Martin Kleppmann (O'Reilly Media, 1st edition, 2017) — dataintensive.net.
THE DEFINITION OF DONE
You can trace every component to a requirement, describe its failure behavior, measure its health, and name the trade-off you accepted.
Review from the top ↑