# hammer v7.4.0 - Table of Contents

> A rate-limiter with plugable backends.

## GUIDES

- [Changelog](changelog.md)
- [Hammer](readme.md)
- [Tutorial](tutorial.md)
- [Distributed Rate Limiter with ETS Backend](distributed-ets.md)
- [Upgrading to Hammer V7](upgrade-v7.md)

## Modules

- [Hammer](Hammer.md): Hammer is a rate-limiting library for Elixir.
- [Hammer.Atomic](Hammer.Atomic.md): A rate limiter implementation using Erlang's :atomics module for atomic counters.
- [Hammer.Atomic.FixWindow](Hammer.Atomic.FixWindow.md): This module implements the Fix Window algorithm.
- [Hammer.Atomic.FixWindowPerKey](Hammer.Atomic.FixWindowPerKey.md): This module implements a per-key fixed window rate-limiting algorithm using
Erlang's `:atomics` module for atomic counters.
- [Hammer.Atomic.LeakyBucket](Hammer.Atomic.LeakyBucket.md): This module implements the Leaky Bucket algorithm.
- [Hammer.Atomic.TokenBucket](Hammer.Atomic.TokenBucket.md): This module implements the Token Bucket algorithm.
The token bucket algorithm works by modeling a bucket that:
- Fills with tokens at a constant rate (the refill rate)
- Has a maximum capacity of tokens (the bucket size)
- Each request consumes one or more tokens
- If there are enough tokens, the request is allowed
- If not enough tokens, the request is denied
- [Hammer.ETS](Hammer.ETS.md): An ETS backend for Hammer.
- [Hammer.ETS.FixWindow](Hammer.ETS.FixWindow.md): This module implements the Fix Window algorithm.
- [Hammer.ETS.FixWindowPerKey](Hammer.ETS.FixWindowPerKey.md): This module implements a per-key fixed window rate-limiting algorithm.
- [Hammer.ETS.LeakyBucket](Hammer.ETS.LeakyBucket.md): This module implements the Leaky Bucket algorithm.
- [Hammer.ETS.SlidingWindow](Hammer.ETS.SlidingWindow.md): This module implements the Rate Limiting Sliding Window algorithm.
- [Hammer.ETS.TokenBucket](Hammer.ETS.TokenBucket.md): This module implements the Token Bucket algorithm.
The token bucket algorithm works by modeling a bucket that:
- Fills with tokens at a constant rate (the refill rate)
- Has a maximum capacity of tokens (the bucket size)
- Each request consumes one or more tokens
- If there are enough tokens, the request is allowed
- If not enough tokens, the request is denied

