Code Monkey home page Code Monkey logo

ratelimitj's Introduction

RateLimitJ Logo

RateLimitJ

Build Status Codecov Maven Central license

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 a local Redis for the Redis module. Running docker-compose up -d will start Redis.

To build:

$ git clone https://github.com/mokies/ratelimij.git
$ cd ratelimij/
$ docker-compose up -d
$ ./gradlew

Credits

This library was inspired by the following articles on sliding window rate limiting with Redis:

Background Reading

Authors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.