Rate limiting: question on close-wait-window and is it configurable?

I’m running the rate limiting example using bookinfo.

With rate limiting set to 100 per 1s, the 90 rps input (evenly distributed within each second) is throttled to about 70 rps.

In comparison, with rate limiting set to 1000 per 10s, there is no reject/throttling with 90 rps input.

The behavior is consistent using either memquota or redisquota with ROLLING_WINDOW.

Any suggestion about possible reason?

Looking at the code, there is an option in quota prefetching: close_wait_window. It’s set to 500 ms by default. My understanding is that proxy has to wait for close_wait_window before attempt another quota request, if the request amount is not fully honored in the previous request. Is that the right understanding?

I think 500 ms waiting period is too long for 1 second valid period.
Is this option configurable?

At first look this looked like https://github.com/istio/istio/issues/3028.

But I see your point of making close_wait_window configurable… Can you open an issue for that?

Thanks! A feature request is opened: https://github.com/istio/istio/issues/15347