GOAT EngineerPreparing your learning space…

System Design · Concept Library

Concept Library

One idea per page, each with something you can drive.

The Concept Library is the reference half of System Design: each page takes one idea, shows it running, and stops. Alongside them sit the recurring problem patterns, where a concept has already met production, and the tools a design ends up naming. Read one when a decision needs depth, rather than working through a course to reach it. The saga is the other half, and it links into these pages at the moment each one starts to matter.

Every article in the library

  1. Program vs Process: Address Spaces

    Learn how a stored program becomes a running process. Inspect address spaces, owned handles, IPC message copies and what survives a process crash.

  2. What Do Threads Share? Heap, Stacks, State

    Learn which resources threads share inside a process, what stays private, and how an interleaving can corrupt a shared scratch buffer.

  3. FIFO vs Round-Robin CPU Scheduling Explained

    Compare FIFO and round-robin scheduling through response, waiting and completion time. Change quantum, switch cost and CPU cores in a guided lab.

  4. System Calls and Blocking I/O Explained

    Follow a read across the user and kernel boundary. See why blocked work uses no CPU, then repair worker saturation and leaked handles.

  5. Stack vs Heap: Where Your Memory Goes

    Learn memory, stack and heap through a prefix-sum program. Follow array lifetimes, then repair four guided allocation and cleanup experiments.

  6. Why Memory Access Patterns Matter

    Sum a grid in two loop orders. Learn cache lines, spatial and temporal locality, working sets and blocking with compact visuals and four guided repairs.

  7. What Does a CPU Do? Instructions and Cores

    Follow load, compute and store instructions, inspect register values, and test why extra cores help independent work but cannot remove dependencies.

  8. Bits and Bytes: Binary, Hex and UTF-8

    Learn how bits and bytes represent numbers and text. Build a byte, compare binary and hexadecimal, and repair a UTF-8 message that exceeds its buffer.

  9. Network Latency and the Speed of Light

    Learn what causes network latency, how distance and repeated round trips create a hard latency floor, and which system-design levers actually reduce it.

  10. What Happens When You Type a URL?

    Follow a web request through DNS, TCP, TLS, HTTP, application code, and the response, with an interactive path you can inspect step by step.

  11. How DNS Works: Resolution, Caching and TTL

    Learn how DNS turns a domain name into an IP address, where caching happens, what TTL controls, and how DNS choices affect reliability and latency.

  12. TCP Three-Way Handshake Explained

    Understand SYN, SYN-ACK and ACK, reliable byte streams, what a connection costs to set up, and why reusing TCP connections improves web latency.

  13. How the TLS 1.3 Handshake Works

    Understand how TLS 1.3 establishes keys, authenticates a server, protects HTTP traffic, and what the HTTPS padlock does and does not prove.

  14. How HTTP Works: Methods and Status Codes

    Learn the structure of HTTP requests and responses, methods, status codes, headers, statelessness, and the design choices interviewers expect.

  15. p99 Latency and Percentiles Explained

    Learn what p50, p95, and p99 latency mean, why averages hide the slow request tail, how fan-out amplifies tail latency, and how to read percentile metrics.

  16. SLI vs SLO vs SLA and Error Budgets

    Learn the difference between SLIs, SLOs, and SLAs, calculate an error budget, and use burn rate to balance reliability with delivery speed.

  17. Idempotency Keys: Making API Retries Safe

    Learn how idempotency keys make API retries safe, settle concurrent requests, handle key expiry, and protect effects that cross a service boundary.

  18. API Contracts: Evolving Without Breaking

    Learn what an API contract includes, how reader and writer compatibility works, and how to evolve schemas without breaking existing clients.

  19. What Is a Database and How to Choose One

    Learn what a database adds beyond a file, how transactions and constraints protect data, and how access patterns guide SQL versus specialized stores.

  20. Database Indexes: How They Speed Up Queries

    Learn how B-tree indexes avoid table scans, how query shape drives index design, how to read EXPLAIN, and what every index costs on writes.

  21. Atomic Counters and the Lost Update

    Learn why read, add one, write back silently loses increments under concurrency, and compare three fixes: atomic ops, compare-and-swap, a transaction.

  22. Distributed Rate Limiting Across Servers

    Learn why a limit that holds on one server lets multiples through on ten, and how a shared counter and an atomic check rebuild the one true count.

  23. Sliding Window Counter Rate Limiting

    Learn how two counters and a weighting approximate a rolling window, closing the burst a fixed window waves through, with no timestamp per request.

  24. Consistent Hashing: Rings and Virtual Nodes

    Learn why modulo sharding remaps almost every key when the node count changes, and how a ring with virtual nodes moves only a fraction instead.

  25. CAP Theorem: What a Partition Forces

    Learn what the choice actually is once the network splits, why pick two of three misstates it, and how to say which side your system takes and why.

  26. Horizontal vs Vertical Scaling

    Learn when scaling out beats scaling up, why twice the machines is not twice the throughput, and which tier refuses to scale out however many you add.

  27. Load Balancing: L4 vs L7 and Algorithms

    Learn how one address fronts a pool of servers: layer 4 against layer 7, the balancing algorithms, health checks, and when the balancer is the limit.

  28. CDN and Edge Caching: Hit Ratio and TTL

    Learn how a CDN answers from a few kilometres away instead of across an ocean, and work the maths deciding whether the edge saves money or becomes it.

  29. Hot Keys and Partition Skew

    Learn why a perfectly sharded system still melts on one viral key, and work the ladder of fixes from caching the hot read to splitting the hot counter.

  30. Read Replicas and Replication Lag

    Learn when read replicas fix a read-heavy database and when they do not: replication lag, reading your own writes, and how many copies a load needs.

  31. How URL Shorteners Generate Short Codes

    Learn how base62 code spaces, database uniqueness constraints, sequences, UUIDv7, and distributed ID strategies prevent short-code collisions.

  32. What Is Caching? Cache-Aside Explained

    Learn when caching reduces database load, how cache-aside handles hits and misses, and how hit ratio, TTL, invalidation, and stampedes shape the design.

  33. What Is Redis and When Should You Use It?

    Learn how Redis data structures, atomic commands, pipelining, persistence, and cluster slots support caches, counters, coordination, and streams.

  34. Load Shedding: Refusing Work Early

    Learn why the cure for overload is refusing some requests on purpose, and what a refusal costs at each layer, from the edge down to the database.

  35. Leader and Follower Replication

    Learn how a follower streams the leader’s writes so a dead disk costs nothing, and work the durability against latency choice: sync or async.

  36. Database Failover and Split Brain

    Learn how a shard keeps serving after its leader dies: detect it, promote a follower, repoint traffic, and fence the old leader against a split brain.

  37. Distributed Transactions and Sagas

    Learn why two-phase commit blocks and a saga compensates, through an operation that must end all or nothing when no single transaction can wrap it.

  38. Financial Reconciliation and Ledgers

    Learn why your ledger is only your view of the money, and how a reconciliation job diffs it against the settlement file and sorts what it finds.

  39. OSI Model and Network Layers Explained

    Learn why networks are built in layers, how encapsulation wraps each packet, which layers engineers actually use, and where L4 and L7 differ in practice.

  40. Async Processing: Off the Request Path

    Learn when to stop doing slow work inside a request: emit an event, return, finish later. See what it protects, what it costs, and when not to go async.

  41. Stream Aggregation: Windows and Watermarks

    Learn to count a never-ending event stream with windows, event time and watermarks, survive a processor crash, and decide between batch and streaming.

  42. HyperLogLog: Count Uniques in Kilobytes

    Learn how HyperLogLog counts millions of unique visitors without storing an ID: hashing, leading zeros, registers, merging sketches and its error bound.

  43. What Is Apache Kafka and How Does It Work?

    Learn how Kafka works: the append-only log, partitions, consumer groups, replication and offsets, what exactly-once means, and when a plain queue wins.

  44. Database Sharding: Shard Keys, Range vs Hash

    Learn when one database must become many, how to choose a shard key, range versus hash placement, what you give up across shards, and how to reshard.

  45. Shard Routing: App, Proxy or Database?

    Learn how a query finds its one shard, why broadcasting to every shard is costly, and where routing belongs: your app, a proxy like Vitess, or the engine.

  46. Read and Write Quorums: W + R > N Explained

    Learn why W + R > N makes a read overlap the latest write, how to tune N, R and W, why a quorum is not linearizable, and how sloppy quorums behave.

  47. Raft Leader Election and Split Brain

    Learn how Raft elects one leader while the network drops messages: terms, votes, randomized timeouts, majority overlap, and deposing a returning leader.

  48. Geo-Replication and Multi-Region Writes

    Learn why a global majority makes far-away writes slow, how a home region keeps most writes local, and what multi-region lag and write conflicts cost.

  49. Double-Entry Ledger Design for Payments

    Learn why money should never live in an overwritten column: balanced entries, append-only history, reversals, derived balances and integer amounts.

  50. Consistency vs Locality in Multi-Region Data

    Learn to decide where each kind of data lives: the closer to its writer, the harder to keep consistent everywhere. Includes a per-workload placement guide.

By GOAT Engineer. System Design · Privacy Policy · Contact.