r/redis • u/West-Water-2513 • 4h ago
Help built a rate limiter as an API so I don't have to keep rewriting the same logic in every project
kept running into the same problem every service needs rate limiting, every language needs its own implementation, and I was sick of it. so I made it a REST API instead, backed by redis. you just POST to /v1/check with some identifier and it tells you allowed or not. doesn't matter what your backend is in.
threw in a few algorithms (token bucket, sliding window, etc) because I couldn't decide which one was "right" so there's also an auto mode that just picks for you.
it's on docker compose if you want to run it locally, there's a live demo too but idk how long I'll keep that server up
repo's here if anyone wants to poke holes in it: https://github.com/Ansita20/rate-limitter
demo: throtlle-ratelimiter.com
no idea if this is actually useful or if everyone already uses something better for this, first time putting something on here so go easy on me lol
