I am using nginx as an L4 load balancer. I need to expose some stream level metrics like throughput etc. I am using nginx-module-stream-sts https://github.com/vozlt/nginx-module-stream-sts for calculating metrics.
However, this module operates at nginx-stream-log-phase which is called just before closing the connection. In case, if the underlying connection is persistent and several requests are being made on the same connection, the metrics are calculated at the end which does not depict the true picture.
I tried looking at the stream-module code and based on preliminary observations it looks like the stream phases are called for each stream session and not for each tcp request (analogous to http request). So, even if I register the handler at an earlier phase, let's say nginx-stream-content-phase, it would be called only once in the connection lifecycle instead of being called for every request.
Please let me know if my understanding is correct and if there is any mechanism by which I can calculate metrics for each TCP request and show real time data. Basically, collect metric for each read/write event from the client.
Any help would be appreciated.
Thanks and Regards, Richa Gaur
_______________________________________________ nginx-devel mailing list -- email@example.com To unsubscribe send an email to firstname.lastname@example.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s