[go: up one dir, main page]

Skip to content

senocak/SpringBoot-Kotlin-RateLimit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ratelimiting App

The Ratelimiting App is a tool for implementing rate limiting in your application using two different approaches: bucket4j-core and expiringmap.

Table of Contents

Introduction

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.

Features

  • Rate limiting using bucket4j-core.
  • Rate limiting using expiringmap.
  • Easy integration into your application.
  • Customizable rate limiting rules.

Dependencies

The Ratelimiting App relies on the following dependencies:

Installation

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.

Usage

Using bucket4j-core

uncomment the section in JwtAuthenticationFilter and enjoy

Using expiringmap

Current implementation is using expiringmap and no need to change anything

Contributing

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.

License

The Ratelimiting App is licensed under the MIT License.

TODO(pr's are always welcomed)

  1. Distributed: make application more effective by using redis or any other caching system and store the information there

About

SpringBoot Kotlin RateLimit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published