Documentation Index
Fetch the complete documentation index at: https://mintlify.com/traefik/traefik/llms.txt
Use this file to discover all available pages before exploring further.
RateLimit Middleware
Control the Number of Requests Going to a Service The RateLimit middleware ensures that services will receive a fair amount of requests based on a token bucket implementation.Configuration Examples
Basic Rate Limiting
Rate Limiting with Period
Rate Limiting with IP Strategy
Configuration Options
Rate Configuration
Maximum rate, by default in requests per second, allowed from a given source. Setting to 0 means no rate limiting.The actual rate is defined by dividing
average by period.Period in combination with
average defines the actual maximum rate. The rate is calculated as: r = average / periodMaximum number of requests allowed to go through in the same arbitrarily small period of time.
Source Criterion
Use the X-Forwarded-For header and select the IP at the specified depth (starting from the right).
List of IPs to exclude when determining the client IP.
Subnet mask for IPv6 addresses. Useful for grouping IPv6 addresses into subnets.
Name of the header used to group incoming requests.
Whether to consider the request host as the source.
Redis Storage
Enables distributed rate limiting using Redis to store tokens.
List of Redis server endpoints.
Username for Redis authentication.
Password for Redis authentication.
Database to select after connecting to Redis.
Path to certificate authority for TLS connection.
Path to public certificate for TLS connection.
Path to private key for TLS connection.
Accept any certificate presented by the server.