← All lessons
Backend
14 lessons you click through step by step
- How database replication worksShip the WAL to a replica, read before it catches up, then crash the primary
- How database sharding worksRoute rows to shards by key, find the hot shard, and see which queries hit them all
- How connection pooling worksCount what a new connection costs, then flood a pool until requests start waiting
- How message queues workHand work to a queue, crash a worker mid-job, and watch the message come back until it lands in a dead-letter queue
- How idempotency worksSend the same payment twice, race two copies, and watch a stored key keep it to one charge
- How cache-aside worksPut Redis in front of a database, fill it on a miss, expire it with a TTL, and delete the key on every write
- How consistent hashing worksPut servers and keys on a hash ring, add a server, and see only a few keys move where hash % N moves almost all
- How circuit breakers workTrip a breaker on a failing service, fail fast while it's open, then let one trial call close it again
- How SSRF worksTrick a link preview into fetching the cloud's keys, then try to sneak past four defenses
- How feature flags workShip code switched off, roll it out to a share of users by hash, and turn it off without a deploy
- How rate limiting worksDrain a token bucket until the API answers 429
- How load balancing worksSpread requests across servers, then take one down
- How retries and backoff workRetry a flaky service with backoff and jitter
- How webhooks workLet a service call you, then verify its signature