LLD Case Studies II: Rate Limiter, In-memory Pub/Sub, Task Scheduler & a Game (Snake & Ladder / Chess)
Four machine-coding favourites done HLD → LLD: a pluggable rate-limiter library, a Kafka-lite pub/sub with consumer groups, offsets, retries and a DLQ, a heap-based task scheduler with cron, retries and misfire handling, and Snake & Ladder with the Chess pivot — plus how to time-box the 90 minutes.
About 150 minutes · 20 exam questions · 14 interview questions · 2 code labs
What you will learn
- Time-boxing a 90-minute machine-coding round
- Rate limiter (1/3) — requirements and a brief HLD for a pluggable library
- Rate limiter (2/3) — entities, class diagram and the patterns that earn their place
- Rate limiter (3/3) — the facade, memory bounds, concurrency, extensions and the 90-minute cut
- In-memory pub/sub (1/3) — requirements and HLD of a Kafka-lite
- In-memory pub/sub (2/3) — entities, class diagram and patterns
- In-memory pub/sub (3/3) — at-least-once, retries, DLQ, backpressure, concurrency
- Task scheduler (1/3) — requirements and HLD (one-off, cron, retries, restarts)
- Task scheduler (2/3) — entities, class diagram, patterns, the heap and schedules
- Task scheduler (3/3) — the core loop, retries, cancellation, misfires, concurrency
- Snake & Ladder vs Chess (1/3) — which game gets asked, requirements and HLD
- Snake & Ladder (2/3) — entities, class diagram, polymorphism and patterns
- Snake & Ladder (3/3) — game loop, online concurrency, extensions and the Chess pivot
- Closing comparison — four case studies side by side
Previous: LLD Case Studies I: Parking Lot, Elevator, BookMyShow & Splitwise