Selection of A Suitable Algorithm for the Implementation of Rate-Limiter Based on Bucket4j

Authors

DOI:

https://doi.org/10.3991/ijoe.v18i04.25641

Keywords:

Rate-limiting, Bucket4j, Token-Bucket Algorithm, Leaky-Bucket Algorithm, Fixed Window Algorithm, Sliding Window Algorithm

Abstract


 In shared network services, rate limiting is essential as it controls the requests of the users or requesters in a specific amount of time. Due to rate limiting, the service or API stays protected from overuse, malicious attack, DDoS attack, data traffic spikes, etc. Bucket4j is a java library that has been demonstrated to be effective in rate limiting. While Bucket4j is mainly based on token bucket algorithm, rate limiting processes can be based on various effective algorithms. Selecting the most suitable algorithm for rate limiting is an essential problem. To address it, we have done a detailed analysis of rate-limiting algorithms based on various factors. The factors we have considered are easy implementation, proper handling of data traffic, data starvation, memory usage, etc. We have found out that for different set of requirements, different algorithms are  preferable.

Author Biography

Dmitry Borovikov, Oceanic and Space Sciences and Scientific Computing, University of Michigan Instabase, Inc. 1480 York ave apt 6F, New York, NY 10075

Ph.D. in Atmospheric, Oceanic and Space Sciences and Scientific Computing, University of Michigan Instabase, Inc. 1480 York ave apt 6F, New York, NY 10075

Downloads

Published

2022-03-22

How to Cite

Bartkov, M. V., & Borovikov, D. (2022). Selection of A Suitable Algorithm for the Implementation of Rate-Limiter Based on Bucket4j. International Journal of Online and Biomedical Engineering (iJOE), 18(04), pp. 52–63. https://doi.org/10.3991/ijoe.v18i04.25641

Issue

Section

Papers