Fundamentals
System Design › FundamentalsLSM-Tree vs B-Tree: How Databases Store Data on Disk
Why is one database great for writes and another for reads? The storage engine — B-tree (in-place, read-optimized) vs LSM-tree (append-only, write-optimized), compaction, Bloom filters, and read/write amplification.
System Design › FundamentalsConsensus Explained: Raft, Paxos & Majority Quorums
How do unreliable servers agree on one value and never disagree? Consensus explained from scratch — majority quorums, Raft leader election and log replication, Paxos, and where etcd/ZooKeeper use it.
System Design › FundamentalsCapacity Estimation: Back-of-the-Envelope Math for System Design
How to estimate QPS, storage, bandwidth, and memory in a system design interview — the simple 5-step method with a full worked URL-shortener example. Fresher to senior.
System Design › FundamentalsDistributed Transactions & the Saga Pattern (Explained)
How do you keep an operation all-or-nothing across many microservices when each has its own database? The Saga pattern, compensating transactions, orchestration vs choreography, and the outbox pattern — fresher to senior.
System Design › FundamentalsRate Limiting Algorithms: Token Bucket, Leaky Bucket & More
The 5 rate-limiting algorithms explained from scratch — fixed/sliding window, token bucket, leaky bucket — plus how to do it across many servers with Redis. A fresher-to-senior guide.
System Design › FundamentalsAPI Design: REST vs gRPC vs GraphQL (How to Choose)
REST, gRPC, and GraphQL explained from scratch — and exactly when to pick which. A fresher-to-senior guide with a comparison diagram, plus API versioning and pagination.
System Design › FundamentalsMessage Queues & Kafka: How to Decouple Systems (Async Processing Explained)
Message queues explained — synchronous vs asynchronous, producers/queue/consumers, why queues decouple and absorb spikes, queue vs pub/sub, Kafka topics/partitions/consumer groups/offsets, and at-least-once delivery with idempotent consumers.
System Design › FundamentalsConsistent Hashing Explained: Scale a Cluster Without Moving Everything
Consistent hashing explained from the problem up — why plain hash % N breaks when you add a server, how the hash ring maps keys to the next server clockwise so only 1/N of keys move, virtual nodes for even load, and where it is used.
System Design › FundamentalsConsistency Models Explained: Strong vs Eventual (and In Between)
Consistency is a spectrum, not a switch. Strong vs eventual consistency in plain English, the useful middle guarantees (read-your-writes, monotonic reads, causal), why strong costs latency and availability, and how to choose per feature.