Skip to main content

Rate Limiters

Rate Limiters cap how many requests a given key — a device, an IP, an API key, or nothing at all — can make within a time window, throttling abusive traffic before it becomes a bigger problem.

Syntax

The basic format is {requests}/{duration}:

ExampleMeaning
100/1s100 requests per second
100/5m100 requests per 5 minutes
100/1h100 requests per hour
100/1d100 requests per day
100/1w100 requests per week

Modifiers

Add optional parameters in parentheses, combined with &:

ModifierPurposeExample
alertTrigger a notification when the limit is exceeded100/1h(alert) or 100/1h(alert=custom_message)
keyOverride the default key type100/1h(key=ip)
codeCustom error code on the 429 response100/1h(code=TOO_MANY_REQUESTS)
logDisable logging when this limit triggers100/1h(log=false)
headersDisable X-Ratelimit-* response headers100/1h(headers=false)
100/1h(key=ip&alert=Too many requests&code=429_TOO_MANY)

Key types

  • Ephemeral Device Key (EDK) — the default. Short-lived, non-persistent, privacy-preserving.
  • IP address — hashed with SHA-256 under a random salt before storage, kept only temporarily and solely for rate-limiting.
  • API key — limits scoped to a specific API credential.
  • None — a single global limiter shared by everyone, with no per-entity distinction.

Configuring in a Security Group

Set the rateLimit field with a set rule:

{
  "name": "Rate Limiter",
  "action": "set",
  "conditions": [],
  "set": [{ "field": "rateLimit", "value": "100/1h" }]
}

See Security Groups for the full rule schema.

Autopilot

With Autopilot enabled, a default rate limiter (50 requests/10 minutes per EDK) is applied to all incoming requests automatically. A custom rateLimit rule overrides this default.

Flood protection

Independent of Security Group rules, Sentinel also runs an early-stage flood limiter — evaluated before any database query — on public/unauthenticated endpoints. Configure it with FLOOD_RATE_LIMIT (default 100/1m); set it empty to disable, which is useful when benchmarking.

Start typing to search...

Navigate Select