Skip to content
HLD interview handbook · PDF ebook

Crack the system design round with 19 real systems.

One repeatable method to turn an open prompt into requirements, estimates, APIs, data models, an architecture and failure handling. Practised on WhatsApp, Uber, BookMyShow, payments, Netflix and 14 more.

19
case studies
16
building blocks
9
steps per case
45
minute playbook
₹299₹59950% off
  • Secure checkout via Razorpay
  • Digital PDF ebook
  • Read on phone, tablet or laptop
Mastering system design- high level design ebook coverPDF ebook
Choose your book

HLD, LLD, or both rounds together

HLD is how the whole system scales. LLD is how one service is built in code. Most product companies ask both, and the combo covers both rounds.

This page
High-level design

Mastering system design- high level design

Architecture for the whole system: requirements, estimates, APIs, data stores, caching, queues and failures.

  • 19 HLD case studies
  • 16 building-block primers
  • 45-minute interview playbook
₹299₹59950% off
Low-level design · Java

Mastering System Design LLD

Turn requirements into clean object models, apply SOLID and design patterns, and practise complete Java LLD problems.

  • Java, OOP, SOLID and UML
  • 23 GoF design patterns
  • 16 detailed LLD case studies
₹299₹59950% off
Details
Best value
Best value · both rounds

Mastering System Design

Distributed architecture and scalable backends in HLD, plus practical Java class design in LLD.

  • This HLD book and the LLD book
  • 19 HLD case studies plus 16 LLD problems
  • Architecture, Java code and design patterns
₹499₹1,19858% off
Details
TopicHLD (this book)LLD
FocusArchitecture of the whole systemClass-level design inside one service
Core questionHow does it scale to millions of users?How do I model objects and relationships?
ArtifactsComponents, APIs, data stores, queuesClasses, interfaces, patterns, working code
You decideSQL vs NoSQL, caching, sharding, consistencySOLID, design patterns, extensibility, concurrency
Free preview

Read real pages before you pay

Actual pages from the book. Use the arrows, the page strip, or your keyboard's arrow keys.

  • No download, no sign-up
  • Same layout and depth as the full book
  • Full book: 19 case studies, 16 building blocks
Sample pages
Sample pages load as you scroll here.
What's inside

19 case studies, each built the same way

Every system asked in real interviews, from a URL shortener to payments. Filter by type or search by technology.

19 of 19 case studies

  1. 01Infrastructure

    URL Shortener

    bit.ly style redirect platform

    Short-code generation, read-heavy architecture, Redis caching, redirect latency, click analytics, expiry and multi-region design.

    Hard part: Generate short codes without collisions

    • KGS
    • Redis
    • DynamoDB
    • Kafka
  2. 02Real-time & Social

    WhatsApp / Messaging

    Real-time 1:1 and group chat

    WebSockets, session registry, message ordering, offline delivery, fan-out, idempotency, presence and encrypted media flows.

    Hard part: Guarantee ordering without pretending exactly-once exists

    • WebSocket
    • Cassandra
    • Redis
    • Kafka
  3. 03Marketplace & Payments

    Uber / Ride-Hailing

    Location + matching at scale

    Driver location ingestion, geo indexes, dispatch, atomic assignment, trip state machine, ETA, surge and payment flow.

    Hard part: Match millions of moving drivers

    • H3
    • Redis GEO
    • CAS
    • Kafka
  4. 04Real-time & Social

    Instagram

    Media, social graph and feed

    Upload pipeline, CDN, object storage, feed generation, fan-out, caching, likes/comments, celebrity users and search.

    • CDN
    • Feed
    • S3
    • Fan-out
  5. 05Media & Storage

    YouTube

    Video upload and delivery

    Chunked upload, transcoding, metadata, object storage, adaptive streaming, CDN distribution and recommendation events.

    • Video
    • Transcoding
    • CDN
    • Object Store
  6. 06Media & Storage

    Netflix / Video Streaming

    Global playback platform

    Playback APIs, catalog, recommendation, encoding ladders, CDN strategy, regional resiliency and massive read traffic.

    • Streaming
    • CDN
    • Cache
    • Multi-region
  7. 07Real-time & Social

    Twitter / X

    Timeline and social graph

    Tweet storage, home timeline, fan-out-on-write vs read, celebrity handling, cache hierarchy, search and trending events.

    • Timeline
    • Fan-out
    • Redis
    • Kafka
  8. 08Media & Storage

    Dropbox

    Distributed file sync

    Chunking, deduplication, metadata, sync conflicts, uploads, versioning, object storage and desktop/mobile consistency.

    • Chunking
    • Metadata
    • Sync
    • Object Store
  9. 09Media & Storage

    Google Drive + Docs

    Files, sharing and collaboration

    File metadata, permissions, sync, document collaboration, versioning, real-time updates and scalable blob delivery.

    • Sharing
    • Collaboration
    • Versioning
    • Storage
The method

One way to answer any design prompt

Each case study walks these nine steps, so by the third one you can do it on a new prompt yourself.

  1. 01
    Interview question

    Start from the prompt exactly as it is likely to be asked in a real interview.

  2. 02
    Clarifying questions

    Narrow the scope before drawing boxes: scale, features, consistency, retention and geography.

  3. 03
    FR + NFR + estimates

    Turn the prompt into functional requirements, SLOs and back-of-the-envelope traffic/storage numbers.

  4. 04
    Interviewer signals

    Know what strong answers should surface, the common red flags and likely follow-up questions.

  5. 05
    Entities + APIs + DB

    Model the core domain, define API contracts and choose storage from actual access patterns.

  6. 06
    HLD architecture

    Connect clients, gateways, services, queues, caches, databases, storage and analytics components.

  7. 07
    Request flows

    Walk the interviewer through the most important success path and state transitions step by step.

  8. 08
    Algorithms + deep dives

    Go deep on the hard part: geo search, key generation, rate limiting, fan-out, locking or scheduling.

  9. 09
    Trade-offs + failures

    Discuss retries, hot keys, crashes, consistency, recovery and the cost of every major design choice.

The 45-minute interview plan

How to spend the real round, minute by minute.

  1. 05 min
    Requirements

    Scope, users, critical flows, FRs and NFRs.

  2. 03 min
    Estimation

    QPS, peak load, storage, bandwidth and concurrency.

  3. 07 min
    APIs + Entities

    Data model, API surface and important states.

  4. 10 min
    HLD

    Core services, data stores, caches and async paths.

  5. 15 min
    Deep dive

    Solve the 1–2 genuinely hard parts of the design.

  6. 05 min
    Failures + trade-offs

    Recovery, consistency, bottlenecks and alternatives.

Total: 45 minutes

Building blocks

16 components, explained by the problem they solve

Short primers you can revise the night before. Each one shows up again inside the case studies.

  • API Gateway

    Authentication, routing, TLS termination, quotas and edge rate limiting.

  • Load Balancing

    L4/L7 routing, health checks, horizontal scale and failure isolation.

  • Redis

    Cache, counters, TTLs, geo indexes, sorted sets, dedupe keys and locks.

  • Kafka

    Durable async backbone, replay, decoupling, partition ordering and burst absorption.

  • CDC

    Stream database changes to search, caches and analytics without unsafe dual writes.

  • Elasticsearch

    Full-text search, faceting, autocomplete support and read-optimized search indexes.

  • Object Store + CDN

    Store large media blobs and deliver static/video content close to users.

  • SQL Databases

    Transactions, relational integrity, locking, indexes and strongly consistent workflows.

  • NoSQL Databases

    Horizontal scale for key-based, write-heavy and extremely large access patterns.

  • Sharding

    Partition data by user, region, city, key-range or hash while controlling hot partitions.

  • Replication

    Read scale, redundancy, failover, RPO/RTO choices and sync vs async replicas.

  • Rate Limiting

    Token bucket, fixed/sliding windows, Redis atomicity and per-tenant policy enforcement.

  • Distributed Coordination

    Leases, locks, compare-and-set, leader election and correctness under concurrency.

  • Service Architecture

    Service boundaries, synchronous RPC, asynchronous events and graceful degradation.

  • Observability

    Logs, metrics, tracing, queue lag, error rate and latency SLOs for production systems.

  • Security + Reliability

    AuthN/AuthZ, secrets, encryption, retries, circuit breakers and idempotent operations.

Syllabus

What the book teaches across every system

01Requirements before architectureClarify first. Draw later.

Every case study starts by narrowing scope before choosing technology. The book separates user-facing features from the system qualities that change architecture.

  • Functional requirements and critical user flows
  • Latency, availability, durability and consistency targets
  • Scope boundaries: region, retention, media, payments, search and analytics
  • Interviewer follow-ups and red flags before the diagram begins
02Back-of-envelope estimationTurn vague scale into concrete numbers.

The handbook repeatedly estimates QPS, peak traffic, concurrent connections, storage, bandwidth and hot-set size so the architecture is tied to a scale assumption.

  • Average QPS versus realistic peak multipliers
  • Read:write ratios and the hot path that deserves optimization
  • Connection counts for WebSocket-heavy systems
  • Storage growth, media volume and cache working-set estimates
03Entities, APIs and state machinesMake the system contract explicit.

Before adding infrastructure, each design defines the important entities, REST/WebSocket interfaces and state transitions that services must preserve.

  • REST, WebSocket, SSE and upload-control-plane APIs
  • Idempotency keys on retryable operations
  • Explicit lifecycle states for booking, trip, payment and job execution
  • Version fields and compare-and-set for concurrent updates
04Databases from access patternsSQL and NoSQL are choices, not slogans.

The book chooses storage from correctness and access patterns: relational databases for transactional inventory and money, wide-column/KV stores for enormous key-based workloads.

  • PostgreSQL/MySQL for transactions and relational integrity
  • Cassandra/DynamoDB for write-heavy or key-value scale
  • Sharding by city, user, namespace, conversation or hash
  • Replication, hot partitions, indexes and archival strategies
05Caching, CDN and searchKeep expensive work off the request path.

Redis, CDN and Elasticsearch appear only where they solve a concrete read path: hot links, product pages, catalog browse, geo state, autocomplete or full-text search.

  • Cache-aside, TTL, negative caching and local LRU layers
  • CDN for static assets, images, video segments and hot reads
  • Elasticsearch for full-text search, facets and autocomplete alternatives
  • Hot-key protection, request coalescing and edge caching
06Kafka, queues and event-driven workflowsMove non-critical work out of the synchronous chain.

Analytics, notifications, search indexing, asynchronous fan-out and recovery paths use durable queues so bursts do not turn into cascading failures.

  • Kafka partitions for ordering where the key matters
  • Outbox/CDC to avoid unsafe database + event dual writes
  • Consumer groups, retries, backoff and dead-letter handling
  • Burst absorption for campaigns, flash sales and event pipelines
07Consistency, concurrency and idempotencyCorrectness is a first-class architecture concern.

The hardest systems in the book are hard because two things happen at once: two buyers pick one seat, two callbacks update one payment, or two workers execute one job.

  • Atomic claims, unique constraints and compare-and-set
  • Redis locks as a fast gate with the database as source of truth
  • At-least-once delivery plus idempotent dedupe
  • Leases, fencing tokens, hold TTLs and compensating actions
08Failures, observability and securityA design is incomplete until the happy path breaks.

Every case closes with failure handling and trade-offs: reconnect, retry, failover, degraded features, webhook verification, encryption and operational signals.

  • Timeouts, exponential backoff and circuit breakers
  • Graceful degradation when recommendations or metadata fail
  • Logs, metrics, tracing, queue lag and end-to-end latency
  • TLS, tokenization, least privilege, signatures and audit trails
Who it's for

Made for engineers preparing for the design round

  • SDE-1 → SDE-2

    Move from knowing components individually to explaining how they work together under load and failure.

  • Backend Engineers

    Practice the architecture choices behind APIs, databases, caches, queues, storage and distributed workflows.

  • Interview Preparation

    Use one repeatable 45-minute structure instead of memorizing disconnected diagrams for every company question.

  • Revision Before Interviews

    Case-study cards and consistent sections make it easier to revisit one design quickly before a system-design round.

What you get

  • Digital PDF ebook

    Read on laptop, tablet or phone — revise anywhere.

  • 19 interview case studies

    URL shortener to payments, each in the same 9-step structure.

  • 45-minute interview playbook

    A minute-by-minute plan for the real round.

  • 16 core building-block primers

    Redis, Kafka, CDC, sharding and more — tied to the problem they solve.

  • Back-of-envelope numbers

    Concrete QPS, storage and bandwidth estimates for every system.

  • Failures + trade-offs

    What breaks, how you recover and what each choice costs.

₹299₹59950% off
Questions

Before you buy

Anything else? Write to [email protected]

What is High-Level Design (HLD) in a system design interview?

HLD is the architecture-level part of a system design round: you clarify requirements, estimate scale, define APIs and entities, choose databases, caches and queues, draw the end-to-end architecture and then defend the trade-offs and failure handling. This book teaches that flow with 19 worked case studies.

What is the difference between HLD and LLD?

HLD answers how a whole system scales: services, data stores, caching, messaging and consistency. LLD answers how one component is built: classes, interfaces, SOLID principles and design patterns. This page covers HLD; the Java-first LLD handbook and an HLD + LLD bundle are linked on this page.

Is this book only for experienced engineers?

No. The page starts from the interview method and core building blocks, then moves into complete case studies. It is especially useful when you already know basic backend development but want a structured HLD approach.

How are the 19 case studies structured?

Each case follows the same sequence: interview prompt, clarifying questions, functional and non-functional requirements, estimation, interviewer expectations, entities, APIs, database design, HLD, request flows, algorithms/deep dives, trade-offs and failures.

Does it cover Redis, Kafka, sharding and distributed systems?

Yes. The case studies repeatedly use API gateways, load balancers, Redis, Kafka, CDC, Elasticsearch, object storage/CDNs, SQL/NoSQL choices, sharding, replication, locks, retries, idempotency and observability in context.

Does the book include BookMyShow-style concurrency problems?

Yes. The ticket-booking case focuses on seat inventory, temporary holds, locking/transactions, payment state transitions, timeout release and flash-sale traffic.

Can I preview the book before buying?

Yes. Real sample pages from the book are on this page. Read them right here, page by page, with no download or sign-up.

Is this a physical book?

No. This is a digital PDF ebook.

Is the digital purchase refundable?

No. Digital ebook purchases are non-refundable after successful payment.

How can I contact support?

Email [email protected] for purchase or ebook support.

Walk into the round with a plan, not a memorised diagram.

19 case studies, one method, a digital PDF you can read anywhere.

₹299₹59950% off
Resume Lab by Target Trek

Applying everywhere but getting no interview calls?

Your book gets you ready for the interview. A better resume gets you the call. See exactly which lines cost you shortlists, and how to fix each one.

~2 min
AI report
Real people
review it
Pay once
no subscription
Mastering System Design HLD
₹299₹59950% off