Documentation ¶
Overview ¶
Package ratelimit provides filters to control the rate limitter settings on the route level.
For detailed documentation of the ratelimit, see https://godoc.org/github.com/zalando/skipper/ratelimit.
Index ¶
Constants ¶
const RouteSettingsKey = "#ratelimitsettings"
RouteSettingsKey is used as key in the context state bag
Variables ¶
This section is empty.
Functions ¶
func NewDisableRatelimit ¶
NewDisableRatelimit disables rate limiting
Example:
backendHealthcheck: Path("/healthcheck") -> disableRatelimit() -> "https://foo.backend.net";
func NewLocalRatelimit ¶
NewLocalRatelimit creates a local measured rate limiting, that is only aware of itself. If you have 5 instances with 20 req/s, then it would allow 100 req/s to the backend from the same user. A third argument can be used to set which part of the request should be used to find the same user. Third argument defaults to XForwardedForLookuper, meaning X-Forwarded-For Header.
Example:
backendHealthcheck: Path("/healthcheck") -> localRatelimit(20, "1m") -> "https://foo.backend.net";
Example rate limit per Authorization Header:
login: Path("/login") -> localRatelimit(3, "1m", "auth") -> "https://login.backend.net";
func NewRatelimit ¶ added in v0.9.115
NewRatelimit creates a service rate limiting, that is only aware of itself. If you have 5 instances with 20 req/s, then it would at max allow 100 req/s to the backend.
Example:
backendHealthcheck: Path("/healthcheck") -> ratelimit(20, "1s") -> "https://foo.backend.net";
Types ¶
This section is empty.