CloudArch Learn · Track
System Design Fundamentals
Learn system architecture by watching systems work.
A structured interactive textbook that teaches the mental model behind backend architecture and then applies it to production-style systems.
Progress0 / 31
Ch. 1
Mental Models
4- 04Thinking in SystemsThe four questions every architect asks first. The mental model that makes every other lesson easier.Freeinteractive
- 05Back-of-envelope MathHow to size a system in 90 seconds. The four numbers that decide every architecture call.Freeinteractive
- 06Latency NumbersHow long things actually take. The reference card for "is this design even physically possible?"Freeinteractive
- 07API Design: REST, gRPC, GraphQLThree protocols, three philosophies about how clients should talk to servers. When each one wins, and why "use REST" stopped being the universal answer.Freeinteractive
Ch. 2
Scaling
4- 08Load BalancingThe first horizontal-scale move: put a balancer in front of N replicas. Round-robin, least-conn, weighted — and what each fails at.Freeinteractive
- 09Caching PatternsCache-aside vs read-through vs write-through. Where each one wins and how cache-aside still owns the world.Freeinteractive
- 10Sharding StrategiesWhen one database stops fitting on one box. Range, hash, directory — and why resharding is the hard part.Freeinteractive
- 11ReplicationPrimary/replica, sync vs async, replication lag. The three trade-offs you can never escape.Freeinteractive
Ch. 3
Messaging & Async
3- 13Message QueuesDecouple producers from consumers with a buffer. The shape of the trade-offs you accept.Freeinteractive
- 14Event SourcingStore every change as an event, derive state by replay. Power, audit, complexity — pick which you can afford.Freeinteractive
- 15Outbox PatternHow to publish events reliably from a DB transaction. The trick that makes microservices not lose messages.Freeinteractive
Ch. 4
Distributed Theory
4- 12CAP & PACELCPick two of three — and what the third pick is in normal weather.Freeinteractive
- 17Consensus & RaftHow N nodes agree on a single answer, even with one missing. The mental model is small. The corner cases are not.Freeinteractive
- 18Distributed ClocksWhy "what happened first?" is the hardest question in distributed systems. Logical clocks vs hybrid clocks.Freeinteractive
- 19Distributed Transactions: 2PC and SagaTwo services need to update together or not at all. The textbook protocol, the production replacement, and why "just use transactions" stops working.Freeinteractive
Ch. 5
Resilience
4- 16Rate LimitingToken bucket, leaky bucket, fixed window — the three algorithms and where each one fails.Freeinteractive
- 20Circuit BreakerStop calling a dependency that's clearly broken. The pattern is small; the failure modes it prevents are not.Freeinteractive
- 21IdempotencyWhy "retry safely" is the foundation of every robust distributed system. And the deduplication keys that make it work.Freeinteractive
- 22Observability: Logs, Metrics, TracesThree pillars, four golden signals, the SLO that anchors them. How to know what your system is doing without SSH-ing into every box.Freeinteractive
Ch. 6
Storage
4- 23LSM Trees vs B-TreesWhy modern OLTP databases pick one or the other. Write-heavy vs read-heavy, compaction vs page splits.Freeinteractive
- 24Write-Ahead Log (WAL)How databases survive a crash mid-write. The append-only file that backs every modern OLTP system.Freeinteractive
- 25Transactions & IsolationACID is the easy part. The interesting question is which anomalies your isolation level still lets through — and what they look like in production.Freeinteractive
- 26Indexes: B-tree, Hash, GIN, BRINFour index types, four very different jobs. When each one wins, how each one fails, and why most production indexes are wrong.Freeinteractive
Ch. 7
Security
2Ch. 8
Case Studies
3- 27Design: URL ShortenerTinyURL/bit.ly from scratch. The math, the cache, the resolve path, the storage tier.Freeinteractive
- 28Design: Chat (1:1 + group)Real-time messaging at scale. Connection model, fanout, push, presence, history.Premiuminteractive
- 29Design: Twitter FeedPush vs pull, celebrity fan-out, the timeline cache. The single hardest read-pattern in classic system design.Premiuminteractive
Ch. 999
Other
3- 01Thinking About SystemsLearn the basic mental model for reasoning about backend systems.Freearticle
- 02CAP Theorem ReferenceA glossary-style reference for consistency, availability, and partition tolerance.Freereference
- 03Rate Limiter PracticePractice designing a service that protects downstream systems from bursty traffic.Premiumpractice