Performance¶
The performance of each rate-limiting strategy and storage backend differs in both throughput and storage cost characteristics.
Performance by storage and strategy¶
Below you will find benchmarks for each strategy and storage giving a high level overview of the performance.
Benchmark parameters
100 unique virtual users (i.e. unique rate limit keys)
A rate limit of
500/minuteEach virtual user’s limit was pre-seeded to be 50% full.
See Benchmark run details for information on the benchmarking environment.
Performance of hit()
by storage & strategy.
Performance of test()
by storage & strategy.
Performance of get_window_stats()
by storage & strategy.
Performance implication of limit sizes¶
Though for Fixed Window and Sliding Window Counter both the storage cost and performance of operations remains constant when the limit window and size varies, this is not true for Moving Window which maintains a complete log of successful requests within the window.
The following benchmarks demonstrate the implications when using various limits.
Benchmark parameters
100 unique virtual users
Rate limits of
500/minute10000/day100000/day
Each virtual user’s limit was pre-seeded to be:
5% full.
50% full.
90% full.
See Benchmark run details for information on the benchmarking environment.
Performance of hit()
with various rate limits
Performance of test()
with various rate limits
Performance of get_window_stats()
with various rate limits