[PATCH] HTTP: implement 'connect' and 'close' phases

Maxim Dounin mdounin at mdounin.ru
Fri Nov 20 14:37:07 UTC 2015


Hello!

On Fri, Nov 20, 2015 at 12:28:29PM +0000, Carlos Eduardo Ferreira Rodrigues wrote:

> On 20-11-2015 09:45, Alessandro Ghedini wrote:
> > [...]
> > These can be useful for keeping track of TCP connections for debugging,
> > monitoring and logging purposes, and can also be used to apply custom
> > configurations (e.g. socket options).
> > [...]
> 
> How feasible would it be to have a similar phase for new requests inside 
> the same (keep-alive) connection?
> 
> For me, the interesting use case here would be marking connections with 
> IP_TOS/SO_MARK for traffic-shaping/routing purposes and being able to 
> change marks while the connection is still open depending on the 
> specific content that's being transferred for that request.

For IP_TOS, consider marking connection during an actual request 
processing.  This will also allow to do different marking based on 
a location configuration, see here for an example:

http://mdounin.ru/hg/ngx_http_ip_tos_filter_module/

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx-devel mailing list