The Grocery Store Analogy
blog.bloc.io
blog.bloc.io
* how many checkout lanes are open (total worker threads, max file handles, max port per connection)
* how are customers directed toward the shortest line (load balancing strategy, poll vs. epoll vs. select vs. accept)
* how many items can each customer pay for at once (keepalive, persisting connections)
* how many customers can stand in each lane (receive buffer depth)
* how long to wait for a sleepy customer to put their items on the counter before kicking them out of line (timeout)
You can observe real world traffic jam scenarios in actual checkout lanes and easily picture the same thing happening in a web server stack, and fortunately each layer of the web stack gives you settings to open as many lanes as your servers can handle and keep those lanes moving.