On Wed, Mar 26, 2014 at 8:49 AM, Pedro Mata-Mouros <
[email protected]> wrote:

> Hi Bryan,
>
> Thanks for the insight. I'm still struggling with keep alive I guess... I
> did check the manual and I missed the last sentence: "Setting "option
> http-server-close" may display larger request times since "Tq" also
> measures the time spent waiting for additional requests."
>
> I have two questions about this then:
>
> 1. If using client keep alive "artificially" increases Tq for a given
> request, then that metric becomes somewhat useless... I'm now considering if
> I should actually just ditch keep alive completely... Is there any way that
> the request gets logged only with its proper Tq, instead of this
>

I prefer to have the "funny" times and get better performance for the
client than accurate times for an actual performance hit.




> additional time waiting for more requests to come in? I'm guessing that
> HAProxy nows exactly what time a particular request took to arrive and it
> could just log that?
>


It really does log the time it takes the request to come in. The time
reported in Tq is the time from the end of the last response to the receipt
of the next request. In the keep-alive case, it just doesn't include some
additional round trips to open the connection but does include any client
"think" time between requests. Exactly how this works with pipelining
though I don't really know but luckily not many clients (that I care about
anyway) use that feature. It would be nice to have a flag in the logs for
keep-alive requests so we don't have to assume it's keep-alive by the long
Tq time or by looking back in the log for a previous recent request from
the same IP:port.



>
> 2. Is server keep alive subject to the same behaviour? If so, this could
> be a bit more serious, since server side we would completely lose the
> capability to tell if a particular delay had just been due to this keep
> alive or some actual bottleneck on the backend.
>


Haven't tried server keep-alive yet, it's very new still, but I imagine
that the Tr time is still accurate in these cases.

-Bryan

Reply via email to