Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(http-ratelimiting)!: rewrite crate #2418

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open

Conversation

vilgotf
Copy link
Member

@vilgotf vilgotf commented Feb 1, 2025

Replaces InMemoryRatelimiter with a new implementation with proper path bucketing support and global limit accounting.

TODO:

  • Remove Ratelimiter trait (no limiter but a http proxy is planned as an alternative to the built-in one)
  • Replacement for the bucket method
  • Add newtypes around channels (like the old TicketReceiver)
  • Improve tracing events, add relevant spans
  • Move response headers handling to caller with builder pattern
  • Testing, testing, testing (real-world help wanted)

Closes: #650, #1305, #2159
Partially resolves: #1046 (also requires #600)

@github-actions github-actions bot added c-http Affects the http crate c-http-ratelimiting Affects the http ratelimiting crate m-breaking change Breaks the public API. t-feature Addition of a new feature labels Feb 1, 2025
@vilgotf vilgotf force-pushed the vilgotf/new-limiter branch 10 times, most recently from 8b22ddc to 95733d5 Compare February 9, 2025 10:23
@vilgotf vilgotf force-pushed the vilgotf/new-limiter branch 2 times, most recently from 0e46df7 to e74289c Compare February 16, 2025 08:07
@github-actions github-actions bot added c-book Affects the book c-cache Affects the cache crate c-gateway Affects the gateway crate c-model Affects the model crate labels Feb 16, 2025
@vilgotf vilgotf force-pushed the vilgotf/new-limiter branch from e74289c to 3e5db89 Compare February 16, 2025 08:10
@github-actions github-actions bot removed c-gateway Affects the gateway crate c-book Affects the book c-model Affects the model crate c-cache Affects the cache crate labels Feb 16, 2025
@vilgotf vilgotf force-pushed the vilgotf/new-limiter branch 5 times, most recently from 2f035b5 to 2b5fdcc Compare February 16, 2025 12:20
Support buckets and global limit. Work in progress...
@vilgotf vilgotf force-pushed the vilgotf/new-limiter branch from 2b5fdcc to f8a06e0 Compare February 16, 2025 12:23
@vilgotf vilgotf marked this pull request as ready for review February 16, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-http Affects the http crate c-http-ratelimiting Affects the http ratelimiting crate m-breaking change Breaks the public API. t-feature Addition of a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant