System Design
System Design
Principal/Staff-level design references — requirements, architecture, deep dives, and trade-offs at scale. Structured for L6/L7 MAANG interviews.
140 notes
Overview
System Design
A curated collection of Principal/Staff-level system design references, organized for MAANG interview preparation. Every design is grounded in lived production experience with Grafana Cloud, Alloy, Mimir, Loki, and Tempo at global scale.
Purpose
This directory holds deep-dive system design documents structured for L6/L7 interview practice. Each note covers one system end-to-end: requirements clarification, high-level architecture, component deep dives, self-observability of the system, and trade-offs at 10x scale.
The collection is not generic — every design explicitly brings observability in as a first-class structural concern, not an afterthought. That framing is the unfair advantage at MAANG: most candidates bolt monitoring on at the end; these designs wire SLOs, trace propagation, cardinality constraints, and alert routing into the architecture from the start.
The notes are accessible at /notes/system-design/ on the site but are excluded from the main notes
index — they are an internal prep resource, not public reference material.
How to Use Each Note
Every document follows the same five-step interview format:
- Clarify requirements — scale envelope, signal types, consistency model, multi-tenancy needs. Spend the first 5 minutes here; the answers change the entire design.
- High-level design — components and data flow at the whiteboard level.
- Deep dive — storage layer, critical path, failure modes, protocol choices.
- Observability of the system itself — how you would monitor the thing you just designed. This is the differentiator.
- Trade-offs at 10x scale — what breaks first, what you would change, cost vs reliability tension.
Practice each section independently before running the full design end-to-end under time pressure.
Chapters are numbered per Part and restart at 1 in every Part — Part 15’s Chapter 1 is not the same as Part 02’s Chapter 1. Part 15 holds every full case-study design in this book, using the five-step format above — several of them (the Observability Platform cluster, the distributed-systems staples, the AIOps/cost/incident systems) predate the rest of this curriculum and are the reason this book started as an interview-prep collection in the first place. Parts 01–14 and 16 are concept/curriculum chapters — the graduate-level architecture theory a Principal/Staff candidate is expected to reason from — and link out to existing designs, patterns, and platform notes elsewhere in this wiki rather than duplicating them.
Parts
01 — Engineering Mindset
The foundational habits of mind the rest of this curriculum builds on — what actually changes at the L6/L7 bar, the systems-thinking lens, and the quantitative vocabulary (latency, throughput, queueing theory) used in every later Part.
- Chapter 1 — What Changes at L6/L7 — (stub)
- Chapter 2 — Thinking in Systems — (stub)
- Chapter 3 — Performance Fundamentals — (stub)
02 — Distributed Systems Theory
The general distributed-systems theory that Part 15’s “Distributed Systems Practice” case studies (message queue, KV store, stream processor, rate limiter, consensus) put into practice — read this Part for the “why,” Part 15 for “build it end-to-end.”
- Chapter 1 — Distributed System Fundamentals — (stub)
- Chapter 2 — Consistency Models — (stub)
- Chapter 3 — CAP Theorem & PACELC — (stub)
- Chapter 4 — Consensus Algorithms — (stub) — applied practice: Consensus & Leader Election
- Chapter 5 — Distributed Transactions — (stub) — Saga and Outbox are already fully written: Saga, Outbox
- Chapter 6 — Data Replication — (stub)
- Chapter 7 — Partitioning & Sharding — (stub) — applied practice: Distributed Key-Value Store
03 — Storage Systems
Database internals underneath the design decisions in Part 02 and Part 15 — see dbms/ for the deeper reference book this Part draws on.
- Chapter 1 — Database Selection — (stub)
- Chapter 2 — Indexing — (stub)
- Chapter 3 — Storage Engines — (stub)
- Chapter 4 — Data Lifecycle — (stub)
04 — Networking
The transport and API layer every design in this book sits on — see networks/ for fully-written OSI/protocol/gRPC/TLS reference material this Part links into rather than repeats.
- Chapter 1 — Network Fundamentals — (stub) — see OSI Layer Model, Protocol Inventory
- Chapter 2 — RPC: REST, GraphQL, gRPC — (stub) — see gRPC
- Chapter 3 — Load Balancing — (stub)
- Chapter 4 — CDN & Edge Caching — (stub)
05 — Messaging Systems
Message-passing and event-driven building blocks — several already have real applied practice elsewhere in this wiki, linked below.
- Chapter 1 — Message Brokers — (stub) — applied practice: Distributed Message Queue
- Chapter 2 — Event Streaming, CQRS & Event Sourcing — (stub) — CQRS and Event Sourcing are already fully written: CQRS, Event Sourcing; applied practice: Stream Processing System
- Chapter 3 — Workflow Systems — (stub)
06 — Caching
- Chapter 1 — Cache Design Patterns — (stub)
- Chapter 2 — Distributed Cache — (stub)
07 — Reliability Engineering
Reliability theory underneath the SLO/error-budget and resilience work Amit already ships in production — heavy link-out to real content below.
- Chapter 1 — Reliability: SLI, SLO, SLA & Error Budgets — (stub) — already fully written: SLOs & Error Budgets; applied practice: SLO / Error Budget Tracking System
- Chapter 2 — Resilience Patterns — (stub) — already fully written: Circuit Breaker, Bulkhead, Retry with Jitter, Hedged Requests
- Chapter 3 — Disaster Recovery — (stub)
- Chapter 4 — Chaos Engineering & Game Days — (stub)
08 — Observability
Curriculum coverage for completeness — almost every concept here is already fully written in observability/; this Part is a thin pointer layer, not a duplicate.
- Chapter 1 — Observability Architecture — the four correlated signals and why “three pillars” is a monitoring answer, not an architecture one
- Chapter 2 — Telemetry Pipelines — OTel API/SDK split, the Collector’s agent/gateway topology, and sampling trade-offs
- Chapter 3 — Monitoring at Scale — TSDB write path, cardinality as a storage-engine problem, and scaling out via Mimir/Cortex/Thanos
- Chapter 4 — Alerting Systems — burn rate, multi-window alerting, symptom vs. cause-based paging, and noise reduction
09 — Cloud Architecture
- Chapter 1 — Compute Platforms — (stub) — see kubernetes/ for CKA-level fundamentals
- Chapter 2 — Cloud Storage Services — (stub)
- Chapter 3 — Multi-Cloud Architecture — (stub)
10 — Security
- Chapter 1 — Identity: OAuth, OIDC, JWT, SPIFFE, mTLS — (stub) — see TLS Offload
- Chapter 2 — Security Architecture & Zero Trust — (stub)
11 — Scalability
- Chapter 1 — Scaling Patterns — (stub)
- Chapter 2 — Geo-Distributed Systems — (stub)
- Chapter 3 — Cost Engineering & FinOps — (stub)
- Chapter 4 — Capacity Planning System — (stub) — growth modeling, headroom analysis, cost vs. reliability simulation
12 — Architecture Patterns
- Chapter 1 — Monoliths & the Modular Monolith — (stub) — see Monolithic, Strangler Fig
- Chapter 2 — Microservices — (stub)
- Chapter 3 — Event-Driven Architecture — (stub) — see CQRS, Event Sourcing
- Chapter 4 — Data Mesh — (stub)
- Chapter 5 — Service Mesh — (stub) — see Sidecar, tech/envoy.md
- Chapter 6 — Platform Engineering — (stub)
13 — AI-era System Design
- Chapter 1 — Designing AI Systems: RAG & Vector Databases — (stub) — see Agent Architecture
- Chapter 2 — AI Infrastructure — (stub)
- Chapter 3 — AI Observability — (stub) — see AIOps / Agentic RCA
14 — Interview Frameworks
- Chapter 1 — Interview Methodology — (stub)
- Chapter 2 — Whiteboarding & Communication — (stub)
- Chapter 3 — Architecture Reviews: Defending Decisions — (stub)
15 — Complete Case Studies
Full end-to-end designs using the five-step format above. The first three groups below predate the rest of this curriculum — they’re the original interview-prep collection this book grew out of; the rest are the case studies added to round out the L6/L7 curriculum’s coverage. Chapters are numbered 1–41 straight through this Part, regardless of which group they sit in below — the bold group labels are organizational, not chapters of their own.
- Observability Platform (Grafana/Prometheus/OpenTelemetry) — the non-negotiable core competency
systems for an Observability Architect at MAANG, from the ingestion edge through storage engines
to platform-level tenancy and SLO tracking
- Chapter 1 — Telemetry Ingestion Pipeline — complete: requirements, architecture, deep dive,
self-observability, trade-offs at scale
- Full Design
- Telemetry Gateways
- Rate-Limiting Architecture
- Retry Policies
- Head vs. Tail Sampling
- Practice Q&A (Q1–Q12) — twelve follow-up-style deep dives (cardinality storms, exactly-once tenants, regional gateway outages, cost cuts, and more) living alongside the full design in the same chapter directory
- Chapter 2 — Metrics Storage (TSDB) — (stub) — write amplification, chunk encoding, compaction, cardinality explosion
- Chapter 3 — Log Aggregation System — (stub) — structured vs. unstructured, schema-on-read vs. schema-on-write, deduplication
- Chapter 4 — Distributed Tracing Backend — (stub) — trace assembly from spans, tail-based vs. head-based sampling
- Chapter 5 — OpenTelemetry Collector Pipeline — (stub) — multi-pipeline routing, processor chaining, exporter fan-out
- Chapter 6 — Multi-tenant Observability Platform — (stub) — tenant isolation, quota enforcement, cost attribution
- Chapter 7 — SLO / Error Budget Tracking System — (stub) — burn rate calculation, multi-window alerting, budget ledger
- Chapter 1 — Telemetry Ingestion Pipeline — complete: requirements, architecture, deep dive,
self-observability, trade-offs at scale
- Distributed Systems Practice — the general distributed-systems staples that show up in MAANG
interviews regardless of role specialization
- Chapter 8 — Kafka — Distributed Message Queue — (stub) — partitioning, consumer groups, at-least-once vs. exactly-once
- Chapter 9 — Distributed Key-Value Store (DynamoDB-like) — (stub) — consistent hashing, replication, read/write quorum
- Chapter 10 — Stream Processing System (Flink-like) — (stub) — watermarks, windowing, stateful operators, exactly-once
- Chapter 11 — Global Rate Limiter (Distributed) — (stub) — token bucket, leaky bucket, sliding window, Redis-backed global limiter
- Chapter 12 — Consensus & Leader Election — (stub) — Raft/Paxos, split-brain prevention, fencing tokens
- AIOps, Cost & Incident Management — the systems that separate a principal-level candidate from
a senior one, applying AI, cost discipline, and incident process on top of an already-working
observability platform
- Chapter 13 — Runbook Automation / AIOps Engine — (stub) — LLM-powered diagnosis, trigger-action mappings, safety guardrails
- Chapter 14 — Observability Data Lake — (stub) — cold/warm/hot tiers, Parquet storage, query federation (Thanos/Cortex/Mimir)
- Chapter 15 — Cost Optimization Pipeline — (stub) — adaptive sampling, metric drop rules, cardinality-aware ingestion
- Chapter 16 — Incident Management Platform — (stub) — alert correlation, incident lifecycle, escalation, runbook automation
- Chapter 17 — Search Engine (Elasticsearch-like) — (stub) — inverted indexes, sharding, near-real-time indexing
- Chapter 18 — URL Shortener — (stub)
- Chapter 19 — Distributed Cache (Case Study) — (stub)
- Chapter 20 — Notification Platform — (stub)
- Chapter 21 — Chat System — (stub)
- Chapter 22 — Video Streaming — (stub)
- Chapter 23 — News Feed — (stub)
- Chapter 24 — Collaborative Document Editor — (stub)
- Chapter 25 — Ride-Hailing Platform (Uber-like) — (stub)
- Chapter 26 — Ride Matching Engine — (stub)
- Chapter 27 — Payment System — (stub)
- Chapter 28 — Distributed Lock Service — (stub)
- Chapter 29 — Kubernetes Control Plane — (stub)
- Chapter 30 — GitHub-Scale Version Control — (stub)
- Chapter 31 — API Gateway — (stub)
- CDN — (see Part 04 — concept chapter covers this slot; split into a dedicated case study here once written)
- Chapter 32 — Multi-Tenant SaaS Platform — (stub)
- Chapter 33 — Recommendation Engine — (stub)
- Chapter 34 — Feature Flag Platform — (stub)
- Chapter 35 — Secrets Manager — (stub)
- Chapter 36 — Distributed Scheduler — (stub)
- Chapter 37 — CI/CD Platform — (stub)
- Chapter 38 — Object Storage (S3-like) — (stub)
- Chapter 39 — Cloud File Storage (Google Drive-like) — (stub)
- Chapter 40 — Distributed SQL Database — (stub)
- Chapter 41 — Large-Scale AI Agent Platform — (stub)
16 — Principal Engineer Topics
The leadership and organizational layer above pure system design — what separates a Principal from a Staff-plus-strong-technical-skills engineer.
- Chapter 1 — Architectural Decision Records — (stub) — see the
adr-writerskill for producing one - Chapter 2 — Evolutionary Architecture — (stub) — see Strangler Fig
- Chapter 3 — Build vs. Buy — (stub)
- Chapter 4 — Organization Scaling — (stub)
- Chapter 5 — Platform Strategy — (stub)
- Chapter 6 — Engineering Economics — (stub)
- Chapter 7 — Technical Debt Management — (stub)
- Chapter 8 — Leading Cross-Functional Architecture — (stub)
- Chapter 9 — Executive Communication — (stub)
- Chapter 10 — Principal Engineer Interview Preparation —
(stub) — see the
mock-interview-driverandstar-story-crafterskills
Common
Reusable engineering concepts — as opposed to prep/process material above — live inside
observability/‘s book-chapter structure instead, shared with the pattern
library too. For example, 3 — Push-Based vs Pull-Based Ingestion used to live nested under the telemetry
ingestion pipeline design, then moved to a shared concepts/ shelf once it became clear the idea
applies well beyond that one design; it now lives in observability/02-pipeline/ as part of the
observability book, and this design links in rather than owning it.
Adding a New Design
-
Create a new chapter directory under the relevant Part, numbered for its position within that Part — chapter numbers restart at 1 in every Part, they don’t continue the previous Part’s count:
0X-part-slug/NN-system-slug/. -
Add a content file named for the chapter (
<system-slug>.md— neverREADME.md, and not numbered itself — only the directory carries theNN-prefix) with the required frontmatter, prefixingtitlewithChapter <N> —:--- title: "Chapter <N> — <System Name>" description: "<One-line summary of the design focus and scale target>" tags: ["system-design", "<domain>", "maang-prep"] updated: <YYYY-MM-DD> hidden: false --- -
Structure the body using the five-step format above, and prefix the first
##heading the same way:## Chapter <N> — <System Name>. -
Update this Part’s entry in the Parts section above, prefixing the link text with
Chapter <N> —to match.
Metadata
| Dimension | Detail |
|---|---|
| Author | Amit Singh |
| Scope | MAANG interview preparation — not production documentation |
| Access | Internal — individual design notes are hidden per-note; this root index is public |
| Landing page | src/pages/notes/system-design/index.astro → /notes/system-design/ |