Last Minute Notes

System Design

A beginner to advanced system design library: fundamentals, High-Level Design (HLD), Low-Level Design (LLD), 30+ worked case studies, AI and frontend system design, flowcharts, and a question bank.

Start here for system design prep. The section is split the way interviews are split: HLD (architecture, scale, data, trade-offs) and LLD (classes, interfaces, patterns, machine coding). Every page has flowcharts, worked examples, and interview questions. Facts that changed recently (Kafka 4.0, Redis licensing and Valkey, LLM serving, the 2025 AWS and Cloudflare outages, UUIDv7) are folded into the pages where they matter.

Contents

  1. 01
    Fundamentals

    System design foundations: the interview framework, requirements, back-of-envelope estimation, latency numbers, scaling stages, availability math, percentiles, CAP and PACELC, and consistency models.

  2. 02
    High-Level Design (HLD)

    Architecture-level system design: building blocks, distributed systems theory, classic and large-scale case studies, AI system design, frontend system design, and reliability.

    1. 01
      Building Blocks

      The components every HLD answer is made of: DNS, CDN, load balancers, API gateways, caches, SQL and NoSQL databases, replication, sharding, consistent hashing, queues and streams, object storage, search, and real-time protocols.

    2. 02
      Distributed Systems

      Advanced HLD theory: unreliable networks and clocks, replication and quorums, consensus (Raft), distributed locks, isolation levels, 2PC, sagas, outbox, idempotency, resilience patterns, event-driven design, multi-region, and blast-radius control.

    3. 03
      Classic Designs

      Eight classic HLD case studies with requirements, estimates, APIs, data models, flowcharts and trade-offs: URL shortener, rate limiter, unique ID generator, key-value store, notification system, web crawler, typeahead, and distributed cache.

    4. 04
      Large-Scale Designs

      Twelve senior-level HLD case studies with estimates, flowcharts and deep dives: news feed, chat, video streaming, ride hailing, file sync, ticket booking, payments, ad click aggregation, job scheduler, leaderboard, collaborative editing, and a monitoring system.

    5. 05
      AI System Design

      System design for LLM products: token economics, LLM inference serving (continuous batching, PagedAttention, prefix caching), a ChatGPT-style assistant, RAG with hybrid search and reranking, agents and MCP, AI gateways, evaluation, reliability and cost.

    6. 06
      Frontend System Design

      Frontend and full-stack system design: the RADIO framework, rendering strategies (CSR, SSR, SSG, ISR, streaming, RSC), Core Web Vitals, data fetching and state, real-time and offline, micro-frontends, security, and worked UI designs.

    7. 07
      Reliability and Operations

      Senior-level system design operations: SLOs and error budgets, observability with OpenTelemetry, deployment strategies, disaster recovery, security architecture, incident response, and lessons from the October 2025 AWS and November 2025 Cloudflare outages.

  3. 03
    Low-Level Design (LLD)

    Object-oriented low-level design and machine coding: an approach, UML in Mermaid, design patterns, twelve worked problems with runnable Java, and concurrency in LLD.

    1. 01
      LLD Fundamentals

      How to approach low-level design and machine coding: an 8-step method, requirements to classes, UML class, sequence and state diagrams in Mermaid, SOLID and design principles in practice, code quality checklist, and a 60-minute plan.

    2. 02
      Design Patterns

      A practical design pattern catalog for LLD interviews: when to use each pattern, a chooser flowchart, and runnable Java for Builder, State, Command, Chain of Responsibility, Template Method, Adapter, Facade, Proxy, Composite and Mediator, plus TypeScript versions.

    3. 03
      Machine Coding 1

      Six machine coding problems with requirements, class diagrams and complete runnable Java: Parking Lot, LRU Cache, Elevator, Vending Machine, Tic-Tac-Toe, and a Logger framework.

    4. 04
      Machine Coding 2

      Six more machine coding problems with complete runnable Java: Movie Ticket Booking with seat holds, Splitwise with debt simplification, an in-memory Pub/Sub broker, pluggable Rate Limiter, ATM with State and Chain of Responsibility, and an in-memory File System.

    5. 05
      Concurrency in LLD

      Thread safety for low-level design: race conditions, the Java concurrency toolbox, lock granularity, deadlock and lock ordering, producer-consumer, bounded buffers, thread-safe singletons, optimistic CAS, testing concurrent code, and async races in JavaScript. All Java runs.

  4. 04
    Interview Playbook

    System design interview strategy: level-by-level rubric, 45-minute timelines for HLD and LLD, communication phrases, common mistakes, a 60-question bank from beginner to advanced with pointers, a design prompt index, and 4-week and 7-day study plans.

Reading Path

Pick Your Level

You areRead in this order
Complete beginnerFundamentals, Building Blocks, Classic Designs
Preparing for a mid-level loopAdd Large-Scale Designs, LLD Fundamentals, both machine coding pages
Preparing for senior or staffAdd Distributed Systems, Reliability and Operations, AI System Design
Frontend or full-stack engineerFrontend System Design, then Server-Driven UI
One week leftInterview Playbook study plan, then the case studies it points at
  • OOPS has the four pillars, SOLID, UML and five core patterns that LLD builds on.
  • Java has the concurrency and collections notes used by the LLD solutions.
  • Frontend System Design is the full frontend design library: rendering, performance, state, real-time, architecture, and 16 UI and app designs.
  • Server-Driven UI is a real frontend architecture case study.
  • DSA covers the algorithms that appear inside designs (heaps, tries, intervals, graphs).
  • Backend covers the service layer: APIs, auth, caching, queues, testing and deployment.
  • Databases covers the data layer: SQL, indexing, transactions, replication and NoSQL.

Sources

The notes are original write-ups, cross-checked against primary sources where a fact is time sensitive. Recurring references:

On this page