envoy icon indicating copy to clipboard operation
envoy copied to clipboard

admission control filter: Fix average RPS calculation

Open tonya11en opened this issue 1 year ago • 0 comments

This patch fixes a bug in the thread-local controller's average RPS calculation. The controller was erroneously calculating the average over the time elapsed since the oldest valid sample, which is incorrect. This can result in erratic load shedding behavior for bursty request distributions.

The correct behavior is to calculate the average RPS over the full lookback window.

Risk Level: Low Testing: Unit test Docs Changes: n/a Release Notes: Documented the bugfix. Fixes #33739

tonya11en avatar May 20 '24 20:05 tonya11en