HLD Case Studies in High-Level Design
Lessons in this section
- Design a URL Shortener
Design QuickBite's link shortener end to end: requirements, traffic and storage estimates, code length, 301 vs 302, base62 codes from ID ranges, caching, and a design sandbox.
- Design a Rate Limiter Service
Turn one server's rate limiter into a shared service: local vs shared counters, atomic increments, sliding windows, 429 and Retry-After, and failing open.
- Design a News Feed
Build QuickBite's food feed: pull vs push, fan-out through a queue, the big-account problem, hybrid feeds and a replicated feed cache.
- Design a Chat System
Build customer–rider chat: WebSockets, sizing gateways by connections, routing through pub/sub, saving before delivering, and splitting messages by conversation.
- Design a Notification System
Send order updates by push, SMS and email: queue the work, a queue per channel, provider rate limits, retries with backoff and dedupe keys.
- Design File Storage
Store QuickBite's menu photos and receipts: object storage for bytes, a metadata database, presigned uploads, CDN downloads and background thumbnails.
- Design Search Autocomplete
Suggest dishes as customers type: prefix trees with saved top answers, debouncing, caching popular prefixes and rebuilding rankings from logs.
- Design a Payment System
Charge cards exactly once: payment states, idempotency keys, a double-entry ledger, background charging and daily reconciliation.
- Design Video Streaming
Serve recipe videos: transcoding into qualities and segments, adaptive bitrate, chunked parallel transcoding and CDN delivery.
- Design LLM Inference Serving
Run an AI support assistant on GPUs: prefill and decode, time to first token, streaming, continuous batching and answer caching.
- Capstone: Design the QuickBite Platform
Design the whole QuickBite order platform yourself: requirements, per-flow estimates, choosing parts, passing every check, and writing down trade-offs.
- HLD Cheat Sheet
Every number, formula, building block and pattern from High-Level Design on one page: latency, estimation, capacity, the four checks and common trade-offs.