High-Level Design (HLD / Distributed Systems)
Distributed systems and large-scale architecture interview preparation. Fundamentals (CAP, consistency, replication), building blocks (caches, queues, databases), and full system designs across FAANG, EU, and regional interview styles.
The HLD Interview Framework
The canonical 4-step approach (requirements → estimation → high-level design → deep dive), capacity-estimation method, time budgeting, and how FAANG / EU / regional styles differ.
CAP Theorem, PACELC, Consistency Models
CAP stated correctly, the PACELC extension, the consistency spectrum (linearizable → eventual), ACID vs BASE, and quorum reads/writes.
Replication & Partitioning (Sharding)
Single-leader / multi-leader / leaderless replication, sync vs async, replication lag, sharding strategies, consistent hashing, resharding, and hot partitions.
Caching Strategies
Cache layers, the four caching patterns, eviction policies, cache stampede mitigation, invalidation, Redis vs Memcached, and two-tier (L1/L2) caching.
Message Queues & Event Streaming
Queue vs log, delivery guarantees, ordering, backpressure, dead-letter queues, the outbox pattern, and CDC. RabbitMQ vs Kafka.
Database Choices — SQL vs NoSQL
When to choose relational, document, key-value, wide-column, graph, search, or time-series stores, and the cost of polyglot persistence.
API Design — REST, gRPC, GraphQL, WebSockets
REST principles and idempotency, REST vs gRPC vs GraphQL, real-time options (WebSockets/SSE/long polling), versioning, and pagination.
Rate Limiting & Throttling (HLD perspective)
Distributed rate limiting with Redis, per-user/IP/key granularity, edge vs application limits, the API-gateway role, and 429 + Retry-After.
Load Balancing
L4 vs L7, balancing algorithms, consistent hashing for cache-aware routing, sticky sessions, health checks, and LB redundancy.
Microservices, Service Mesh, API Gateway
Monolith vs microservices vs modular monolith, service discovery, API gateway, service mesh, distributed tracing, and the Saga + outbox patterns.
Storage Systems — Disk, RAM, Object Storage
The storage hierarchy and latency numbers, B-trees vs LSM-trees, row vs columnar storage, object/block/file storage, and tiered hot/warm/cold data.
CDN & Edge
What a CDN does, edge cache invalidation, edge compute, anycast vs DNS geo-routing, HTTP/2-3, and TLS termination at the edge.
Observability — Logging, Metrics, Tracing
The three pillars, structured logging, metric types, distributed tracing with OpenTelemetry, and SLI/SLO/SLA with error budgets.
Design a URL Shortener (TinyURL / bit.ly)
The most common HLD warm-up. ID-generation strategies, SQL vs NoSQL choice, caching, custom URLs, and analytics — with FAANG / EU / regional variants.
Design Twitter / Threads (Social Feed)
Timeline generation (pull / fan-out-on-write / hybrid), feed ranking, the celebrity (hot-user) problem, media storage, and caching layers.
Design a Chat / Messaging System (WhatsApp / Telegram)
1:1 and group chat, online presence, delivery/read receipts, media, WebSocket vs polling, and sharding by chat ID.
Design a Ride-Sharing System (Uber / Lyft)
Geospatial indexing (geohash / S2 / H3), driver-rider matching, surge pricing, real-time location tracking, and payment integration.
Design Instagram / Photo-Sharing
Feed generation, image storage and delivery (S3 + CDN), thumbnails, stories (24h TTL), likes/comments at scale, and hashtag search.
Design Netflix / YouTube (Video Streaming)
Video encoding pipeline, adaptive bitrate streaming (HLS/DASH), CDN delivery, recommendations, and view counting at scale.
Design a Notification Service (at scale)
Channel abstraction, template service, user preferences, a delivery queue with retries and DLQ, per-channel rate limiting, and provider failover.
Design a Web Crawler
URL frontier (priority + dedup), politeness (robots.txt, per-domain rate limit), DNS caching, content storage, duplicate detection, and distributed coordination.
Design a Search Autocomplete / Typeahead
Trie data structure, prefix caching, top-K suggestions, ranking by popularity/personalization, and the trend-update pipeline.
Design a Distributed Key-Value Store (Dynamo-style)
Consistent hashing, virtual nodes, replication, vector clocks, read repair, Merkle trees, gossip, and sloppy quorum.
Design a Distributed Job Scheduler (Cron at Scale)
Job queue, worker assignment, leader election (Zookeeper/etcd), missed-run handling, distributed locks, idempotency, and monitoring.
Design Google Docs / Collaborative Editor
Operational Transformation vs CRDTs, real-time sync over WebSockets, presence, cursor sharing, version history, and offline editing.
Design a Payment System
Idempotency keys, distributed transactions via Saga, reconciliation, double-entry bookkeeping, fraud hooks, and processor integration (Stripe/Click/Payme model).
Design an Exam Prep Platform (PrepHub-style)
Exam session management, real-time scoring, leaderboards, payment integration, content delivery, and anti-cheat/proctoring — an end-to-end real-system case.
How to Practice HLD
How many problems to solve, the internalizable template, per-section time-boxing, handling "I don't know" gracefully, and how to signal senior.