elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
836 stars 24.8k forks source link

Track distribution of REST response sizes #84887

Open DaveCTurner opened 2 years ago

DaveCTurner commented 2 years ago

Description

It would sometimes be useful to know whether a cluster is returning humongous REST responses when diagnosing performance issues. We could do this by tracking the distribution of REST response sizes in the HTTP stats of each node. A simple fixed-bucket powers-of-two histogram would be a powerful addition.

Relates #77466

elasticmachine commented 2 years ago

Pinging @elastic/es-core-infra (Team:Core/Infra)

stu-elastic commented 2 years ago

In scripting we found it useful to provide a counter with a sliding window for scripting compilation rate limits so users could see events in a 5m/15m/24h time frame. A strictly increasing counter requires the user to do the snapshotting themselves, the code for implementing that is in TimeSeriesCounter. Perhaps that could be combined with a histogram to provide better introspection for these cases.