Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local rate limit: add new rate_limits support to the filter #36099

Merged
merged 25 commits into from
Oct 5, 2024

fix format

e9893ed
Select commit
Loading
Failed to load commit list.
Merged

local rate limit: add new rate_limits support to the filter #36099

fix format
e9893ed
Select commit
Loading
Failed to load commit list.
CI (Envoy) / Mobile/Coverage skipped Oct 5, 2024 in 0s

Check was skipped

This check was not triggered in this CI run

Details

Request (pr/36099/main@e9893ed)

wbpcode @wbpcode e9893ed #36099 merge main@9244dc9

local rate limit: add new rate_limits support to the filter

Commit Message: local rate limit: add new rate_limits api to the filter's api
Additional Description:

In the previous local rate limit, the rate_limits field of route is used to generate the descriptor entries. Then the generated entries will be used to match a token bucket which is configured in the filter configs (route level, vhost level, etc).

However, it make the configuration very complex, and cannot cover some common scenarios easily. For example, give a specific virtual host X and a special route Y that under this virtual host X.

We want to provides a virtual host level rate limit for the specific virtual host X, and a route level rate limit for the specific route Y. We hope the configuration of virtual host could works for all routes except the Y.

For most filters, this requirement could be achieved by getting the most specific filter config and applying it. But for the local rate limit, thing become very complex. Because the rate limit configuration is split into rate_limits field of route and the filter config. The local rate limit need to handle these relationship carefully.

This PR try to simplify it.

Risk Level: low.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.

Environment

Request variables

Key Value
ref 109949c
sha e9893ed
pr 36099
base-sha 9244dc9
actor wbpcode @wbpcode
message local rate limit: add new rate_limits support to the filter...
started 1728105482.200271
target-branch main
trusted false
Build image

Container image/s (as used in this CI run)

Key Value
default envoyproxy/envoy-build-ubuntu:f94a38f62220a2b017878b790b6ea98a0f6c5f9c
mobile envoyproxy/envoy-build-ubuntu:mobile-f94a38f62220a2b017878b790b6ea98a0f6c5f9c
Version

Envoy version (as used in this CI run)

Key Value
major 1
minor 32
patch 0
dev true