jargon

Backend & systems·topic 11 of 13

Scaling and load management

What happens when you multiply the traffic by ten. Half these terms are about adding capacity, and the more useful half are about what to do when you cannot add it fast enough.

Read in order · tick what you already know

  1. 01

    you measure the delay before the work starts moving, separately from how long the work itself takes.

    Latency

  2. 02

    you measure what the user actually experiences: request sent to last byte received, queueing and all.

    Response time

  3. 03

    you measure how many requests the system finishes per second, which is a different question from how long any one of them takes.

    Throughput

  4. 04

    the median request is 40ms, the 99th percentile is four seconds, and every page that fans out to ten services hits it.

    Tail latency

  5. 05

    you push utilisation past eighty percent and latency stops rising gently and starts going vertical.

    Saturation

  6. 06

    you work out from load tests how much traffic one instance handles, and how many you need for Black Friday.

    Capacity planning

  7. 07

    you move the database to a machine with four times the RAM, which takes an afternoon instead of a re-architecture.

    Vertical scaling

  8. 08

    you add three more identical instances behind the load balancer instead of making the existing one bigger.

    Horizontal scaling

  9. 09

    one address takes all the traffic and spreads it across the instances, skipping the ones failing their health check.

    Load balancer

  10. 10

    you pin each user to the same instance so the state cached in that process is still there on their next request.

    Session affinity

  11. 11

    you add a cache node and only one Nth of the keys move, instead of every key rehashing to a different server.

    Consistent hashing

  12. 12

    the instance count goes up on its own when CPU crosses a threshold, and back down twenty minutes after the spike ends.

    Autoscaling

  13. 13

    one customer's enormous batch job makes every other customer's requests slow, on shared infrastructure they cannot see.

    Noisy neighbour