Card 1 of 50
Front. Requirements. What do you pin down before drawing boxes?
These cards are original study material. They are not questions from a named employer or a live hiring loop.
All 50 cards in this deck
1.Requirements
What do you pin down before drawing boxes?
Who uses the system, what they wait for, how big it is, and which data must not be lost. The boxes follow from that.
2.Functional
What is a functional requirement?
What the system does for a user, such as saving a note or returning a timeline. It describes behavior, not speed or cost.
3.Nonfunctional
What is a non-functional requirement?
A quality target: latency, availability, durability, cost, or privacy. It decides how the boxes are built.
4.Dau
Why is a daily user count not a request rate?
Daily users are not all online at once, and a session is not the whole day. Peak concurrent users are a fraction of the daily total.
5.Qps
What is QPS used for in a design?
Queries per second at the peak you intend to survive. You size the fleet for that rate, not for the average across a quiet night.
6.Read-heavy
Where do you optimize a read-heavy product first?
On the path that serves the repeated read. The write still has to be correct and durable, but users wait on the read.
7.Latency
What is latency?
How long one request takes. A percentile such as p99 tells you about the slow tail. The average hides those requests.
8.Throughput
What is throughput?
How much work the system finishes per second. Raising it can make a single request slower if work sits in a batch.
9.Availability
What is availability?
The share of time the service gives a correct answer. It is usually counted over a window, against an error budget.
10.Durability
What is durability?
Acknowledged data is still there after a crash or a disk failure. It comes from copies, and from not confirming a write too early.
11.Consistency
What is consistency for replicated data?
Whether a reader sees the latest write. A follower copy can be slightly behind the node that accepted the write.
12.Cap
What does the CAP theorem constrain?
During a network split, a store cannot give every request both a fully up-to-date answer and an answer no matter which side you ask.
13.Replication
What is replication?
Keeping copies of the same data on more than one machine, so one failure does not lose the data or take it offline.
14.Leader
What is a leader-follower replica set?
One node accepts writes and sends them to the others. Reads can use a follower when a slightly older value is acceptable.
15.Quorum
What is a quorum?
The smallest number of replicas that must agree before a read or a write counts. Overlapping quorums keep readers on a recent write.
16.Sharding
What is sharding?
Splitting rows across machines by a key, so no one machine has to hold or serve the whole dataset.
17.Consistent-hash
What is consistent hashing?
A way to assign keys to machines so adding or removing one machine moves only a fraction of the keys.
18.Hotspot
What is a hotspot?
One key or one partition that gets far more traffic than the rest, so a single machine becomes the bottleneck.
19.Cache
What is a cache?
A fast copy of something expensive to fetch or compute, kept near the reader. It can be stale, and it can miss.
20.Cache-aside
What is cache-aside?
The application checks the cache, and on a miss it loads from the database and stores that result in the cache.
21.Ttl
What does a cache TTL do?
It drops an entry after a set time, so a changed value does not stay in the cache forever.
22.Stampede
What is a cache stampede?
Many requests miss the same key at the same moment and all hit the database. One loader, or an early refresh, spreads that spike.
23.Cdn
What is a CDN?
Servers placed near users that store cacheable responses, so those requests do not travel to the origin.
24.Load-balancer
What does a load balancer do?
It spreads incoming requests across healthy copies of a service, and it stops sending traffic to a copy that fails its check.
25.Stateless
What does stateless mean for an app server?
Any copy can handle any request, because session data lives in a store, not inside that one process.
26.Queue
Why put a queue between two stages?
The producer can finish without waiting for slow work, and a burst can sit in the queue while consumers catch up.
27.Backpressure
What is backpressure?
A signal that a later stage is overloaded, so the earlier stage slows down instead of piling up unbounded work.
28.Idempotent
What is an idempotent operation?
Doing it twice has the same end state as doing it once. A retry is then safe.
29.Retry
When is a retry safe?
When the operation is idempotent, or you can tell the first attempt did not commit. A blind retry can apply the same write twice.
30.Idempotency-key
What is an idempotency key?
An id the client sends with the request. The server stores the first result under that id and returns it on a repeat.
31.Index
What is a database index?
An extra structure that finds rows by a column without reading the whole table. Every write has to update it.
32.Primary-key
What is a primary key?
The column or columns that identify one row and no other. Other tables refer to that identity.
33.Cursor
Why prefer a cursor to a large offset?
A large offset still walks the rows it skips, and shifting data can repeat or drop rows. A cursor continues after the last item seen.
34.Rate-limit
What is rate limiting?
A cap on how many requests a client may make in a window, so one caller cannot crowd out the rest.
35.Circuit
What does a circuit breaker do?
It stops calling a dependency that is failing, then tries a few requests later. Callers fail fast instead of waiting on a dead service.
36.Timeout
Why put a timeout on every downstream call?
A stuck dependency would otherwise hold the request, and the worker or connection, with no end.
37.Health
What is a health check?
A probe that tells a load balancer or orchestrator whether this instance should receive traffic right now.
38.Fanout-write
What is fan-out on write?
The expensive distribution happens when the item is created, so each reader later fetches a view that is already assembled.
39.Fanout-read
What is fan-out on read?
The item is stored once, and a reader's view is built when they ask. Writes stay cheap, and reads do more work.
40.Object-store
What belongs in object storage?
Large files that are written once, such as images. The database keeps the id and the metadata, not the bytes.
41.Sql-choice
When is a relational database the better fit?
When you need joins, constraints, and a transaction across rows. A document store fits access by one key and a varying shape.
42.Transaction
What does a transaction give you?
A group of writes that commit together or not at all, so readers never see a half-finished update.
43.Isolation
What is transaction isolation?
How much one transaction can observe of another that has not committed. Looser levels allow more concurrency and more surprises.
44.Sli
What is an SLI?
A measurement of service quality, such as the share of requests that finish in under 200 milliseconds.
45.Slo
What is an SLO?
The target you set for an SLI over a window, such as 99.9 percent of requests under 200 milliseconds.
46.Budget
What is an error budget?
The amount of failure an SLO still allows. When it is used up, reliability work comes ahead of shipping speed.
47.Envelope
What is a back-of-the-envelope estimate for?
An order of magnitude for storage, traffic, or bandwidth, so you know which part of the design actually matters.
48.Degrade
What is graceful degradation?
A simpler response that is still useful when a dependency is down, instead of failing the entire page.
49.Partition
What is a network partition?
A split in which some machines cannot reach others, even though both sides are still running.
50.Outbox
What is the transactional outbox?
The database write and the 'event to publish' are stored in the same transaction. A worker then publishes the event, so the two cannot diverge.
