stats: reduce browser and server memory/cpu bursts when viewing stats from admin
- Dominant language
- C++
- Stars
- 28.9k
- Forks
- 5.6k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 437
Description
See related issues:
* https://github.com/envoyproxy/envoy/issues/16981
* https://github.com/envoyproxy/envoy/issues/16139
There are a few different cases to consider when dealing with aggregating stats when there are a large number of clusters. I don't think there is a single solution that's ideal for all of them. But I think for for the admin endpoint we should add endpoints help view stats in a single scope. So if someone has 10k clusters they can pick which cluster to look at and then bring that one in.
Any of the solutions that involve iterating over all the stats are going to involve a burst of CPU at least on the main thread, likely while holding the stats allocator lock for a long time.
A prototype scoped access solution exists in
https://github.com/envoyproxy/envoy/pull/18670
Contributor guide
Assessment
This issue has not been assessed yet.