.NET Architecture & System Design Interview Question #138

What is the Fixed Window rate-limiting algorithm?

Resilience, Rate Limiting, Health Checks & Observability Senior Advanced

Quick Interview Answer

Fixed Window divides time into intervals and allows a configured number of requests in each interval. It is simple to understand and implement.

Detailed Explanation

Fixed Window divides time into intervals and allows a configured number of requests in each interval. It is simple to understand and implement.

A weakness is boundary bursting: a client can send requests near the end of one window and again at the beginning of the next, producing a short burst larger than the nominal rate.

Code Example

Window: 12:00:00 - 12:00:59
Limit: 100

100 near 12:00:59
+ 100 near 12:01:00
= boundary burst