jpotter-varnish at codepuppy
May 23, 2012, 2:39 PM
Post #3 of 4
Re: max_connections, backend_busy, and queueing requests
[In reply to]
>> As soon as there are 500 concurrent requests, varnish kicks any additional requests to vcl_error and we send out a 5xx error for the requests. And varnishstats increments the backend_busy/"Backend conn. too many" counter. How do I get Varnish to queue up the requests instead, so that when a backend worker connection becomes available it gets sent to a backend?
> Varnish, in it's current state doesn't do this, I'm afraid. Since Varnish uses one thread, and thus has some overhead, for each connection it wouldn't be ideal to have them idly wait. The current trunk code uses separate threads to fetch content from the backend so having some sort of queue there shouldn't be to hard. I don't know of any plans to implement this, however.
Thanks for the reply. If I were to implement this and submit it, would Varnish be willing to accept the patch into the mainline? And, presumably an implementation would want two config variables: the max number of requests to allow on the queue and the max time allowed on queue until vcl_error is triggered?
varnish-misc mailing list
varnish-misc [at] varnish-cache