[ { "id": 1, "path": "lessons/01-the-last-seat.md", "title": "Two successful transactions, one impossible result", "prerequisites": [], "sources": [ "components/21-database-isolation-levels-acid-and-concurrency-anomalies.md" ], "problem": "Two buyers both reserve the last seat.", "prototype": true }, { "id": 2, "path": "lessons/02-the-promise-in-ok.md", "title": "The write that survived the process but not the machine", "prerequisites": [ 1 ], "sources": [ "components/07-write-ahead-log-and-lsm-trees.md", "loop-primitives/01-write-ahead-log-fsync-and-group-commit.md" ], "problem": "A successful write disappears after power loss.", "prototype": false }, { "id": 3, "path": "lessons/03-recovering-the-right-history.md", "title": "The file exists, but recovery must ignore it", "prerequisites": [ 2 ], "sources": [ "components/07-write-ahead-log-and-lsm-trees.md", "loop-primitives/01-write-ahead-log-fsync-and-group-commit.md", "loop-primitives/02-lsm-trees-and-compaction.md" ], "problem": "A crash leaves an SSTable outside the durable manifest.", "prototype": false }, { "id": 4, "path": "lessons/04-the-compaction-debt.md", "title": "Fast writes, then a completely frozen database", "prerequisites": [ 3 ], "sources": [ "components/07-write-ahead-log-and-lsm-trees.md", "loop-primitives/02-lsm-trees-and-compaction.md" ], "problem": "Background merging cannot keep up with foreground writes.", "prototype": false }, { "id": 5, "path": "lessons/05-asking-a-cheaper-question.md", "title": "Can we prove the key is absent without reading it?", "prerequisites": [ 4 ], "sources": [ "components/03-bloom-filters-and-counting-filters.md" ], "problem": "Negative lookups spend most of the disk budget.", "prototype": false }, { "id": 6, "path": "lessons/06-the-timeout-that-did-not-cancel.md", "title": "The client gave up; the server kept working", "prerequisites": [ 1 ], "sources": [ "components/22-circuit-breaker-bulkhead-and-fault-tolerance-patterns.md", "loop-primitives/10-retries-timeouts-backpressure-and-load-shedding.md" ], "problem": "Retries multiply work whose outcomes remain unknown.", "prototype": false }, { "id": 7, "path": "lessons/07-saving-the-healthy-half.md", "title": "An optional widget exhausts the checkout pool", "prerequisites": [ 6 ], "sources": [ "components/14-api-gateway-and-reverse-proxy.md", "components/22-circuit-breaker-bulkhead-and-fault-tolerance-patterns.md", "loop-primitives/10-retries-timeouts-backpressure-and-load-shedding.md" ], "problem": "A slow dependency consumes resources needed by healthy routes.", "prototype": false }, { "id": 8, "path": "lessons/08-one-bucket-one-decision.md", "title": "The limiter that allows twice its advertised limit", "prerequisites": [ 1 ], "sources": [ "components/02-distributed-rate-limiting.md", "loop-primitives/14-rate-limiting-algorithms.md" ], "problem": "A window boundary permits an unexpected burst.", "prototype": true }, { "id": 9, "path": "lessons/09-sharing-a-budget.md", "title": "Twenty correct limiters enforce the wrong limit", "prerequisites": [ 8, 7 ], "sources": [ "components/02-distributed-rate-limiting.md", "loop-primitives/14-rate-limiting-algorithms.md" ], "problem": "Local enforcement multiplies a tenant budget by fleet size.", "prototype": false }, { "id": 10, "path": "lessons/10-the-price-that-came-back.md", "title": "Deleting the cache resurrected the old price", "prerequisites": [ 1, 6 ], "sources": [ "components/04-distributed-cache-patterns-and-eviction.md", "loop-primitives/11-caching-and-invalidation.md" ], "problem": "A slow refill races a committed update.", "prototype": false }, { "id": 11, "path": "lessons/11-when-the-cache-disappears.md", "title": "The database cannot survive a successful cache", "prerequisites": [ 10, 7, 5 ], "sources": [ "components/04-distributed-cache-patterns-and-eviction.md", "loop-primitives/11-caching-and-invalidation.md" ], "problem": "A cold cache turns nearly every request into origin work.", "prototype": false }, { "id": 12, "path": "lessons/12-where-a-key-lives.md", "title": "Adding a server moved almost everything", "prerequisites": [ 1 ], "sources": [ "components/01-consistent-hashing.md", "components/08-database-sharding-and-partition-keys.md", "loop-primitives/08-sharding-hot-keys-and-rebalancing.md" ], "problem": "Modulo routing remaps data during expansion.", "prototype": false }, { "id": 13, "path": "lessons/13-the-hot-key.md", "title": "The cluster is idle and one customer is throttled", "prerequisites": [ 12, 7, 11 ], "sources": [ "components/01-consistent-hashing.md", "components/08-database-sharding-and-partition-keys.md", "loop-primitives/08-sharding-hot-keys-and-rebalancing.md" ], "problem": "One logical key exceeds the capacity of its owner.", "prototype": false }, { "id": 14, "path": "lessons/14-copies-that-disagree.md", "title": "The database acknowledged a write the replica cannot read", "prerequisites": [ 2 ], "sources": [ "components/01-consistent-hashing.md", "components/09-distributed-consensus-raft-and-paxos.md", "loop-primitives/06-replication-quorums-and-read-your-writes.md" ], "problem": "Durable, committed, and applied positions differ.", "prototype": false }, { "id": 15, "path": "lessons/15-who-may-commit.md", "title": "Two machines both say they are the leader", "prerequisites": [ 14 ], "sources": [ "components/09-distributed-consensus-raft-and-paxos.md", "loop-primitives/06-replication-quorums-and-read-your-writes.md" ], "problem": "An isolated former leader continues to receive requests.", "prototype": false }, { "id": 16, "path": "lessons/16-the-worker-that-returned.md", "title": "The lease expired; the old worker did not", "prerequisites": [ 15, 1 ], "sources": [ "components/06-distributed-locks-and-leases.md", "loop-primitives/03-leases-fencing-tokens-and-distributed-locks.md" ], "problem": "A paused worker resumes after a replacement takes ownership.", "prototype": true }, { "id": 17, "path": "lessons/17-moving-live-data.md", "title": "The copy finished, then the old owner accepted a write", "prerequisites": [ 12, 13, 14, 16 ], "sources": [ "components/01-consistent-hashing.md", "components/08-database-sharding-and-partition-keys.md", "loop-primitives/08-sharding-hot-keys-and-rebalancing.md" ], "problem": "A live migration races stale routers and ongoing writes.", "prototype": false }, { "id": 18, "path": "lessons/18-one-intent-many-attempts.md", "title": "The payment succeeded twice after one timeout", "prerequisites": [ 1, 6 ], "sources": [ "components/10-two-phase-commit-and-saga-orchestration.md", "loop-primitives/04-idempotency-and-effectively-once-processing.md" ], "problem": "An ambiguous external effect is retried as a new operation.", "prototype": false }, { "id": 19, "path": "lessons/19-the-message-that-will-not-leave.md", "title": "The queue is healthy; the customer is still waiting", "prerequisites": [ 18, 7, 16 ], "sources": [ "components/05-message-queues-vs-event-streams.md", "loop-primitives/12-queues-and-delivery-semantics.md" ], "problem": "Redelivery, poison records, and early acknowledgement break progress.", "prototype": false }, { "id": 20, "path": "lessons/20-the-announcement-that-never-happened.md", "title": "The order committed, but nobody heard about it", "prerequisites": [ 18, 19, 3 ], "sources": [ "components/12-change-data-capture-and-outbox-pattern.md", "loop-primitives/05-change-streams-and-transactional-outbox.md" ], "problem": "A database commit and a publish cannot be made atomic by ordering calls.", "prototype": false }, { "id": 21, "path": "lessons/21-counting-time-not-arrivals.md", "title": "Yesterday changed after the stream restarted", "prerequisites": [ 19, 20, 16, 4 ], "sources": [ "components/05-message-queues-vs-event-streams.md", "loop-primitives/07-event-time-watermarks-and-checkpoints.md", "loop-primitives/04-idempotency-and-effectively-once-processing.md" ], "problem": "Late events and replay make a plausible counter incorrect.", "prototype": false }, { "id": 22, "path": "lessons/22-the-average-that-lied.md", "title": "The dashboard recovered by hiding the incident", "prerequisites": [ 21, 4 ], "sources": [ "components/07-write-ahead-log-and-lsm-trees.md", "loop-primitives/15-time-series-storage-and-roll-ups.md" ], "problem": "A roll-up discards the information needed to answer the question.", "prototype": false }, { "id": 23, "path": "lessons/23-waiting-for-a-decision.md", "title": "All participants voted yes; no participant can finish", "prerequisites": [ 1, 15 ], "sources": [ "components/10-two-phase-commit-and-saga-orchestration.md", "loop-primitives/13-distributed-transactions-sagas-vs-two-phase-commit.md" ], "problem": "Prepared transactions wait for a durable global decision.", "prototype": false }, { "id": 24, "path": "lessons/24-undo-is-another-operation.md", "title": "The refund failed after the booking failed", "prerequisites": [ 18, 20, 23, 16 ], "sources": [ "components/10-two-phase-commit-and-saga-orchestration.md", "loop-primitives/13-distributed-transactions-sagas-vs-two-phase-commit.md" ], "problem": "Independent commits require recoverable semantic compensation.", "prototype": false }, { "id": 25, "path": "lessons/25-moving-the-writer.md", "title": "Traffic failed over before authority did", "prerequisites": [ 14, 15, 16, 18, 7 ], "sources": [ "components/24-cloud-disaster-recovery-and-multi-region-active-active.md", "loop-primitives/09-multi-region-failover.md" ], "problem": "Routing users to a standby does not make it a safe writer.", "prototype": false }, { "id": 26, "path": "lessons/26-rebuilding-a-view.md", "title": "The current balance cannot explain its own history", "prerequisites": [ 18, 20 ], "sources": [ "components/23-event-sourcing-and-cqrs-architecture.md" ], "problem": "A new query needs a replayable model without duplicating effects.", "prototype": false }, { "id": 27, "path": "lessons/27-an-id-is-not-a-clock.md", "title": "The unique ID generator repeated itself after restart", "prerequisites": [ 16 ], "sources": [ "components/15-distributed-unique-id-generators.md" ], "problem": "Clock rollback and worker reuse violate assumed uniqueness.", "prototype": false }, { "id": 28, "path": "lessons/28-suspected-is-not-dead.md", "title": "The failure detector removed a healthy machine", "prerequisites": [ 15 ], "sources": [ "components/16-gossip-protocol-and-failure-detection.md" ], "problem": "A missing heartbeat cannot distinguish failure from delay.", "prototype": false }, { "id": 29, "path": "lessons/29-following-one-request.md", "title": "More connections did not fix the slow page", "prerequisites": [ 6, 7 ], "sources": [ "components/14-api-gateway-and-reverse-proxy.md", "components/19-api-protocols-http1-http2-http3-quic-grpc.md" ], "problem": "Transport, proxy, and dependency queues create different bottlenecks.", "prototype": false }, { "id": 30, "path": "lessons/30-reconnecting-without-forgetting.md", "title": "The socket reconnected; the messages did not", "prerequisites": [ 19, 29 ], "sources": [ "components/18-websocket-sse-and-long-polling.md" ], "problem": "A live transport supplies neither history nor replay correctness.", "prototype": false }, { "id": 31, "path": "lessons/31-a-valid-signature-is-not-permission.md", "title": "The token is genuine and the request is forbidden", "prerequisites": [ 5, 6, 20, 29 ], "sources": [ "components/20-oauth2-oidc-and-distributed-token-authentication.md" ], "problem": "Authentication, authorization, and revocation have different boundaries.", "prototype": false }, { "id": 32, "path": "lessons/32-the-prefix-that-scanned-everything.md", "title": "Autocomplete found the prefix and still timed out", "prerequisites": [ 4, 20 ], "sources": [ "components/13-trie-data-structure-and-inverted-index.md" ], "problem": "Finding a prefix does not find its best completions.", "prototype": false }, { "id": 33, "path": "lessons/33-across-the-cell-boundary.md", "title": "The closest driver is invisible to the index", "prerequisites": [ 12 ], "sources": [ "components/11-geospatial-geohash-quadtree-s2.md" ], "problem": "Spatial cells omit nearby points unless coverage is complete.", "prototype": false }, { "id": 34, "path": "lessons/34-nearest-among-whom.md", "title": "The vector index returns ten excellent unauthorized matches", "prerequisites": [ 31, 32 ], "sources": [ "components/17-vector-databases-and-approximate-nn.md" ], "problem": "Approximate retrieval and access filters interact.", "prototype": false }, { "id": 35, "path": "lessons/35-cheap-accounts-expensive-consequences.md", "title": "Every account obeyed the limit; the attack still worked", "prerequisites": [ 9, 31 ], "sources": [ "components/25-bot-defense-sybil-resistance-and-registration-abuse.md", "components/26-honeypot-fields-and-canary-traps.md", "components/27-disposable-email-and-domain-blocklists.md" ], "problem": "Many cheap identities evade per-identity controls.", "prototype": false }, { "id": 36, "path": "lessons/36-the-proof-that-was-replayed.md", "title": "The browser passed the challenge twice", "prerequisites": [ 35, 18, 7 ], "sources": [ "components/28-cloudflare-turnstile-managed-challenges.md", "components/29-google-recaptcha-v2-and-enterprise-risk-analysis.md" ], "problem": "A challenge token is accepted without a correct server-side lifecycle.", "prototype": false }, { "id": 37, "path": "lessons/37-paying-for-each-attempt.md", "title": "The puzzle was hard once and free thereafter", "prerequisites": [ 35, 18 ], "sources": [ "components/30-hashcash-and-client-side-proof-of-work.md" ], "problem": "A reusable proof makes client work irrelevant to repeated abuse.", "prototype": false } ]