Open u5surf opened 1 year ago
There are other histogram implementations/structures that seems worth considering:
@sboisson Thanks advice so much. I consider that HdrHistogram is more understandability about its algorithm. But we guess it is suitable the pseudo-quantile algorithm which is called by e-approximate p-Quantile (e.g. ddsketch, CKMS, etc...) if we're willing to save more space of the memory. At least, GK seems to be less accuracy than other pseudo-quantile algorithms.
CKMS: https://grafana.com/blog/2022/03/01/how-summary-metrics-work-in-prometheus/
If you are using Prometheus, you can calculate quantiles by implementing Prometheus' Native Histogram (OpenTelemetry's Exponential Histogram). In addition to the advantage of compressing the amount of data, there are almost no settings for the user.
Agreed, you definitely want to use something like Prometheus native histograms. Directly exposing quantiles like the older Prometheus "Summary" metrics is not useful as the data can't be aggregated over multiple instances.
It should be important for the module users to fetch the response time quantile for various use cases. I consider that it is suitable for using
libgkc
which is the library within the high performance http serverh2o
https://github.com/h2o/h2o/tree/master/deps/libgkcAccording this code, it follows the algorithm which is written in this paper. Thus it is efficiency spatial complexity for that calculate. https://www.cis.upenn.edu/~sanjeev/papers/sigmod01_quantiles.pdf