Re: Reuse backend connections

2018-06-29 Thread Leela Kalidindi (lkalidin)
Bryan,

One another follow-up question - what does persist do?  Thanks!

-Leela


From: Bryan Talbot 
Date: Friday, June 29, 2018 at 12:40 PM
To: "Leela Kalidindi (lkalidin)" 
Cc: HAproxy Mailing Lists 
Subject: Re: Reuse backend connections




On Jun 29, 2018, at Jun 29, 12:38 PM, Leela Kalidindi (lkalidin) 
mailto:lkali...@cisco.com>> wrote:

Hi Bryan,

Thanks a lot for the prompt response.

Is there a such kind of thing to leave the backend connections open forever 
that can serve any client request?



No, not to my knowledge.

-Bryan



Re: Reuse backend connections

2018-06-29 Thread Leela Kalidindi (lkalidin)
Hi Bryan,

Thanks a lot for the prompt response.

Is there a such kind of thing to leave the backend connections open forever 
that can serve any client request?

-Leela



From: Bryan Talbot 
Date: Friday, June 29, 2018 at 12:30 PM
To: "Leela Kalidindi (lkalidin)" 
Cc: HAproxy Mailing Lists 
Subject: Re: Reuse backend connections




On Jun 29, 2018, at Jun 29, 5:11 AM, Leela Kalidindi (lkalidin) 
mailto:lkali...@cisco.com>> wrote:

Hi,

How can I enforce haproxy to reuse limited backend connections regardless of 
number of client connections? Basically I do not want to recreate backend 
connection for every front end client.

"HAPROXY_0_BACKEND_HEAD": "\nbackend {backend}\n balance {balance}\n mode 
http\n option httplog\n  option forwardfor\n option http-keep-alive\n option 
persist\n http-reuse aggressive\n maxconn 16\n",
"HAPROXY_0_FRONTEND_HEAD": "\nfrontend {backend}\n  bind 
{bindAddr}:{servicePort}\n  mode http\n  option httplog\n  option forwardfor\n 
option http-keep-alive\n maxconn 16\n"

I currently have the above configuration, but still backend connections are 
getting closed when the next client request comes in.

Could someone help me with the issue?  Thanks in advance!



I suspect that there is a misunderstanding of what backend connection re-use 
means. Specifically this portion from the documentation seems to trip people up:




https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#http-reuse

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.

I suspect that in your testing, you send one request, observe TCP state, then 
send a second request and expect the second request to use the same TCP 
connection. This is not how the feature works. The feature is optimized to 
support busy / loaded servers where the TCP open rate should be minimized. This 
allows a server to avoid, say opening 2,000 new connections per second, and 
instead just keep re-using a handful. It’s not a connection pool that pre-opens 
10 connections and keeps them around in case they might be needed.

-Bryan



Re: Reuse backend connections

2018-06-29 Thread Leela Kalidindi (lkalidin)
Not for Remote desktop protocol, it is for haproxy backend server with option 
persist as in
"HAPROXY_0_BACKEND_HEAD": "\nbackend {backend}\n balance {balance}\n mode 
http\n option httplog\n  option forwardfor\n option http-keep-alive\n option 
persist\n http-reuse aggressive\n maxconn 16\n",


Thanks!



From: Bryan Talbot 
Date: Friday, June 29, 2018 at 12:47 PM
To: "Leela Kalidindi (lkalidin)" 
Cc: HAproxy Mailing Lists 
Subject: Re: Reuse backend connections




On Jun 29, 2018, at Jun 29, 12:42 PM, Leela Kalidindi (lkalidin) 
mailto:lkali...@cisco.com>> wrote:

Bryan,

One another follow-up question - what does persist do?  Thanks!



https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#persist

is for

https://en.wikipedia.org/wiki/Remote_Desktop_Protocol

Is that what you were asking?

-Bryan



reuse backend connections

2018-06-28 Thread Leela Kalidindi (lkalidin)
Hi,

How can I enforce haproxy to reuse limited backend connections regardless of 
number of client connections? Basically I do not want to recreate backend 
connection for every front end client.

"HAPROXY_0_BACKEND_HEAD": "\nbackend {backend}\n balance {balance}\n mode 
http\n option httplog\n  option forwardfor\n option http-keep-alive\n option 
persist\n http-reuse aggressive\n maxconn 16\n",
"HAPROXY_0_FRONTEND_HEAD": "\nfrontend {backend}\n  bind 
{bindAddr}:{servicePort}\n  mode http\n  option httplog\n  option forwardfor\n 
option http-keep-alive\n maxconn 16\n"

I currently configured the above options, but still backend connections are 
closed after the original client requests is processed.

Please kindly treat this as urgent.  Thanks in advance!


-Leela



Reuse backend connections

2018-06-29 Thread Leela Kalidindi (lkalidin)
Hi,

How can I enforce haproxy to reuse limited backend connections regardless of 
number of client connections? Basically I do not want to recreate backend 
connection for every front end client.

"HAPROXY_0_BACKEND_HEAD": "\nbackend {backend}\n balance {balance}\n mode 
http\n option httplog\n  option forwardfor\n option http-keep-alive\n option 
persist\n http-reuse aggressive\n maxconn 16\n",
"HAPROXY_0_FRONTEND_HEAD": "\nfrontend {backend}\n  bind 
{bindAddr}:{servicePort}\n  mode http\n  option httplog\n  option forwardfor\n 
option http-keep-alive\n maxconn 16\n"

I currently have the above configuration, but still backend connections are 
getting closed when the next client request comes in.

Could someone help me with the issue?  Thanks in advance!


-Leela