RateLimit defines gateway-level rate limiting with configurable identifiers. Sentinel delegates rate limit state to Unkey’s distributed rate limiting service, providing consistent counts across multiple sentinel instances.Documentation Index
Fetch the complete documentation index at: https://engineering.unkey.com/llms.txt
Use this file to discover all available pages before exploring further.
RateLimit is defined in the policy schema but is not executed by the sentinel engine yet.
Fields
Maximum number of requests allowed in the time window.
Time window in milliseconds. For example,
limit: 100 with window_ms: 60000 means 100 requests per minute.Determines how requests are bucketed for rate limiting.
Examples
- Per IP
- Per authenticated subject
- Per header value
- Per principal field
- Per path
Identifier sources
| Source | Description |
|---|---|
remote_ip | Client IP address. Effective for anonymous traffic, but can over-limit behind shared NATs. |
header | Value of a named request header. Only use behind trusted proxies that set the header. |
authenticated_subject | Principal subject from an upstream auth policy. Most accurate for authenticated APIs. |
path | Request URL path. Creates a separate bucket per endpoint. |
principal_field | Value resolved from a dotted path into the Principal JSON (for example, source.key.meta.org_id for per-organization limits). |

