ozonosfer-spring

Intelligent Rate Limiting Framework for Spring Applications

License

License

GroupId

GroupId

com.iyzipay
ArtifactId

ArtifactId

ozonosfer-spring
Last Version

Last Version

1.0.7
Release Date

Release Date

Type

Type

jar
Description

Description

ozonosfer-spring
Intelligent Rate Limiting Framework for Spring Applications
Project Organization

Project Organization

iyzico

Download ozonosfer-spring

How to add to project

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

Dependencies

compile (9)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-web jar
org.springframework.boot : spring-boot-starter-data-redis jar
org.springframework : spring-core jar 4.3.8.RELEASE
org.springframework : spring-context jar 4.3.8.RELEASE
org.springframework : spring-aop jar 4.3.8.RELEASE
org.springframework.cloud : spring-cloud-starter-hystrix jar 1.2.3.RELEASE
org.aspectj : aspectjweaver jar 1.9.1
com.google.guava : guava jar 19.0
org.jooq : jool jar 0.9.12

Project Modules

There are no modules declared in this project.

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
1.0.4