Files
neon/proxy/src
Conrad Ludgate 6ca41d3438 proxy: switch to leaky bucket (#8470)
## Problem

The current bucket based rate limiter is not very intuitive and has some
bad failure cases.

## Summary of changes

Switches from fixed interval buckets to leaky bucket impl. A single
bucket per endpoint,
drains over time. Drains by checking the time since the last check, and
draining tokens en-masse. Garbage collection works similar to before, it
drains a shard (1/64th of the set) every 2048 checks, and it only
removes buckets that are empty.

To be compatible with the existing config, I've faffed to make it take
the min and the max rps of each as the sustained rps and the max bucket
size which should be roughly equivalent.
2024-07-24 12:28:37 +01:00
..
2024-07-24 12:28:37 +01:00
2024-07-10 09:10:29 +01:00
2023-11-27 21:45:15 +00:00
2024-06-14 13:23:52 +02:00
2024-07-10 09:10:29 +01:00
2024-07-10 15:05:25 +01:00
2024-07-09 18:25:49 +01:00
2024-07-09 18:25:49 +01:00
2023-11-06 17:44:44 +00:00
2024-05-22 17:05:43 +00:00