How should I handle rate limiting?
What is the best way to create a rate limiting system? Should I build my own system within Convex? Or should I outsource it and use a Redis database like Upstash?
Is there an ongoing default rate limiting feature development? I'm not in a hurry, I can wait. Thanks in advance!
4 Replies
Thank you 🙂 , I looked at the example you sent. I should have asked my question more clearly; I know how to do it with convex, but I want to know whether convex DB is suitable for it. For instance, I've read in many places that PostgreSQL databases are not suitable for storing and reading rate limits, and shouldn't be used for it. Redis is recommended instead. Is Convex DB technically suitable for this?
Yes, Convex is well suited for this.
I just added a helper for rate limiting in
convex-helpers@0.1.38
. More info in this new Stack post: https://stack.convex.dev/rate-limitingImplementing Rate Limiting with only two numbers
Implementing application rate limiting when you have fast access to a database with strong ACID guarantees. Token bucket and fixed window, with fairne...