System design · The basics
What is it, in a minute?
The ideas every design is built from: a picture, a short animation and three things to remember. Start here if a word was new to you.
What is a cache?
A cache is a small, fast place that keeps the answers asked for most, so you stop visiting the slow place.
See it in a minuteWhat is a load balancer?
A load balancer stands in front of several servers and shares incoming requests among them, skipping any server that is down.
See it in a minuteWhat are replicas?
A replica is a live copy of a database. Copies share the reading, and one can take over if the original fails.
See it in a minuteWhat is sharding?
Sharding splits one big dataset into slices by a key, so each machine holds only one slice and does only its share.
See it in a minuteWhat is consistent hashing?
It matches keys to servers so that adding or removing a server moves only a small share of the keys.
See it in a minuteWhat is a message queue?
Drop slow work into a line and answer right away. A helper takes jobs from the line and does them later.
See it in a minuteWhat is a CDN?
Keep copies of your images and pages in many cities, so each visitor gets them from somewhere close.
See it in a minuteWhat is a database index?
An index is a sorted lookup list beside a table, so the database can jump to a row instead of reading all.
See it in a minuteWhat is a rate limiter?
Count how many requests each client sends, and politely turn away the extras, so one noisy client cannot slow everyone down.
See it in a minuteWhat is the CAP theorem?
When two copies of your data lose contact, you must pick: refuse to answer, or answer with maybe-old data.
See it in a minuteWhat is a circuit breaker?
When a service you depend on keeps failing, stop calling it for a while and fail fast, so trouble does not spread.
See it in a minuteWhat is idempotency?
Doing the same request twice has the same effect as doing it once, so retries and double taps are safe.
See it in a minuteWhat are live updates?
Instead of asking the server again and again, keep one line open so the server can tell you the moment something happens.
See it in a minuteWhat is publish and subscribe?
Announce news once to a shared board, and every service that signed up for that kind of news hears it.
See it in a minuteWhat is an API gateway?
Put one front door before your services. It checks who is knocking, limits how often, and sends each request where it belongs.
See it in a minuteWhat is a Bloom filter?
A tiny, quick check that says "definitely not here" or "maybe here", so you skip slow lookups for missing things.
See it in a minuteWhat is a connection pool?
Open a few database connections once, then lend them to requests and take them back, instead of opening one each time.
See it in a minuteWhat are SQL and NoSQL databases?
Two ways to keep data: neat tables with strict columns, or flexible documents and lookups that spread across many machines.
See it in a minute