Hello,

Thank you. Option http-pretend-keepalive did not reduce the time.

The latency is 210ms only if we inject -k in ab when tested with ssl. 

We need a feature in haproxy that can keep alive as ab when used with ssl. Can 
you please add it to your feature list.

Thanks & Regards
Karthik

-----Original Message-----
From: Willy Tarreau [mailto:[email protected]] 
Sent: Thursday, October 26, 2017 11:32 PM
To: Bryan Talbot
Cc: Rajamani, Karthikeyan (TR Technology & Ops); HAproxy Mailing Lists
Subject: Re: HAProxy1.7.9-http-reuse

Hi Bryan,

On Thu, Oct 26, 2017 at 03:51:33PM -0700, Bryan Talbot wrote:
> > 4. Local haproxy log
> > 172.31.x.x:53202 [26/Oct/2017:21:02:36.368] http_front http_back/web1 
> > 0/0/204/205/410 200 89 - - ---- 0/0/0/0/0 0/0 {} "GET / HTTP/1.0"
> 
> 
> This log line says that it took your local proxy 204 ms to connect to 
> the remote proxy and that the first response bytes from the remote 
> proxy were received by the local proxy 205 ms later for a total round 
> trip time of 410 ms (after rounding).
> 
> The only way to get the total time to be equal to the network latency 
> times would be to make the remote respond in 0 ms (or less!). If the 
> two proxies are actually 200 ms apart, I don't see how you could do much 
> better.

Not exactly in fact, what Karthikeyan is observing totally makes sense.
The first round trip is used for the SYN->SYN/ACK, the second one for
request->response. The server roughly takes 2 ms to respond if the ping
is 204ms and the total time is 410ms (410-2*204).

Regarding http-reuse, it indeed only reuses idle connections, and there are 
certain conditions for this. The first one obviously is that the response must 
be made in keep-alive so that the connection is kept open.
If "ab" is used to inject, it needs "-k" to enable keep-alive otherwise by 
default a close is requested and the connections are closed. I'm suddenly 
wondering if using "option http-pretend-keepalive" could help cheating here, I 
honnestly don't know.

Willy

Reply via email to