In this lesson · topic 1 of 7
Topic 1
A full server gets worse, not just slower
4 min read
More work than capacity
A server finishes a fixed amount of work in a given time. Call that its capacity. If requests arrive more slowly than that, the server keeps up. If they arrive faster, even a little, the difference has to go somewhere. In most servers it goes into a queue.
A queue feels harmless. Nothing is refused. Every request is accepted, and each one is served in turn. The cost is time. A request that joins a queue of 40, on a server that finishes 4 a unit, waits 10 units before work even starts. The wait grows with the length of the queue, and under sustained overload the queue only gets longer.
Callers do not wait forever
Every caller has a timeout, whether it is written down or not. A browser tab is closed. A load balancer cuts the connection. A client library stops waiting. After that point the answer is useless: nobody is listening.
The server usually does not know this. It pulls the next request from the queue, spends a full service time on it, and writes a response to a connection that is gone. That work still used a worker. It counted as throughput. It helped nobody.
So there are two numbers to keep apart. Throughput is how many requests the server finishes. Goodput is how many it finishes in time for someone to use them. Below capacity they are the same. Above capacity they can come apart completely.
Here is the case to predict. A server with four workers is offered 1.5 times its capacity, forever. It keeps a first-in first-out queue with no limit. Clients wait 10 units.
Predict first
The unbounded queue in the lab
In the lab the unbounded queue held up at first. Its queue delay passed the client timeout at about 39 tmeasured. After a longer run it was answering 0%measured of its capacity in time. Its queue delay was 72 tmeasured, many times the timeout.
Doing nothing about overload is not neutral. The server looks healthy by every measure it reports, and it is doing no useful work. The next topic shows what to do instead.