System Design Fundamentals
Overview
System design is the practice of reasoning about how a large-scale system meets functional and non-functional requirements (latency, throughput, availability, cost) under failure. Every choice is a trade-off: there is no single "correct" design, only one that is appropriate for the constraints. Read this before sizing a component, choosing a datastore, or proposing a scaling strategy.
Official sources
Core concepts
- Latency vs throughput: latency is the time to perform one action; throughput is the number of actions per unit of time. Aim for maximal throughput within an acceptable latency budget — they are not the same dial.
- CAP theorem: in a distributed system that may experience network partitions you must trade off between consistency and availability; you cannot fully guarantee all three of consistency, availability, and partition tolerance at once.
- Partitioning / sharding: split data across nodes so each holds only a subset, improving capacity and performance, at the cost of cross-shard queries, rebalancing, and possible hotspots/skew.
- Replication and availability patterns: copy data across nodes for read scaling and fault tolerance; fail-over comes in active-passive and active-active flavors, each trading complexity for recovery speed.
- Consistency models: strong, eventual, and causal consistency offer different guarantees; eventual consistency buys availability and scale but requires the application to tolerate stale reads.
- Well-Architected pillars: AWS frames sound design around Operational Excellence, Security, Reliability, Performance Efficiency, Cost Optimization, and Sustainability — use them as a review checklist.
Best practices
- Quantify requirements first (expected QPS, data size, read/write ratio, latency SLO) before choosing technology — the numbers drive the design, per the System Design Primer's estimation approach.
- Make trade-offs explicit and document them; the Well-Architected method is a structured review against the six pillars, not a single answer.
- Design for failure: assume nodes, networks, and dependencies will fail and add replication, retries, and graceful degradation accordingly.
- Prefer horizontal scaling and statelessness for the request path so you can add commodity capacity rather than relying on a single large machine.
Common pitfalls
- Treating CAP as "pick any two freely" → during a partition you are really choosing between consistency and availability; partition tolerance is mandatory in real distributed systems.
- Sharding on a key with skewed access → creates hotspots; choose a partition key with even distribution and plan for resharding.
- Optimizing latency while ignoring throughput (or vice versa) → measure both and set explicit targets.
Examples
Back-of-envelope sizing (per System Design Primer estimation):
10M daily active users x 10 requests/day = 100M req/day
100M / 86,400 s ≈ 1,160 req/s average, ~3-5x peak ≈ ~5,000 req/s
Plan capacity, caching, and partitions against peak, not average.
Further reading
Related skills
- ../scalability-reliability — SLOs, resilience, and failure handling at scale
- ../caching-strategies — reduce latency and load with cache layers
- ../data-modeling — how data shape interacts with partitioning
1---2name: system-design-fundamentals3description: Latency, throughput, partitioning, replication, CAP and consistency trade-offs for designing large-scale systems; read before sizing or scaling.4domain: engineering5category: architecture6tags: [system-design, scalability, cap-theorem, distributed-systems, trade-offs]7official_sources:8 - https://github.com/donnemartin/system-design-primer9 - https://aws.amazon.com/architecture/well-architected/10verified: 2026-06-1611metadata:12 source: https://skillmd.com/skills/gabriel7silva/system-design-fundamentals13---1415# System Design Fundamentals1617## Overview18System design is the practice of reasoning about how a large-scale system meets functional and non-functional requirements (latency, throughput, availability, cost) under failure. Every choice is a trade-off: there is no single "correct" design, only one that is appropriate for the constraints. Read this before sizing a component, choosing a datastore, or proposing a scaling strategy.1920## Official sources21- The System Design Primer (concepts, trade-offs, interview material): https://github.com/donnemartin/system-design-primer22- AWS Well-Architected Framework (pillars and review methodology): https://aws.amazon.com/architecture/well-architected/2324## Core concepts25- **Latency vs throughput**: latency is the time to perform one action; throughput is the number of actions per unit of time. Aim for maximal throughput within an acceptable latency budget — they are not the same dial.26- **CAP theorem**: in a distributed system that may experience network partitions you must trade off between consistency and availability; you cannot fully guarantee all three of consistency, availability, and partition tolerance at once.27- **Partitioning / sharding**: split data across nodes so each holds only a subset, improving capacity and performance, at the cost of cross-shard queries, rebalancing, and possible hotspots/skew.28- **Replication and availability patterns**: copy data across nodes for read scaling and fault tolerance; fail-over comes in active-passive and active-active flavors, each trading complexity for recovery speed.29- **Consistency models**: strong, eventual, and causal consistency offer different guarantees; eventual consistency buys availability and scale but requires the application to tolerate stale reads.30- **Well-Architected pillars**: AWS frames sound design around Operational Excellence, Security, Reliability, Performance Efficiency, Cost Optimization, and Sustainability — use them as a review checklist.3132## Best practices33- Quantify requirements first (expected QPS, data size, read/write ratio, latency SLO) before choosing technology — the numbers drive the design, per the System Design Primer's estimation approach.34- Make trade-offs explicit and document them; the Well-Architected method is a structured review against the six pillars, not a single answer.35- Design for failure: assume nodes, networks, and dependencies will fail and add replication, retries, and graceful degradation accordingly.36- Prefer horizontal scaling and statelessness for the request path so you can add commodity capacity rather than relying on a single large machine.3738## Common pitfalls39- Treating CAP as "pick any two freely" → during a partition you are really choosing between consistency and availability; partition tolerance is mandatory in real distributed systems.40- Sharding on a key with skewed access → creates hotspots; choose a partition key with even distribution and plan for resharding.41- Optimizing latency while ignoring throughput (or vice versa) → measure both and set explicit targets.4243## Examples44```text45Back-of-envelope sizing (per System Design Primer estimation):46 10M daily active users x 10 requests/day = 100M req/day47 100M / 86,400 s ≈ 1,160 req/s average, ~3-5x peak ≈ ~5,000 req/s48 Plan capacity, caching, and partitions against peak, not average.49```5051## Further reading52- AWS Well-Architected pillars overview: https://aws.amazon.com/architecture/well-architected/53- System Design Primer index of topics: https://github.com/donnemartin/system-design-primer#index-of-system-design-topics5455## Related skills56- ../scalability-reliability — SLOs, resilience, and failure handling at scale57- ../caching-strategies — reduce latency and load with cache layers58- ../data-modeling — how data shape interacts with partitioning