Zentik Logo
Introduction

Rate Limiting

Backend rate limiting policies and configuration

The backend enforces rate limits to protect against abuse. Limits are applied per authenticated user or per IP address for unauthenticated requests.

Global limits

SettingDefaultEnv variable
Time window60 secondsRATE_LIMIT_TTL_MS
Max requests per window100RATE_LIMIT_LIMIT
Block duration after exceeding10 secondsRATE_LIMIT_BLOCK_MS

Message-specific limits

SettingDefaultEnv variable
Time window1 secondRATE_LIMIT_MESSAGES_TTL_MS
Max messages per window10RATE_LIMIT_MESSAGES_RPS

Behavior

When a rate limit is exceeded, the API returns HTTP 429 Too Many Requests. After the block duration, requests are accepted again.

Rate limits track by user:{userId} for authenticated requests and ip:{address} for unauthenticated ones. Proxy support can be enabled via RATE_LIMIT_TRUST_PROXY and configured with RATE_LIMIT_FORWARD_HEADER (default: x-forwarded-for).