Welcome! Log In Create A New Profile

Advanced

Nginx not honoring keepalive / multiple requests to http backend over single TCP session

Posted by Jonathan Geyser 
Hi guys,

I'm attempting to have multiple requests to a backend reuse the same TCP
session as to avoid handshaking for each subsequent request. Nginx appears
to send FIN ACK to the backend after every request.

Am I doing something wrong?

Here is the current configuration: https://paste.ngx.cc/6c24411681f24790


Thanks in advance,
Jonathan
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
The FIN ACK suggests that the other side is responsible for closing the
connection. If nginx was terminating the connection, there would be no ACK
bit set. Check your upstream server supports keepalive.

On Tue, Jan 10, 2017 at 10:55 PM, Jonathan Geyser <[email protected]>
wrote:

> Hi guys,
>
> I'm attempting to have multiple requests to a backend reuse the same TCP
> session as to avoid handshaking for each subsequent request. Nginx appears
> to send FIN ACK to the backend after every request.
>
> Am I doing something wrong?
>
> Here is the current configuration: https://paste.ngx.cc/6c24411681f24790
>
>
> Thanks in advance,
> Jonathan
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Richard,

On further investigation -- it looks like the client was closing the
front-end connection. I need the back-end socket to remain open regardless
of what the front-end is doing. Is there a way to accomplish this?

Thanks in advance,
Jonathan

On Tue, Jan 10, 2017 at 2:26 PM, Richard Stanway <[email protected]>
wrote:

> The FIN ACK suggests that the other side is responsible for closing the
> connection. If nginx was terminating the connection, there would be no ACK
> bit set. Check your upstream server supports keepalive.
>
> On Tue, Jan 10, 2017 at 10:55 PM, Jonathan Geyser <[email protected]>
> wrote:
>
>> Hi guys,
>>
>> I'm attempting to have multiple requests to a backend reuse the same TCP
>> session as to avoid handshaking for each subsequent request. Nginx appears
>> to send FIN ACK to the backend after every request.
>>
>> Am I doing something wrong?
>>
>> Here is the current configuration: https://paste.ngx.cc/6c24411681f24790
>>
>>
>> Thanks in advance,
>> Jonathan
>>
>> _______________________________________________
>> nginx mailing list
>> nginx@nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx
>>
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
I believe you want proxy_ignore_client_abort on to achieve that.

On 12/01/2017 19:23, Jonathan Geyser wrote:
> Richard,
>
> On further investigation -- it looks like the client was closing the
> front-end connection. I need the back-end socket to remain open
> regardless of what the front-end is doing. Is there a way to
> accomplish this?
>
> Thanks in advance,
> Jonathan
>
> On Tue, Jan 10, 2017 at 2:26 PM, Richard Stanway
> <[email protected] <mailto:[email protected]>> wrote:
>
> The FIN ACK suggests that the other side is responsible for
> closing the connection. If nginx was terminating the connection,
> there would be no ACK bit set. Check your upstream server supports
> keepalive.
>
> On Tue, Jan 10, 2017 at 10:55 PM, Jonathan Geyser
> <[email protected] <mailto:[email protected]>> wrote:
>
> Hi guys,
>
> I'm attempting to have multiple requests to a backend reuse
> the same TCP session as to avoid handshaking for each
> subsequent request. Nginx appears to send FIN ACK to the
> backend after every request.
>
> Am I doing something wrong?
>
> Here is the current configuration:
> https://paste.ngx.cc/6c24411681f24790
> https://paste.ngx.cc/6c24411681f24790
>
>
> Thanks in advance,
> Jonathan
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org <mailto:[email protected]>
> http://mailman.nginx.org/mailman/listinfo/nginx
> http://mailman.nginx.org/mailman/listinfo/nginx
>
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org <mailto:[email protected]>
> http://mailman.nginx.org/mailman/listinfo/nginx
> http://mailman.nginx.org/mailman/listinfo/nginx
>
>
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Sorry, only registered users may post in this forum.

Click here to login