mokies/ratelimitj
حول
مكتبة Java لتحديد معدل الطلبات، وتوفّر محوّلات قابلة للتوسّع للتخزين وأُطر عمل التطبيقات.
تطوير الويب والتطبيقاتما يمكنك فعله
- Uses an efficient approximated sliding window algorithm for rate limiting
- Multiple limit rules per instance
النمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- ٠
- خلال 15 يومًا
- ٠
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلThis project is no longer supported, please consider using Bucket4j instead

RateLimitJ
A Java library for rate limiting, assembled using extensible storage and application framework adaptors. The library's interfaces support thread-safe sync, async, and reactive usage patterns.
Modules
RateLimitJ provides the following stable plugable modules:
Features
- Uses an efficient approximated sliding window algorithm for rate limiting
- Multiple limit rules per instance
Binaries/Download
Binaries and dependency information for Maven, Ivy, Gradle and others can be found at Maven Central.
Example for Maven:
<dependency>
<groupId>es.moki.ratelimitj</groupId>
<artifactId>ratelimitj-redis</artifactId>
<version>${ratelimitj-redis.version}</version>
</dependency>
Prerequisite
- RateLimitJ requires Java 8
Roadmap
| Feature | Status |
|---|---|
| Redis sliding window rate limiter | production |
| Dropwizard integration - Bundle | production |
| In-memory sliding window rate limiter | stable |
| In-memory concurrent rate limiter | beta |
| Rate limiting toggles (dark launch) for framework integration | beta |
| Hazelcast sliding window rate limiter | beta/dev |
| Redis concurrent rate limiter | dev/active |
| Enhanced metrics logging | back log |
| Whitelisting & blacklisting of keys | back log |
| Rate limit HTTP header responses | back log |
| Async in-memory rate limit buffer/cache (inspired by Google's SRE book) | back log |
| Spring integration | back log |
Building
RateLimitJ is built with Gradle and requires docker to spin up Redis for the Redis module.
To build:
$ git clone https://github.com/mokies/ratelimitj.git
$ cd ratelimij/
$ ./gradlew
Credits
This library was inspired by the following articles on sliding window rate limiting with Redis:
Background Reading
Authors
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…