Hacker News new | past | comments | ask | show | jobs | submit login

Keeping users from making an insane amount of requests to your site/api per some unit of time.



It looks more like it's for limiting your own outbound API calls, or resources usage, etc.


Hi, author here. That was exactly my motivation for writing it. There's all sort of middleware and plugins out there for throttling from the server side, but I found nothing that would let me control my own outbound API calls to a an external service in Clojure. I also wanted support for burstiness, and that was even harder to find.

I bet you could come up with other uses for it though. Someone told me over email they're planning on using it in traffic simulation for a game, for instance.


Not a clojure guy, but this throttler seems to be for single machine (Throttling not shared between servers).

API Rate limiters should share global state using redis or something.

So perhaps, this is more for throttling functions


For what it's worth, here's what I use for redis rate limiting: https://gist.github.com/anonymous/4dcb6892346ff17709fe It's in Python, but the bulk of it is a redis Lua script.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: