Rate limit
Global rate limiting architecture overview
This filter should be configured with the type URL
type.googleapis.com/envoy.extensions.filters.network.thrift_proxy.filters.ratelimit.v3.RateLimit
.
The Thrift rate limit filter will call the rate limit service when the request’s route has one or more rate limit configurations that match the filter’s stage setting. More than one configuration can apply to a request. Each configuration results in a descriptor being sent to the rate limit service.
If the rate limit service is called, and the response for any of the descriptors is over limit, an application exception indicating an internal error is returned.
If there is an error in calling the rate limit service or it returns an error and failure_mode_deny is set to true, an application exception indicating an internal error is returned.
Statistics
The filter outputs statistics in the cluster.<route target cluster>.ratelimit. namespace.
Name |
Type |
Description |
---|---|---|
ok |
Counter |
Total under limit responses from the rate limit service. |
error |
Counter |
Total errors contacting the rate limit service. |
over_limit |
Counter |
Total over limit responses from the rate limit service. |
failure_mode_allowed |
Counter |
Total requests that were error(s) but were allowed through because of failure_mode_deny set to false. |
Dynamic Metadata
The ratelimit filter emits dynamic metadata as an opaque google.protobuf.Struct
only when the gRPC ratelimit service returns a CheckResponse with a filled dynamic_metadata field.