Reference for local and remote rate limiting policies in Agentgateway.
Agentgateway supports two rate limiting modes:
Local rate limiting (localRateLimit) — token-bucket rate limiting applied in-process. State is not shared across instances.
Remote rate limiting (remoteRateLimit) — rate limiting delegated to an external Envoy Rate Limit Service compatible gRPC server. State is shared across all gateway instances.
Both policies are configured under binds[].listeners[].routes[].policies.
Remote rate limiting delegates rate limit decisions to an external gRPC service compatible with the Envoy Rate Limit Service API. The gateway sends descriptor entries to the service, which returns allow/deny decisions.
In this configuration, user test-user calling tool echo is limited to 5 requests/minute. All users calling echo share a limit of 20 requests/minute.
The remote rate limit service must implement the Envoy Rate Limit Service gRPC API. The host value must include the port (e.g. 127.0.0.1:8081).
Local rate limit state is not shared across multiple Agentgateway instances. Use remoteRateLimit for distributed deployments where consistent rate limiting across instances is required.