Upstash · Function
slidingWindow
Sliding Window rate limiting weighs requests from the previous window together with requests in the current window. It reduces boundary bursts but uses more storage and computation.
Last updated
Syntax
Ratelimit(redis=Redis.from_env(), limiter=SlidingWindow(max_requests=10, window=10))In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
Fixed WindowToken BucketRatelimitblock_until_readyCustom Rates