Hello Bryan,

You are right, there is not a connection pool.

We tested it, in tcp dump we see the same port being reused with http-reuse 
aggressive/always as long as the connection is alive & not being reused if 
http-resuse is removed .

Thank you very much.

Thanks & Regards
Karthik



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




On Oct 26, 2017, at Oct 26, 6:13 PM, 
[email protected]<mailto:[email protected]>
 wrote:


Yes the log indicates that. But the RTT via ping is 204 ms, with http-reuse 
always/aggressive option the connection is reused & we expect a time close to 
ping+ a small overhead time, the http-resuse always seem to have no impact on 
the  total time taken.
We are looking to get the option working.


I’d bet that it’s working but that it doesn’t do what you're assuming it does.

It’s not a connection pool that keeps connections open to a backend when there 
are no current requests. As the last paragraph and note of 
https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#http-reuse<https://urldefense.proofpoint.com/v2/url?u=https-3A__cbonte.github.io_haproxy-2Ddconv_1.7_configuration.html-23http-2Dreuse&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPN4RNM1omOmcOWQYx92QHZErVx8Tp4m6aVAvjVu3uI9lxs1R3lVPGVai2o59274&m=OskODexIm6flCarX-uWjjqQzHVENwS_GnrKm-9vZRtw&s=doiTfuOjJz8g-3PYIRpqt9swiOjmslCBXV15XZNd8tI&e=>
 says



No connection pool is involved, once a session dies, the last idle connection

it was attached to is deleted at the same time. This ensures that connections

may not last after all sessions are closed.



Note: connection reuse improves the accuracy of the "server maxconn" setting,

because almost no new connection will be established while idle connections

remain available. This is particularly true with the "always" strategy.

So, testing one connection at a time one would not expect to see any 
difference. The benefit comes when there are many concurrent requests.

One way to check if the feature is working would be to run your ‘ab’ test with 
some concurrency N and inspect the active TCP connections from local proxy to 
remote proxy. If the feature is working, I would expect to see about N 
(something less) TCP connections that are reused for multiple requests. If 
there are 1000 requests sent with concurrency 10 and 1000 different TCP 
connections used the feature isn’t working (or the connections are private).

-Bryan

Reply via email to