# Backend server cooldown

**URL:** <https://discourse.haproxy.org/t/backend-server-cooldown/2998>\
**Category:** Help!\
**Created:** [September 14, 2018, 9:48am UTC](https://discourse.haproxy.org/t/backend-server-cooldown/2998 "2018-09-14T09:48:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![stickjam](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@stickjam](https://discourse.haproxy.org/u/stickjam)\
**Post date:** [September 14, 2018, 9:48am UTC](https://discourse.haproxy.org/t/backend-server-cooldown/2998/1 "2018-09-14T09:48:58Z")

</div>

Hello,

I was wondering if it was possible with HAProxy to allow only one connection per backend server followed by a type of ‘cooldown’ which temporarily disables that particular backend server for a period of time. Another way to describe would be only allowing one connection per X time (not per one second which maxconnrate seems to do).

If anyone could shed some light on this, that would be great!

Thanks!

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [September 14, 2018, 10:53am UTC](https://discourse.haproxy.org/t/backend-server-cooldown/2998/2 "2018-09-14T10:53:24Z")

</div>

What are you trying to achieve?

---

<div class="post-metadata">

**Author:** ![stickjam](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@stickjam](https://discourse.haproxy.org/u/stickjam)\
**Post date:** [September 14, 2018, 1:59pm UTC](https://discourse.haproxy.org/t/backend-server-cooldown/2998/3 "2018-09-14T13:59:25Z")

</div>

Effectively rate limiting the requests by server (not by user) to ensure a server can not be used more than 10 times in 60 seconds for example.

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [September 14, 2018, 6:12pm UTC](https://discourse.haproxy.org/t/backend-server-cooldown/2998/4 "2018-09-14T18:12:18Z")

</div>

Limiting the amount of currently active requests does not do the job for you? That is what the usual recommendation to avoid server overload looks like, and can be configured easily by using the `maxconn` parameter (as server option).

---

<div class="post-metadata">

**Author:** ![stickjam](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@stickjam](https://discourse.haproxy.org/u/stickjam)\
**Post date:** [September 25, 2018, 11:50am UTC](https://discourse.haproxy.org/t/backend-server-cooldown/2998/5 "2018-09-25T11:50:14Z")

</div>

Apologies for the delay. Thanks for your help so far!  
I am not trying to prevent server overload. I am trying to prevent reaching bandwidth/daily request limitations with the backend servers I am using (the reasons are not relevant).  
Is this something that HAProxy is just not the right solution for?
