Hammer: a rate-limiter with pluggable backends

Hi all :slight_smile:

I made a rate-limiter with a pluggable backend system, so you can choose where the rate-limiting counters are persisted to. I felt the need to do this because the most popular rate-limiter (ExRated) only persists to ETS, which isn’t so useful in bigger deployments with load-balancing, etc.

The main package is https://github.com/ExHammer/hammer, which includes an ETS backend. There is also a Redis backend: https://github.com/ExHammer/hammer-backend-redis.

I’ve also put together a demo Phoenix app.

The best place to jump in is probably the Tutorial

Any and all feedback would be greatly appreciated!


We’ve released Hammer version 2.0.0, with a drastically improved API, making it easier to add Hammer to your projects:

We are also working on new storage backends, including a backend for Ecto.