HLD Case Studies in High-Level Design

Lessons in this section

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. Design File Storage

    Store QuickBite's menu photos and receipts: object storage for bytes, a metadata database, presigned uploads, CDN downloads and background thumbnails.

  7. Design Search Autocomplete

    Suggest dishes as customers type: prefix trees with saved top answers, debouncing, caching popular prefixes and rebuilding rankings from logs.

  8. Design a Payment System

    Charge cards exactly once: payment states, idempotency keys, a double-entry ledger, background charging and daily reconciliation.

  9. Design Video Streaming

    Serve recipe videos: transcoding into qualities and segments, adaptive bitrate, chunked parallel transcoding and CDN delivery.

  10. Design LLM Inference Serving

    Run an AI support assistant on GPUs: prefill and decode, time to first token, streaming, continuous batching and answer caching.

  11. 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.

  12. 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.