Ankit Singh’s Post

View profile for Ankit Singh, graphic

Senior Software Engineer | Java Backend Developer | Expertise in Microservices architecture | Kafka|Mockito | 7 years

How to apply Api rate-limit using redis in springboot ? After connecting the Spring Boot application with Redis, we need to create a bucket. A bucket can serve as a container for limit configurations, such as 1000 tokens per month or 100 tokens per day, or both. Once configured, the bucket will hold the specified number of tokens—1000 for a monthly limit or 100 for a daily limit. This bucket will act as the source of truth to either allow or reject requests based on the number of tokens available. Each API call will consume one token from the bucket. Once all tokens are exhausted, the rate-limiting system will prevent further requests from being processed

  • diagram

To view or add a comment, sign in

Explore topics