Hi Laurent,

On Fri, Mar 07, 2014 at 08:57:55AM +0100, Laurent Dormoy wrote:
> Hi,
> 
> I have a hard time collecting statistics for queued backend requests. It
> usually happens during a couple of seconds and cannot be efficiently tracked
> by a monitoring system collecting data at regular intervals.
> 
> Is it possible to add to the stats page/csv a counter for total queued
> requests (like the total sessions counter) ?

I think it will provide really a meaningless statistics. For example, if
you constantly have only one request in the queue, you'll have as many
queued requests as cumulated connections despite the servers responding
very fast and the request spending close to zero time in the queue. On
the opposite, if you regularly have many queued requests, these requests
will only account for one place in the queue and will report a low value
despite being queued for a long time.

Instead we should report the sum of the queue positions : if a request
is queued first, it counts for 1. If it's queued after 50 other requests,
it counts for 51. It will report the total wait time which was inflicted
to users and will make much more sense. Also, you'll be able to tell how
many servers you need to add by dividing this number by the total number
of connections and by the servers' maxconn.

Note that in halog, we do something pretty similar but instead we count
the total time spent in certain states. Here again it's very interesting
because by adding all queue times, you know exactly how much time was
spent waiting in the queue in average per session, so how much response
time the lack of servers is responsible for. This is an interesting metric
for people responsible for the end-user experience.

Regards,
Willy


Reply via email to