Skip to content

feat: add token bucket rate limiter pattern (Phase 4) - #7

Merged
ivan-podgurskiy merged 1 commit into
mainfrom
feat/rate-limiter
Jun 5, 2026
Merged

ivan-podgurskiy merged 1 commit into
mainfrom
feat/rate-limiter

Conversation

@ivan-podgurskiy

Copy link
Copy Markdown
Owner

Summary

  • Add Patterns.RateLimiter — token bucket rate limiting with lazy monotonic refill
  • Support global and per-key modes, variable token cost, and retry_after_ms hints
  • Include 12 tests and guides/13_rate_limiter.md; update README and CHANGELOG for Phase 4

Test plan

  • mix test test/patterns/rate_limiter_test.exs
  • mix test (full suite)
  • mix credo --strict lib/patterns/rate_limiter.ex

Introduce Patterns.RateLimiter with global and per-key buckets, lazy
monotonic refill, retry hints, and full test and guide coverage.
@ivan-podgurskiy
ivan-podgurskiy merged commit b796a7b into main Jun 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant