# Is it possible to block IPs if they send to many requests?

**URL:** <https://community.fly.io/t/is-it-possible-to-block-ips-if-they-send-to-many-requests/11576>\
**Category:** Questions / Help\
**Tags:** login-only\
**Created:** [March 19, 2023, 8:26am UTC](https://community.fly.io/t/is-it-possible-to-block-ips-if-they-send-to-many-requests/11576 "2023-03-19T08:26:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheDev](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@TheDev](https://community.fly.io/u/TheDev)\
**Post date:** [March 19, 2023, 8:26am UTC](https://community.fly.io/t/is-it-possible-to-block-ips-if-they-send-to-many-requests/11576/1 "2023-03-19T08:26:43Z")

</div>

I am building an app with a part that is publicly available, that means i have a route where requests can be send from a public visitor.

My concern is now, if it is possible to create a limitation for how many requests can be send in a specific time to prevent that the service gets unavailable because someone or a bot sent to many requests.

Is it possible to achieve this with [fly.io](http://fly.io)?

Thanks!

---

<div class="post-metadata">

**Author:** ![jsierles](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jsierles/32/595_2.png) [@jsierles](https://community.fly.io/u/jsierles)\
**Post date:** [March 19, 2023, 8:38am UTC](https://community.fly.io/t/is-it-possible-to-block-ips-if-they-send-to-many-requests/11576/2 "2023-03-19T08:38:24Z")

</div>

Hey - [Fly.io](http://Fly.io) doesn’t have rate limiting built in, but many frameworks and runtimes offer tooling that can do this. What does your stack/app look like?

---

<div class="post-metadata">

**Author:** ![ignoramous](https://avatars.discourse-cdn.com/v4/letter/i/a9adbd/32.png) [@ignoramous](https://community.fly.io/u/ignoramous)\
**Post date:** [March 19, 2023, 6:01pm UTC](https://community.fly.io/t/is-it-possible-to-block-ips-if-they-send-to-many-requests/11576/4 "2023-03-19T18:01:17Z")

</div>

> [@TheDev](#):
>
> Is it possible to achieve this with [fly.io](http://fly.io)?

An out of box rate-limiter at [Fly’s proxy layer would be nice](https://community.fly.io/t/fly-nodejs-contractor-help/5011/2), but isn’t yet available.

Cloudflare’s [rate-limiter is free to use](https://blog.cloudflare.com/unmetered-ratelimiting/) if the additional latency is worth it for you; or [check if setting up `tc` works now](https://community.fly.io/t/udp-services-working-on-0-0-0-0-rate-limiting/11311).

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [March 26, 2023, 6:01pm UTC](https://community.fly.io/t/is-it-possible-to-block-ips-if-they-send-to-many-requests/11576/5 "2023-03-26T18:01:35Z")

</div>

Closed on March 26, 2023, 6:01pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
