Nginx for instance allows you to limit the number of keep-alive requests
that a client can send on an existing connection - afterwhich the client
connection is closed.
http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_requests
Apache has something similar
http://httpd.apache.org/docs/2.4/mod/core.html#maxkeepaliverequests.
Just pointing these out so you can see that its a common feature.

I'm terminating connections with nginx, then I have a pool of upstream
connections from nginx to haproxy where I allow unlimited keep-alive
requests between nginx and haproxy per connection. The only times the
connections close is when haproxy sends an error response, because it
always closes the connection (I don't know why, just because I get a
non-2xx/3xxx response it doesn't mean that connection in whole is bad). If
I had haproxy terminating the connections directly then I would like a
graceful way to bring those conversations to an end, even if its just
waiting for the existing connections to time out or max out the number of
requests.





On Tue, Jun 7, 2016 at 3:45 PM, Lukas Tribus <lu...@gmx.net> wrote:

> Am 07.06.2016 um 21:32 schrieb Manas Gupta:
>
>> Hi Lukas,
>> My understanding was that soft-stop will cater to new connections.
>>
>
> That would mean soft stopping doesn't have any effect at all, basically.
>
> No, that's not the case, but either way your hardware load balancer
> would've already stopped sending you new connections, isn't that correct?
>
>
>
> I am looking for a way to gracefully close current/established
>> keep-alive connections after a certain number of sessions have been
>> served by issuing a FIN or HTTP Header Connection:close
>>
>
> You mean after a certain number of *requests* have been served; no, that
> is not supported and it would be a lot less reliable than the proposed
> solution.
>
>
>
> Lukas
>
>

Reply via email to