diff --git a/content/en/docs/tasks/policy-enforcement/rate-limit/index.md b/content/en/docs/tasks/policy-enforcement/rate-limit/index.md index 2a75ed066c..0484efc2f4 100644 --- a/content/en/docs/tasks/policy-enforcement/rate-limit/index.md +++ b/content/en/docs/tasks/policy-enforcement/rate-limit/index.md @@ -35,14 +35,12 @@ using both global and local rate limits. ### Global rate limit Envoy can be used to [set up global rate limits](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/other_features/global_rate_limiting) for your mesh. +Global rate limiting in Envoy uses a gRPC API for requesting quota from a rate limiting service. +A [reference implementation](https://github.com/envoyproxy/ratelimit) of the API, written in Go with a Redis +backend, is used below. -1. Global rate limiting in Envoy uses a gRPC API for requesting quota from a rate limiting service. - A [reference implementation](https://github.com/envoyproxy/ratelimit) of the API, written in Go with a Redis - backend, is used below. - - The following [configmap](https://github.com/envoyproxy/ratelimit#configuration) configures the - reference implementation to rate limit requests to the path `/productpage` at 1 req/min and all other - requests at 100 req/min. +1. Use the following configmap to [configure the reference implementation](https://github.com/envoyproxy/ratelimit#configuration) + to rate limit requests to the path `/productpage` at 1 req/min and all other requests at 100 req/min. {{< text yaml >}} apiVersion: v1 @@ -66,11 +64,11 @@ Envoy can be used to [set up global rate limits](https://www.envoyproxy.io/docs/ 1. Apply an `EnvoyFilter` to the `ingressgateway` to enable global rate limiting using Envoy's global rate limit filter. - The first patch inserts the - `envoy.filters.http.ratelimit` [global envoy filter](https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/ratelimit/v3/rate_limit.proto#envoy-v3-api-msg-extensions-filters-http-ratelimit-v3-ratelimit) filter into the `HTTP_FILTER` chain. - The `rate_limit_service` field specifies the external rate limit service, `rate_limit_cluster` in this case. + The first patch inserts the + `envoy.filters.http.ratelimit` [global envoy filter](https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/ratelimit/v3/rate_limit.proto#envoy-v3-api-msg-extensions-filters-http-ratelimit-v3-ratelimit) filter into the `HTTP_FILTER` chain. + The `rate_limit_service` field specifies the external rate limit service, `rate_limit_cluster` in this case. - The second patch defines the `rate_limit_cluster`, which provides the endpoint location of the external rate limit service. + The second patch defines the `rate_limit_cluster`, which provides the endpoint location of the external rate limit service. {{< text bash >}} $ kubectl apply -f - <}} 1. Apply another `EnvoyFilter` to the `ingressgateway` that defines the route configuration on which to rate limit. - This adds [rate limit actions](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-msg-config-route-v3-ratelimit) - for any route from a virtual host named `*.80`. + This adds [rate limit actions](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-msg-config-route-v3-ratelimit) + for any route from a virtual host named `*.80`. {{< text bash >}} $ kubectl apply -f - <