ozonosfer

Intelligent Scalable Rate Limiting

License

License

GroupId

GroupId

com.iyzipay
ArtifactId

ArtifactId

ozonosfer
Last Version

Last Version

1.0.7
Release Date

Release Date

Type

Type

pom
Description

Description

ozonosfer
Intelligent Scalable Rate Limiting
Project URL

Project URL

https://github.com/iyzico/ozonosfer
Project Organization

Project Organization

iyzico
Source Code Management

Source Code Management

https://github.com/iyzico/ozonosfer

Download ozonosfer

Filename Size
ozonosfer-1.0.7.pom 6 KB
Browse

How to add to project

<!-- https://jarcasting.com/artifacts/com.iyzipay/ozonosfer/ -->
<dependency>
    <groupId>com.iyzipay</groupId>
    <artifactId>ozonosfer</artifactId>
    <version>1.0.7</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.iyzipay/ozonosfer/
implementation 'com.iyzipay:ozonosfer:1.0.7'
// https://jarcasting.com/artifacts/com.iyzipay/ozonosfer/
implementation ("com.iyzipay:ozonosfer:1.0.7")
'com.iyzipay:ozonosfer:pom:1.0.7'
<dependency org="com.iyzipay" name="ozonosfer" rev="1.0.7">
  <artifact name="ozonosfer" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.iyzipay', module='ozonosfer', version='1.0.7')
)
libraryDependencies += "com.iyzipay" % "ozonosfer" % "1.0.7"
[com.iyzipay/ozonosfer "1.0.7"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • ozonosfer-spring
  • ozonosfer-test

ozonosfer

Build Status

Intelligent scalable rate limiter

1. Requirements

For ozonosfer-spring JDK 1.8 or newer is required.

2. Usage

    @RateLimit(prefix = "app:method", key = "#request.authenticationId", windowSize = MINUTE, limit = 10)
    public void rateLimitedMethod(SampleRequest request) {
        System.out.println("rate limited method executed!");
    }

3. CONFIG

ozonosfer:
  toggling: white-list

3.1 Toggling

Ozonosfer use redis sets for toggling rate limiting. The redis key is ozon-list. You can add keys to list with redis-cli SADD ozon-list "132". Default value is white-list.

white-list ozonosfer only limits the keys in the list.

black-list ozonosfer limits every request except key in the list.

4. Options

  • prefix - the prefix of identifier to limit against (retrieved from method parameter)
  • key - the identifier to limit against (retrieved from method parameter)
  • windowSize - the size of a window. Can be SECOND, MINUTE or HOUR.
  • limit - maximum number of requests in the given window size.

Note: key expression supports fields inside nested objects ("#request.user.id")

com.iyzipay

iyzico

Easiest and Fastest Way of Accepting Payments

Versions

Version
1.0.7