> ## Documentation Index
> Fetch the complete documentation index at: https://docs.limitem.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fixed Window

> Discrete windows with a hard reset.

Time is split into non-overlapping chunks of `duration` seconds. Each chunk has its own counter. When the clock crosses the boundary, the counter is gone.

```text theme={null}
duration = 60
Window 1:  0s – 59s
Window 2: 60s – 119s
```

## When to use it

Default for a reason. It's O(1), cheap, and easy to reason about.

Use it when a burst at the window edge is acceptable — caches, "100 emails per hour", anything that doesn't need perfectly even traffic.

## The catch

A client can spend the whole limit at `59s`, then spend it again at `60s`. That's 2× in two seconds.

If that matters, use [sliding window](/algorithms/sliding-window).

## Shape

<ResponseField name="allowed" type="boolean">
  `true` until `count` would exceed `limit`.
</ResponseField>

<ResponseField name="remaining" type="number">
  `limit - count`, floored at 0.
</ResponseField>

<ResponseField name="reset_time" type="number">
  Unix timestamp of the next window boundary.
</ResponseField>
