sysulq/nginx-vts-exporter

Feature: Return a histogram for response time

remeika opened this issue · 6 comments

This exporter should have the option to expose response times as a histogram, rather than a simple average. The dataset to support this feature is already available in the upstreamZones. requestMsecs.msecs data structure from VTS.

Proposed Interface: An optional command line flag -nginx.response.histogram_buckets is added, and takes a comma separated list of integers as an argument. When declared, two additional metrics are implemented: {NAMESPACE}_filter_responses and {NAMESPACE}_upstream_responses. They are both histograms with bucket sizes from the input flag.

Note: I am actively building feature; any comments on the interface please let me know!

Nice job! 😃

jorgv commented

Hi @remeika , do you have an update on that feature? would be nice to test it

I just realize that the average can be very misleading: When you look at the individual timeseries, things are okayish - they might just gloss over some (e.g very slow) requests.
But once you end up aggregating multiple response time averages, you end up with completely useless metrics since different upstreams have different sample frequencies.

Moreover, I don't think the proposed design works either since the VTS data structure is also just sampled, so you again miss some requests and you can't compare two upstreams.

I think the only way to properly solve this is histogram buckets in nginx, e.g each request needs to be counted into one bucket.

Any development already in place here? Also, very interested in this feature :-)

I don't think this is possible with the current state of the vts module, it would have to be implemented there.