Codele / System design
Latency and throughput
Big systems care about two kinds of speed. Push the number of customers at a one-barista coffee shop and watch the wait shoot up before the barista is even full.
- Latency is how long one request waits. Throughput is how many requests finish each second.
- A server is like a barista: it serves one thing at a time, so requests queue (wait in a line) when they arrive faster than it can finish them.
- Waiting time rises slowly at first and then very fast as the server gets close to full.
- Past full, the line never shrinks, so the wait keeps growing.
- Teams keep servers well below full on purpose, so spikes of visitors do not make everyone wait.
Loading the playable lesson…