3 ms·
How many web requests are typically CPU bound though? Not many.
by joseph_cooney 14y ago
How many web requests are typically CPU bound though? Not many.
- vidarh 14y agoDoesn't matter. At some point you hit memory limits, disk IO limits, or simply a connection limit. It doesn't matter what limit: If you have some requests that are longer running than others, random load balancing will make them start piling up once you reach some traffic threshold. You can increase the threshold by adding more backends or increasing the capacity of each backend (by optimizing, or picking beefier hardware if you're on a platform that will let you), and maybe you can increase it enough that it won't affect you. But no matter what you do, you end up having to allocate more spare resources at it than what you would need with more intelligent routing. If you're lucky, the effect might be small enough to not cost you much money, and you might be able to ignore it, but it's still there.
- chc 14y ago> But no matter what you do, you end up having to allocate more spare resources at it than what you would need with more intelligent routing. I think we have to remember that the "intelligent routing" in question here is actually marketing-speak for "one request per server." Are you saying that when your servers can only receive one request at a time, you will necessarily need fewer than if your servers can handle three requests at a time but are assigned requests randomly?
- Dylan16807 14y agoNo it's not. "Intelligent routing" means giving each server exactly as many requests as it can handle, and no more. If your servers can handle 3 requests each, using intelligent routing to make sure they never get more than 3 will blow the latency of the random method out of the water.