Load Balancers and Caching Strategies
The last course gave you the method for designing systems; this one is the catalog of parts you design with — the standard building blocks, each studied deeply enough to use well.…
System Design Building Blocks covers: Load Balancers and Caching Strategies, Message Queues and Event-Driven Architecture, CDNs, Blob Storage, and Content Delivery, Search and Ranking, Rate Limiting, Consistent Hashing, and the Infrastructure Glue. Year 3, Quarter 10. Includes 10 exercises and 2 projects.
This course unlocks once you've finished its prerequisite. Open prerequisite →
Complete prerequisites first to enroll.
The last course gave you the method for designing systems; this one is the catalog of parts you design with — the standard building blocks, each studied deeply enough to use well.…
A message queue is the building block that lets parts of a system talk asynchronously — one component drops a message and moves on, another picks it up and processes it later, and…
Two building blocks solve two problems that a database is spectacularly bad at: serving content fast to users far away, and storing large files. The CDN (Content Delivery Network)…
"Find all documents containing these words, and show me the best ones first" is one of the most common and deceptively deep features in software — and it's a specialized building …
This lesson closes the building-block catalog with three kinds of component that hold distributed systems together: rate limiting (protecting a system from being overwhelmed — by …
- [ ] Implement a token bucket rate limiter in Ruby — allow? method with refill logic - [ ] Implement cache-aside pattern in Ruby with Redis — get checks cache, misses go to DB, s…
- [ ] Implement consistent hashing in Ruby — Hash ring with virtual nodes, add/remove server with minimal redistribution - [ ] Build a simple message queue in Ruby — In-memory que…
- [ ] Design a Web Crawler — AX Ch9 — Politeness (robots.txt), URL frontier, dedup (Bloom filter), distributed crawling - [ ] Design a News Feed / Timeline — AX Ch11 — Fan-out on …
- [ ] Build a URL shortener in Ruby (Rails) — End to end: Base62 encoding, Redis cache, click analytics with counter, rate limiting, custom aliases; deploy and load test with wrk
Implement 4 rate limiting algorithms in Ruby: token bucket, leaky bucket, fixed window, and sliding window log. Benchmark each under bursty and steady traffic patterns. Write up t…
Implement an in-memory cache in Ruby supporting LRU, LFU, and TTL eviction. Each policy is a strategy (Strategy pattern). Benchmark hit rates under different access patterns (unif…
- [ ] Explain four caching strategies: cache-aside, write-through, write-behind, and refresh-ahead. - [ ] What is consistent hashing? How do virtual nodes help with load distribut…
12 lessons. Read in order; spiral back when you need to. By the end you'll have used the core ideas twice — once on the abstract, once on something you'll meet at work next week.