envoyproxy / envoyproxy/envoy

Allow multiple local rate limit configurations per route or virtual host

Open
#14,732 25 comments 0 reactions 0 assignees View on GitHub
area/ratelimit help wanted
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
428

Description

*Title*: *Allow setting multiple **local** rate limit configurations per route or virtual host*

*Description*:
It is useful to define rate limits for a few resolutions, for instance 50 requests/second and 1000 requests/minute for the same route or virtual host.

The **global** rate limiting API allows [multiple rate limit configurations](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-field-config-route-v3-virtualhost-rate-limits) per route or virtual host.

The **local** rate limiting API, however, [only allows a single local rate limits configuration](https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/network/local_ratelimit/v3/local_rate_limit.proto#envoy-v3-api-msg-extensions-filters-network-local-ratelimit-v3-localratelimit).

Using Istio 1.8.1 + Envoy 1.16.1, I am only able to effectively define one local rate limit configuration per route or virtual host. Since I need to define two local rate limit resolutions, I am going around this limitation by defining one token bucket configuration for the inbound virtual host, e.g. 50 requests/second, and another token bucket configuration for the outbound virtual host, e.g 1000 requests/second. If I needed to set up more than two local rate limit resolutions, I wouldn't be able to.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.