ozonosfer-test

Functional Test Automation of ozonosfer Rate Limiter

License

License

GroupId

GroupId

com.iyzipay
ArtifactId

ArtifactId

ozonosfer-test
Last Version

Last Version

1.0.7
Release Date

Release Date

Type

Type

jar
Description

Description

ozonosfer-test
Functional Test Automation of ozonosfer Rate Limiter
Project Organization

Project Organization

iyzico

Download ozonosfer-test

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
com.iyzipay : ozonosfer-spring jar 1.0.7

test (2)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-test jar 1.5.3.RELEASE
com.orange.redis-embedded : embedded-redis jar 0.6

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