---
title: "Comment by Matt C on \"Rate Limiting Supabase Requests with PostgreSQL and pg_headerkit\" | Hashnode"
description: "I'm curious- you say it isn't a great idea to rate limit GET requests using this strategy - but then what's to stop someone ddos-ing you (making many repeated r"
url: "https://hashnode.com/posts/rate-limiting-supabase-requests-with-postgresql-and-pgheaderkit/64f717aafee4891c8d66ce22/comment/674792bcc7ecd3e901153d23"
---

[Discussion](https://hashnode.com/posts/rate-limiting-supabase-requests-with-postgresql-and-pgheaderkit/64f717aafee4891c8d66ce22)

Comment [Rate Limiting Supabase Requests with PostgreSQL and pg\_headerkit](https://hashnode.com/posts/rate-limiting-supabase-requests-with-postgresql-and-pgheaderkit/64f717aafee4891c8d66ce22)

[Matt C](https://hashnode.com/@matt405)

[Nov 27, 2024](https://hashnode.com/posts/rate-limiting-supabase-requests-with-postgresql-and-pgheaderkit/64f717aafee4891c8d66ce22/comment/674792bcc7ecd3e901153d23)

I'm curious- you say it isn't a great idea to rate limit GET requests using this strategy - but then what's to stop someone ddos-ing you (making many repeated requests to the db) simply by selected data frequently?

[Matt C](https://hashnode.com/@matt405)

[Nov 28, 2024](https://hashnode.com/posts/rate-limiting-supabase-requests-with-postgresql-and-pgheaderkit/64f717aafee4891c8d66ce22/comment/674792bcc7ecd3e901153d23#reply-67483e1117d01afc9cbd0949)

Oh, and thank you for your excellent article! Hoping this can be used to protect my prod DB from abuse

[Rodrigo Mansueli](https://hashnode.com/@mansueli)

[Nov 28, 2024](https://hashnode.com/posts/rate-limiting-supabase-requests-with-postgresql-and-pgheaderkit/64f717aafee4891c8d66ce22/comment/674792bcc7ecd3e901153d23#reply-67484af90f39ce959d1c56c4)

Thanks [Matt C](https://hashnode.com/@matt405). Supabase (hosted) uses DDoS protection from Cloudflare on the API Gateway, so you'll have some protection for it.

You can still do it, but the extra latency for read calls might be an overkill and hurt your performance more than an acceptable limit IMHO.

[Matt C](https://hashnode.com/@matt405)

[Nov 28, 2024](https://hashnode.com/posts/rate-limiting-supabase-requests-with-postgresql-and-pgheaderkit/64f717aafee4891c8d66ce22/comment/674792bcc7ecd3e901153d23#reply-6748af6e6459b97f3326d207)

[Rodrigo Mansueli](https://hashnode.com/@mansueli) thanks I appreciate your reply. I've instead set up insert/update rate limiting as above and an IP deny list which is checked during the pre-request. I've got some simple logs to monitor request methods per IP and might try and implement some kind of alerting so I can then add those IPs to the denylist if needed. Would be nice it was possible to trigger this via the logging mechanisms automatically
