Under the Hood

Stage 1

Core building blocks

Load balancers, caches, CDNs, object storage, queues, rate limiting.

  1. Caching & the two hard problems

    A cache is just a fast copy of data kept close to where it's needed — and the same idea repeats at every layer of a system, from the CPU to the CDN. This lesson is about application-level caching: the patterns for reading and writing through a cache (cache-aside, write-through, write-back, write-around), the expiry and eviction that keep it bounded (LRU, LFU, and the FIFO/ARC policies that answer each one's specific weakness), and then the genuinely hard part that gives the lesson its name — invalidation, keeping a cache honest when the source of truth changes. It ends on the three classic ways a cache turns from a shield into the thing that takes your database down: the stampede, penetration, and avalanche.

    15 min
  2. Queues & message brokers

    Some work has no business happening inside the request that triggered it — sending a push, processing an upload, calling a slow third party. A queue lets you hand that work off and answer the user now, while a worker does it later. This lesson covers what a broker buys you (responsiveness, decoupling, load-leveling, and scaling work across many consumers), the difference between a work queue and pub/sub, and then the part that trips everyone: delivery guarantees. Why 'exactly-once' is mostly a myth, why at-least-once plus idempotent consumers is the real answer, and how dead-letter queues and backpressure keep a queue from becoming the outage.

    14 min
  3. Object storage & the blob problem

    Where do the files go — the images, videos, PDFs, receipts, backups? Not in the database, and not on a server's local disk; both answers break in ways this lesson makes concrete. Object storage (S3, R2, GCS) is the built-for-it answer: a flat, HTTP-addressable, effectively infinite, absurdly durable store of blobs. This lesson explains how it differs from file and block storage, the properties that define it, and the one pattern you must know to use it well — presigned URLs, which let a client upload and download bytes directly without them ever touching your server. It ends on the two classic ways object storage leaks private data or melts your API.

    13 min
  4. Rate limiting: token buckets, windows, and the distributed catch

    A rate limiter caps how many requests a client may make in a window and rejects the rest — the seatbelt that keeps abuse, runaway clients, and one greedy tenant from taking a service down or running up a bill. This lesson works through the four algorithms you'll actually meet (fixed window and its boundary-burst flaw, sliding window, token bucket, leaky bucket), what to key the limit on, and the catch that surprises people the day they scale: an in-memory limiter silently multiplies its own limit by the number of servers, which is exactly the trap Fable's own limiter is written to avoid.

    13 min