Welcome! Log In Create A New Profile

Advanced

Re: Tracking sent responses

Sergey Brester
November 10, 2015 02:30PM
Hi,

I'm sure you can do that using on-board "equipment" of nginx, without
deep integrating to the nginx (without write of own module).

You can use for this a "post_action", something like:

post_action @after_request_location;

But (There is always a "but":), according to my last known stand:

- the feature "post_action" is asynchronously;
- the feature is not documentated (and possibly not recommended to
use);- if location "executed" in post_action uses upstreams (fcgi,
proxy_pass, etc.), it will always breaks a keepalive connection to the
upstream channel (possibly fixed, but I've missed).

Regards,
sebres.

Am 10.11.2015 19:51, schrieb Julien FROMENT:

> Hello,
>
> We would like to use Nginx to keep track of exactly what part of an upstream's server response was sent over a socket. Nginx could call an API asynchronously with the number of bytes sent over the socket for a given request.
>
> Here is the pseudo code:
>
> -- Client send a request
>
> -- Nginx processes the request and send it to the upstream
>
> ...
>
> -- The upstream returns the response
>
> -- Nginx sends the response to the client
>
> -- Nginx calls Async API with the number of bytes sent
>
> I read a little bit of "Emiller's Guide To Nginx Module Development", and I think we could write a Handler that provide some tracking information. But I am unsure if it is possible to hook it at a low enough level for our needs.
>
> Are there any expert on this mailing list that could provide us consulting services and guide us through the development of such functionality?
>
> Thanks in advance!
>
> Julien
>
> #
> " Ce courriel et les documents qui lui sont joints peuvent contenir des
> informations confidentielles ou ayant un caractè privÃ(c)S'ils ne vous sont
> pas destinÃ(c) nous vous signalons qu'il est strictement interdit de les
> divulguer, de les reproduire ou d'en utiliser de quelque maniè que ce
> soit le contenu. Si ce message vous a Ã(c) transmis par erreur, merci d'en
> informer l'expÃ(c)teur et de supprimer immÃ(c)atement de votre systè
> informatique ce courriel ainsi que tous les documents qui y sont attachÃ(c)"
>
> ******
>
> " This e-mail and any attached documents may contain confidential or
> proprietary information. If you are not the intended recipient, you are
> notified that any dissemination, copying of this e-mail and any attachments
> thereto or use of their contents by any means whatsoever is strictly
> prohibited. If you have received this e-mail in error, please advise the
> sender immediately and delete this e-mail and all attached documents
> from your computer system."
> #
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel [1]


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

Tracking sent responses

Julien FROMENT 488 November 10, 2015 01:52PM

Re: Tracking sent responses

Sergey Brester 206 November 10, 2015 02:30PM

RE: Tracking sent responses

Julien FROMENT 224 November 11, 2015 01:18PM

Re: Tracking sent responses

Valentin V. Bartenev 242 November 12, 2015 02:30PM



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

Online Users

Guests: 124
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