Foundations

The building-block interview questions.

Learn the reason behind each component

5 independent guides. Each includes local concept explanations, a correctness contract, a worked failure trace, and a runnable Python learning model.

Read in this order: requirements → concepts → data flow → concurrency and failure behavior → sizing → worked example. Explain what can fail before choosing a technology.

01·Rate LimiterTurn a quota into an explicit admission rule, choosing whether it limits bursts, trailing-window traffic, or a long-run rate. 02·Consistent Hashing & Key-Value StoreSpread a key-value store across changing servers without moving nearly every key, then reason separately about replication and read correctness. 03·Unique ID GeneratorEncode distributed IDs while separating uniqueness, approximate timestamp order, and safe restart behavior. 04·URL ShortenerBuild an atomic short-code mapping and a correct redirect path, including expiry, caching, and guessability. 05·Web CrawlerSchedule a bounded web crawl without overwhelming websites, losing queued URLs, or assuming every duplicate test is exact.

Find a guide or concept

5 guides

Consistent Hashing & Designing a Key-Value Store

Spread a key-value store across changing servers without moving nearly every key, then reason separately about replication and read correctness.

Consistent hashing · Virtual nodes · Quorum · Linearizability · Vector clocks · Merkle trees · Tombstones

Designing a Rate Limiter — A System Design Interview Guide

Turn a quota into an explicit admission rule, choosing whether it limits bursts, trailing-window traffic, or a long-run rate.

Token bucket · Time windows · Atomic Redis scripts · Wall and monotonic clocks · Backpressure and load shedding · Leases

Designing a Unique ID Generator — System Design Interview Guide

Encode distributed IDs while separating uniqueness, approximate timestamp order, and safe restart behavior.

Snowflake IDs · Wall and monotonic clocks · Leases · Fencing tokens · Optimistic concurrency and compare-and-set

Designing a URL Shortener — System Design Interview Guide

Build an atomic short-code mapping and a correct redirect path, including expiry, caching, and guessability.

Base62 encoding · Idempotency keys · Cache-aside and invalidation · Optimistic concurrency and compare-and-set · Replication

Designing a Web Crawler — A System Design Guide

Schedule a bounded web crawl without overwhelming websites, losing queued URLs, or assuming every duplicate test is exact.

Crawl frontier and politeness · Bloom filters · Deduplication · Transactional outbox · Leases · Backpressure and load shedding

Download the Python concept models · Python 3.10+, no packages required.

Student clarity and correctness review · 19 October 2026