Welcome! Log In Create A New Profile

Advanced

Stream metrics at request level

Richa Gaur
December 30, 2021 06:52AM
Hello,

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.

Any help would be appreciated.

Thanks and Regards,
Richa Gaur
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Stream metrics at request level

Richa Gaur 164 December 30, 2021 06:52AM



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

Online Users

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