System design
Problem breakdowns, key technologies and core concepts for system design interviews. Free to read.
Problem breakdowns, key technologies and core concepts for system design interviews. Free to read.
22 write-ups
| Title | Difficulty |
|---|---|
| API Design: REST, GraphQL and gRPC How to design the API in a system design interview. REST resources, HTTP methods, PUT vs PATCH, status codes, headers, pagination and sensitive data, then GraphQL, gRPC and when to pick each. | |
| Back-of-the-Envelope Estimation How to estimate QPS, storage, bandwidth and server counts quickly and use them to make design choices. Time and size shortcuts, latency and throughput numbers, worked examples and common mistakes. | |
| Caching Strategies Where to cache, how to read and write through a cache, eviction, invalidation and its race conditions, and the failure modes that matter at scale: stampedes, penetration, avalanches and hot keys. | |
| Consistent Hashing How to spread keys over a changing set of machines without reshuffling everything. Mod-N vs the hash ring, virtual nodes, replicas, rendezvous, jump and Maglev hashing, fixed slots and bounded loads. | |
| Data Modeling for System Design How to design the data model in an interview. Entities and access patterns, relational schemas and indexes, denormalization, partition and sort keys, embedding vs referencing, IDs and schema changes. | |
| Sharding, Partitioning and Replication How to split data across machines and keep copies of it. Leader, multi-leader and leaderless replication, replication lag, range vs hash sharding, shard keys, hot spots, secondary indexes and rebalancing. | |
| Authentication and Authorization How systems know who you are and what you can do. Password storage, sessions vs JWTs, refresh tokens, OAuth 2.0, OpenID Connect, SAML and SSO, then RBAC, ReBAC and service-to-service auth. | |
| Change Data Capture How to keep search indexes, caches, warehouses and other services in sync with a database by reading its log. Polling vs triggers vs log-based CDC, Debezium, ordering, snapshots and pitfalls. | |
| Choosing a Database How to pick the right database in an interview. Relational, key-value, wide-column, document, search, time-series, graph, columnar and object storage, with the access-pattern questions that decide between them. | |
| Consensus: Raft and Paxos How a group of machines agrees on one value or one log despite crashes. Quorums, Raft's elections and log replication, Paxos, linearizable reads, leases, fencing and when to use etcd or ZooKeeper. | |
| CRDTs Data types that let replicas accept writes independently and still converge. Counters, registers, OR-sets, sequence CRDTs for text, version vectors, metadata costs and when to use CRDTs in a design. | |
| Gossip Protocols How clusters share membership and state without a central server. Epidemic spread, push vs pull, anti-entropy, heartbeats, phi accrual and SWIM failure detection, and when gossip is the wrong tool. | |
| Idempotency and Deduplication Why duplicates are unavoidable in distributed systems and how to make them harmless. Naturally idempotent writes, idempotency keys, consumer dedupe, Kafka and SQS guarantees, and "exactly once". | |
| Microservice Patterns When to split a system into services and how to wire them together. API gateways, backends for frontends, service discovery, sidecars and meshes, event-driven design, CQRS and splitting a monolith. | |
| Multi-Region Architecture How to run one system in several regions. Latency physics, active-passive vs active-active, home regions and geo-partitioning, cross-region replication, global routing, failover, RPO/RTO and data residency. | |
| Real-Time Updates How to push changes to clients as they happen. Polling, long polling, SSE and WebSockets, then routing updates to the right server with pub/sub, catching up after reconnects and scaling connections. | |
| Resilience Patterns How to keep one failing dependency from taking the whole system down. Timeouts, retries with backoff and jitter, circuit breakers, bulkheads, backpressure, load shedding and disaster recovery. | |
| Security Fundamentals The security toolkit for system design interviews. Threat modeling, TLS and mTLS, encryption at rest with KMS, request signing, secrets management, and designing for GDPR deletion and data residency. | |
| Storage Engines and Indexes How databases lay data out on disk. Append-only logs, B-trees, LSM trees and compaction, Bloom filters, secondary and composite indexes, and row vs column storage, with the trade-offs that decide which to use. | |
| Stream vs Batch Processing When to compute over data in scheduled batches and when to process it as a stream. Event time, windows, watermarks, state, exactly-once, micro-batching, and Lambda vs Kappa. |