Dev Skills
Start from scratch·Lesson 6 of 6

The words you need, in plain English

A dozen or so words that unlock every other page. Nothing left undefined.

By devskills editorial team · Last updated

Each of these gets a full page later. This list is here so no word on those pages is new to you.

Latency — how long one request takes. Throughput — how many requests you handle per second. They are different things, and making one better often makes the other worse.

Client and server — the client asks (a phone, a browser), the server answers. The request is the question and the response is the answer.

Load balancer — one address in front of several servers. It spreads requests between them and skips any server that stops answering.

Cache — a copy of an answer, kept somewhere faster and closer. Most requests never reach the real source. The price is that the copy can be out of date.

Database — where the truth is kept, on disk, so it survives a restart. Replica — a copy of the database that keeps up with it. You use replicas to survive failure and to serve reads.

Shard, or partition — splitting the data so different machines own different pieces. It is the only way to take more writes than one machine can handle.

Queue — a list of jobs, written down now and done shortly after. It stops the fast part of your system waiting on the slow part.

Stateless — a server that keeps nothing important in its own memory. Any server can handle any request, so losing one costs you only the requests it was handling.

Consistency — whether everyone sees the same data at the same moment. Eventual consistency means they will agree soon, but not right now.

Availability — whether the system answers at all. A system can be up and wrong, or correct and down. Choosing which you prefer, feature by feature, is real design work.

Idempotent — doing it twice has the same result as doing it once. This matters a lot, because retries over a network regularly make things happen twice.

Here is how most of these words show up in a single tap. You open a photo app (the client), and it sends a request. A load balancer passes it to one of many stateless servers. That server checks a cache first. If the photo list is there, the response goes back in a few milliseconds, and that is your latency. If not, it reads from a replica of the database, because reads can go to copies. When you upload a new photo, the write goes to the main database, on the shard that owns your account, and a resize job is put on a queue so you are not kept waiting. For a moment your friend may not see the new photo yet. That is eventual consistency, and nothing is broken.

If the upload request times out and the app sends it again, you do not want two copies of the photo. So the app sends an id with the upload, and the server ignores a second upload with the same id. That is what makes the upload idempotent. Every word on this page has a reason like this. None of them is there to sound clever.

The short version
  • Latency is per request. Throughput is per second. Improving one often hurts the other.
  • A cache trades freshness for speed. A replica trades freshness for safety and more reads.
  • Partitioning is the only way past one machine's write limit. Replication does not help writes.
  • Idempotent means safe to repeat. On a network, any message can end up repeated.
Remember: You do not need all of these today. You just need to not get stuck when the word shows up on the next page.