On Mon, Oct 19, 2009 at 01:34:29PM -0700, Hank A. Paulson wrote: > >It does so when the request contains a cookie indicating it must be > >processed by that server and not by any other one. The backend's queue > >is dequeued when a server releases a connection and finds a connection > >in the backend queue that has been here for more time than the next > >connection in its own queue. This ensures a very fair queuing. > > So then in the case of a system with cookies you could have a request with > an existing cookie wait for longer than a request that is new?
No, because the two arrival dates are compared and the earliest one is always selected. This is the only element which determines if a server dequeues from its own queue or from the global queue. That's why I claim it's very fair. > a connection in the backend queue that has been here for more time than the > next connection in its own [a given server for that backend] queue. > > > > >You can take a look at that diagram for more information : > > > > http://haproxy.1wt.eu/download/1.3/doc/queuing.pdf > > Thanks, I had seen that before but wasn't sure exactly what calculated > value point triggered the queuing. But that diagram brings up another > question: > If your maxqueue is 8192, then the queue for a backend and the individual > server queues can all be 8192 each? No, each queue can have its own size. > And at what level is the global queue at "global global" or is it at each > backend? it's the backend. BTW, I believe it's still the case, for a moment the backend's maxqueue was not configurable. I'd have to check. However, it's easy to throw out of the queue using an ACL. Regards, Willy