A steady load on one service
Example, not the course's numbers
Replicas needed
- Requests in flight
- 48
- Replicas needed
- 9
- Load on each replica
- 67%
With one fewer replica (8): 75%, above the target load, with little room for bursts.
12 requests per second at 4 seconds each puts 48 requests in flight. You need 9 replicas. Each runs at 67%.
The rule, in words
- Requests in flight equal the arrival rate times the seconds each request takes. This is Little's law.
- One replica holds a fixed number of requests at once. Running it at only part of that leaves room for bursts.
- Replicas needed equal the requests in flight divided by (requests per replica times the target load), rounded up to a whole replica.
- With fewer replicas than the load needs at 100 percent, requests arrive faster than they leave and the queue grows.
A model for a steady load. Real traffic comes in bursts, requests differ in length and real systems add warm-up time and limits.
