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

Add rueidislimiter Module for Distributed Rate Limiting #661

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

nesty92
Copy link
Contributor

@nesty92 nesty92 commented Nov 4, 2024

The module is inspired by GitHub's approach to scaling rate limiting with Redis to support high-traffic APIs in a distributed system.

Key Features

  • Token Bucket Rate Limiting: Implements a token bucket algorithm to limit the number of requests a client can make within a specified time window.
  • Customizable Configuration: Allows setting custom limits and time windows for each rate limiter instance.
  • Distributed Consistency: Uses Redis as a backend to ensure consistency and persistence of rate limits across distributed systems.
  • Reset Information: Provides helpful information about when the next allowed request can occur RetryAt.

rueidislimiter/README.md Outdated Show resolved Hide resolved
rueidislimiter/limiter.go Outdated Show resolved Hide resolved
rueidislimiter/limiter.go Outdated Show resolved Hide resolved
rueidislimiter/limiter.go Show resolved Hide resolved
@rueian
Copy link
Collaborator

rueian commented Nov 4, 2024

Thanks @nesty92, this is cool. I think we can deliver it in the next next release (v1.0.50) since v1.0.49 already got a lot of updates.

@nesty92 nesty92 force-pushed the feat/rate-limiter branch 4 times, most recently from 255abd9 to d1d6b78 Compare November 6, 2024 13:37
rueidislimiter/limiter.go Outdated Show resolved Hide resolved
rueidislimiter/limiter.go Outdated Show resolved Hide resolved
@nesty92 nesty92 requested a review from rueian November 7, 2024 12:31
@rueian rueian merged commit b9b810e into redis:main Nov 10, 2024
31 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.

3 participants