aerospike / aerospike-client-java

Aerospike Java Client Library
Other
236 stars 212 forks source link

PRIC-1913 : Introducing RateLimitting at Node level in aerospike clie… #76

Closed anshul10s closed 7 years ago

anshul10s commented 7 years ago

…nt. Made change in SyncCommand only (AsyncCommand not used for flipkart usecases).

For our infra, we ususally get limitted by PPS (function of QPS) for a aero cluster. Post reaching this limit, we observe latency in resoponse time.

Idea here is to fail fast, for more then supported QPS per node, client will throw AerospikeException with result code

RATE_LIMITER_REJECTION = -100

RateLimiing is achieved by counting QPS per node level and limitting it by Guava rate limitter.

This number can be configured via RateLimitPolicy (Supplied to Client via ClientPolicy). Default is not to rateLimit. Version: 3.3.1.fk