Back to Browse

Simple Rate Limiter in Java with Token Bucket Algorithm

9.4K views
Jun 2, 2023
18:27

In this video, I will show you how to implement a simple rate limiter using the token bucket algorithm in Java. The token bucket algorithm is a simple and efficient way to limit the rate at which requests are made to a resource. It works by adding tokens to a bucket at a fixed rate, and then allowing requests to proceed only if there are enough tokens in the bucket. Here is the sample code: https://github.com/anshriva/rate-limiter 00:00 Intro 02:47 Token bucket 04:36 overview 05:39 Bucket 08:40 Code 15:05 High level

Download

1 formats

Video Formats

360pmp433.8 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Simple Rate Limiter in Java with Token Bucket Algorithm | NatokHD