Welcome! Log In Create A New Profile

Advanced

Alternative to propagate_connection_close

Shawn J. Goff
March 03, 2015 04:30PM
I wrote the propagate_connection_close patch previously and Maxim had
concerns that there is no way to close the downstream connection without
also closing the upstream connection, which isn't ideal. I'll have time
to do more work on it, so I'd like to know if this suggestion is worth
implementing. If this suggestion is palatable, I'll make a more formal
definition and coordinate with HAProxy and possibly other projects.

The quick background is that a proxy server is frequently used just for
HTTPS termination, with the plaintext request being forwarded to a port
on the localhost where an upstream server is listening. With this setup,
when the upstream issues a "Connection: close", only the connection to
the local proxy is closed; this is not useful. There should be a way to
treat the proxy as part of the same service and ask it to close the
downstream connection.

I would like to introduce two new headers, Close-Before and Close-After.
The Connection header can reference either of those headers. Both
headers take a comma-delimited list of node-identifiers [1]. If the
Close-Before header is present and the next hop is a host in the
associated node-identifiers list, the Connection" header will be set to
"close", the underlying connection will be closed, and the Close-Before
header is removed. The Close-After header is similar except the
condition is when the current host is in the list.

Example:

Connection: Close-After
Close-After: 127.0.0.1

[1] node-identifiers: http://tools.ietf.org/html/rfc7239#section-6

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Alternative to propagate_connection_close

Shawn J. Goff 638 March 03, 2015 04:30PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 288
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready