# Configuring a Sliding Window for 5 requests per second

**URL:** <https://discuss.hangfire.io/t/configuring-a-sliding-window-for-5-requests-per-second/11390>\
**Category:** question\
**Created:** [October 28, 2025, 1:30pm UTC](https://discuss.hangfire.io/t/configuring-a-sliding-window-for-5-requests-per-second/11390 "2025-10-28T13:30:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arcanic](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@Arcanic](https://discuss.hangfire.io/u/Arcanic)\
**Post date:** [October 28, 2025, 1:30pm UTC](https://discuss.hangfire.io/t/configuring-a-sliding-window-for-5-requests-per-second/11390/1 "2025-10-28T13:30:31Z")

</div>

I have a Job that makes a single request to a webserver, and that webserver only allows 5 requests per second. This has lead me to the following SlidingWindowOptions:

```csharp
new SlidingWindowOptions(limit: 5, interval: TimeSpan.FromSeconds(1), buckets: 1)

```

But as your documentation states, a Sliding Window with 1 bucket is the same as a Fixed Window, and I run into the issue described: it will sometimes make 5 requests at the end of one second and 5 at the start of the next, which will fail because this is basically 10 in a second.

The behavior I want, is that for any given second, no more than 5 requests are made. I find the documentation around buckets _very_ hard to understand, so how do I configure it correctly?
