Welcome! Log In Create A New Profile

Advanced

Log request at request time, not after response

June 25, 2019 11:58AM
Hi All,

I am trying to understand if it's possible to extend nginx functionality to support what I am looking for.

Problem:

We are trying to look for poison pill in-flight requests that would affect backend cluster stability. We currently cannot do much for the first request, but the idea is to block subsequent requests from the same user.

Ideally we would have solved it at the app layer, but seems like there's a lot of work involved with that solution. So we are trying to solve it at the nginx level.

But looks like nginx can only do logging after a response is received from the backend server. Is it possible to modify this behavior to log at request time without waiting for a response. IMHO this is a reasonable thing to do.

I am open to alternative approaches to solve this problem. I would also like to know if there are any available modules/plugins that could be easily tweaked to emit the request log.

If this was intended by design for nginx, it would be nice to understand what the reasoning behind such a decision was.

Thank you very much for your time.
Appreciate all the help I can get.

Regards,
Vinayak Ponangi
Subject Author Posted

Log request at request time, not after response

vinayak.ponangi June 25, 2019 11:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 76
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready