The Ratelimiting App is a tool for implementing rate limiting in your application using two different approaches: bucket4j-core
and expiringmap
.
The Ratelimiting App provides two ways to implement rate limiting in your application: using bucket4j-core
and expiringmap
. Rate limiting is essential to control the amount of incoming requests or operations from a client or user within a specific time frame. This helps to prevent abuse, manage resources effectively, and maintain system stability.
- Rate limiting using
bucket4j-core
. - Rate limiting using
expiringmap
. - Easy integration into your application.
- Customizable rate limiting rules.
The Ratelimiting App relies on the following dependencies:
You can install the Ratelimiting App by adding the necessary dependencies to your project's pom.xml
file:
<dependencies>
<!-- For bucket4j-core -->
<dependency>
<groupId>com.github.vladimir-bukhtoyarov</groupId>
<artifactId>bucket4j-core</artifactId>
<version>6.3.0</version>
</dependency>
<!-- For expiringmap -->
<dependency>
<groupId>net.jodah</groupId>
<artifactId>expiringmap</artifactId>
<version>${expiringmap.version}</version>
</dependency>
</dependencies>
Replace ${expiringmap.version}
with the actual version of expiringmap you want to use.
uncomment the section in JwtAuthenticationFilter
and enjoy
Current implementation is using expiringmap and no need to change anything
Contributions to the Ratelimiting App are welcome! If you have bug fixes, improvements, or new features to propose, please feel free to submit a pull request.
The Ratelimiting App is licensed under the MIT License.
- Distributed: make application more effective by using redis or any other caching system and store the information there