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