Dev Skills
Track A

System design concepts for interviews

Short pages, always the same shape: what problem it solves, what it costs you, when to use it and when not to, a visual, the follow-up an interviewer will ask, and a 60-second self-check you answer before you see ours.

49 concepts·All of them on one page: the cheat sheet·Not startedAttemptedSolidNeeds review

The order to read them in

The list is a dependency order, not a ranking. Tier 1 is what every design uses: how to measure speed and load, one request from DNS to the database, and caching. Tier 2 starts the moment data lives on more than one machine (replication, partitioning, consistency), and it does not make sense without tier 1. Tier 3 is the specific patterns that usually arrive as an interviewer’s follow-up.

Each card names the concept it builds on (“Read after”) and the cost it charges you. If you are new, go top to bottom. If you have an interview soon, read tier 1 quickly, then spend your time in tier 2.

Tier 1 — the basics

The things every design uses. If any of these are shaky, the rest will not hold. Short pages, one cost each.

Latency numbers worth memorising

Four numbers that tell you where the time goes.

Costs you: Memorising numbers can make you sound sure about a system you have never measured.

Read after: Latency vs throughput

Back-of-envelope estimation

Rough maths, done out loud, that tells you which problem you have.

Costs you: It takes time, and an early number can anchor you.

Read after: Latency numbers

Caching

Keep a copy of the answer near whoever keeps asking for it.

Costs you: You now have two copies of the truth, and they can disagree.

Read after: Latency numbers

Load balancing

One address in front, many machines behind, and a way to stop sending traffic to a broken one.

Costs you: It is one more hop (a fraction of a millisecond) and one more thing that can fail, so it needs a backup of its own.

Read after: Reverse proxies

SQL vs NoSQL — and why, not just names

Choose by how you read the data, and by what must never be wrong. Not by which word sounds bigger.

Costs you: Choosing relational costs you work once one machine is not enough.

Indexes and what makes a query slow

A sorted lookup table, so the database stops reading every row.

Costs you: Every index makes writes slower, because each insert, update and delete has to update the index too.

Read after: SQL vs NoSQL

Connection pooling: what it is, how to size a pool, and the pitfalls

Reuse a small set of open database connections, instead of opening one per request.

Costs you: The pool is a queue, so when it is full, requests wait.

Read after: SQL vs NoSQL, Latency numbers

Performance vs scalability

Fast for one person is not the same as staying fast for a million.

Costs you: Chasing the wrong one wastes weeks.

Latency vs throughput

How long one thing takes, versus how many things you finish per second.

Costs you: Many techniques that raise throughput add latency, and many that cut latency leave capacity unused.

Read after: Performance vs scalability

Availability, failover and the nines

How much downtime you are promising, and what it costs to promise less.

Costs you: Every nine costs money and complexity.

Read after: Load balancing

DNS — how a name becomes a server

The phone book of the internet, and the step that happens before a client can connect at all.

Costs you: Answers are cached all over the internet: in the browser, the operating system, the router, the internet provider.

Reverse proxies and gateways

One front door that handles the boring, repeated work before anything reaches your code.

Costs you: One more hop, one more thing to configure, and one more thing that can be set up wrongly in a way that affects everything at once.

Read after: HTTP, TCP, UDP, RPC

HTTP, TCP, UDP, REST and RPC

How two machines talk, and which style to pick between your own services.

Costs you: Every step up in promises costs time.

Object storage and presigned uploads

Big files do not belong in your database, and they should not pass through your servers either.

Costs you: You now have two stores that can disagree.

Read after: SQL vs NoSQL

API design — pagination, versioning, errors

The contract you cannot change later, so get the three boring parts right now.

Costs you: Doing this well costs you flexibility up front.

Read after: HTTP, TCP, UDP, RPC

API gateway vs load balancer vs reverse proxy

Three names for the box in front of your services. They overlap, and the difference is which job you bought it for.

Costs you: Every box in the request path adds a network hop, a configuration you have to get right, and something that must itself be redundant.

Read after: Reverse proxies, Load balancing

Cache write strategies

When data changes, who updates the cache, who updates the database, and in what order. Each answer has a different failure.

Costs you: Every strategy picks two of three: fast writes, a cache that is never stale, and no risk of losing a write.

Read after: Caching

Redis vs Memcached

Both are in-memory caches. Memcached does one thing simply; Redis is a data-structure server that also caches.

Costs you: Redis's features are also its operational surface: persistence settings, replication, failover, cluster slots and memory used by data structures all need understanding and monitoring, and a Redis that has become a database is no longer something you can flush.

Read after: Caching

Tier 2 — distributed

The core of most senior interviews. Once data lives on more than one machine, all of this starts to apply at once.

Replication

Keep the same data on several machines, and decide who is allowed to change it.

Costs you: Copies take time to arrive, so a replica can serve data that is out of date.

Read after: SQL vs NoSQL, Availability and failover

Partitioning (sharding)

Split the data so different machines own different pieces. It is how you scale writes past one machine.

Costs you: You lose the things that were free on one machine.

Read after: Replication, Indexes and slow queries

CAP and PACELC as real tradeoffs

When the network breaks you must choose: refuse the write, or accept it and be inconsistent.

Costs you: Using CAP as a label makes you less accurate.

Read after: Consistency models, Availability and failover

Consistency models

Exact words for how out of date a read is allowed to be, once data lives on more than one machine.

Costs you: Stronger promises cost speed on every operation, and availability during failures.

Read after: Replication

Consensus, at concept level

How a group of machines agrees on one answer when some of them cannot be reached.

Costs you: Every decision needs a round trip to a majority, so it is slow compared to a local write, and it gets slower the further apart the machines are.

Read after: Consistency models, CAP and PACELC

Idempotency, and why exactly-once is a myth

Make doing it twice the same as doing it once, because it will happen twice.

Costs you: You need somewhere to remember what you have already done: a key store with a retention window.

Read after: Message queues, API design

Message queues and backpressure

Write the job down now, do it soon, and survive the gap in between.

Costs you: The user gets "we received it", not "it is done", and your product has to say so.

Read after: Latency vs throughput

Distributed transactions: 2PC, sagas, outbox

When one action must change two systems, and no transaction covers both.

Costs you: Every option here is worse than a local transaction.

Read after: Transactions and locking, Message queues, Idempotency

Transactions, isolation and locking

What actually stops two people buying the last seat, inside one database.

Costs you: Every level of protection costs concurrency.

Read after: SQL vs NoSQL

Fan-out on write vs fan-out on read (push vs pull)

Do the work when one person writes, or when a million people read. This one choice designs the system.

Costs you: Push costs write amplification: one action becomes a million writes, storage for a million copies, and a backlog that delays everybody when one big account posts.

Read after: Message queues

Clocks, ordering and why timestamps lie

Two machines never agree on the time, so never let time decide who wins.

Costs you: Doing it properly costs you simplicity.

Read after: Consistency models

Multi-region and data residency

Users on the other side of the world, laws about where data may live, and one very expensive round trip.

Costs you: Everything gets harder and more expensive.

Read after: Replication, Consistency models, Latency numbers

Isolation levels

How much one transaction is allowed to see of another that is running at the same time. Each level removes specific anomalies.

Costs you: Stronger isolation means more waiting or more aborted transactions.

Read after: Transactions and locking

Optimistic vs pessimistic locking

Lock first and make others wait, or go ahead and check for a conflict when you write. Choose by how often writers collide.

Costs you: Pessimistic locking costs concurrency: writers to a hot row queue one at a time, a lock held across slow work blocks everyone behind it, and two transactions locking rows in different orders deadlock.

Read after: Transactions and locking, Isolation levels

Tier 3 — common patterns

Specific, reusable answers. You will meet many of these in interviews, usually as the follow-up rather than the first question.

Rate limiting

Say no cheaply, before the expensive part of your system finds out.

Costs you: You will sometimes reject real traffic, and it hits your biggest customers hardest, along with anyone behind a shared IP address: an office, a university, a mobile network.

Read after: Reverse proxies

Consistent hashing

Add or remove a machine and move only a small slice of the keys, not all of them.

Costs you: It is more complex than a remainder, and someone has to maintain the ring: which nodes exist, and getting every client to agree on that view.

Read after: Partitioning, Caching

Bloom filters

A tiny structure that says "definitely not here" or "probably here", and never the wrong way round.

Costs you: It can say yes when the answer is no.

Read after: Caching, Indexes and slow queries

Write-ahead logs

Write down what you are about to do, before you do it, so a crash cannot lose it.

Costs you: Every write happens twice, once to the log and once to the data, so you pay in disk speed and space.

Read after: Transactions and locking, Replication

CDNs

Put copies of your static content near users, so most requests never reach you.

Costs you: You now have copies of your content everywhere, and clearing them is not instant.

Read after: Caching, DNS

Geospatial indexing

Turn "near me" into a range query, because databases cannot sort by two dimensions at once.

Costs you: The mapping is rough at the edges.

Read after: Indexes and slow queries

Long polling vs WebSockets vs SSE

Three ways to push data to a browser, with very different costs at scale.

Costs you: All of them mean holding connections open, so your servers now hold state in a way plain request-response does not.

Read after: HTTP, TCP, UDP, RPC

Change data capture

Read the database's own log to find out what changed, instead of asking the application to tell you.

Costs you: The consumer sees database rows, so it is tied to your schema.

Read after: Write-ahead logs, Message queues

Circuit breakers and retries with jitter

Stop calling something that is already failing, and never retry all at the same moment.

Costs you: A circuit breaker returns errors for requests that might have worked, so you trade away some successful requests on purpose for the survival of the system.

Read after: Availability and failover

Search indexing basics

An index from words to documents, so "find me things containing this" is not a full scan.

Costs you: A second copy of your data that can drift from the source, and now you own keeping it in step.

Read after: Indexes and slow queries

Distributed counters: sharded counters, write batching and HyperLogLog

Sharded counters split one hot counter into many rows, so likes and views stop queueing on a single lock.

Costs you: Every technique here trades exactness or freshness for throughput.

Read after: Partitioning, Caching

Authentication, authorization and secrets

Who are you, what are you allowed to do, and where do the keys live.

Costs you: Security is friction you pay on every request, forever.

Read after: API design

Observability — metrics, logs, traces and alerts

How you find out something is broken, and how you find out why, at three in the morning.

Costs you: Observability is expensive, and the cost surprises people.

Read after: Latency numbers

Deploys, migrations and safe releases

Most outages start with a change you made on purpose. This is how you make that survivable.

Costs you: Safety slows you down.

Read after: Availability and failover

Backups, disaster recovery, RPO and RTO

Two numbers: how much data you can lose, and how long you can be gone.

Costs you: Backups cost storage, and the good ones cost more: frequent snapshots plus continuous log archiving is not cheap at scale.

Read after: Replication, Object storage

Capacity planning and cost

What the design costs per month, and which line of the bill you would attack first.

Costs you: Optimising for cost always costs you something else.

Read after: Back-of-envelope maths

Batch and stream processing

Enormous volume in, aggregates out, and nobody waiting for any single event.

Costs you: Streaming buys freshness and pays with complexity: late and out-of-order events, state you must keep in the middle of a running job, and a much harder story when you need to fix a bug in yesterday's numbers.

Read after: Message queues