Skip to content

peephole5layer/api-rate-limiter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚦 API Rate Limiter Service

A Spring Boot–based API Rate Limiter that protects APIs from overuse by controlling request flow per user/IP using Redis caching.
Ensures fair usage, stability, and protection of APIs with smart request throttling.


✨ Features

  • Request Throttling → Limit requests per user/IP (e.g., 100 requests per minute).
  • 🔄 Auto Reset Counters → Limits reset every minute automatically.
  • 🛡 API Protection → Prevents abuse & ensures fair resource usage.
  • 📡 Redis Powered → High-performance caching for request counts.
  • 🧩 Plug & Play → Works with embedded Redis, no external setup needed.

📌 Use Cases

  1. 🌐 Public APIs (Prevent Abuse)
  2. 🔑 Authentication endpoints
  3. 💳 Payment gateways
  4. 💬 Messaging systems

🏗 Project Architecture

flowchart TD
    A[Client Request] --> B[RateLimiterFilter]
    B -->|Check User/IP| C[RateLimiterService]
    C -->|Request Count in Redis| D[Redis Store]
    C -->|Allowed| E[API Controller]
    C -->|Blocked| F[429 Too Many Requests]
    E --> G[✅ Success Response]
    F --> H[❌ Error Response]


Loading

About

A Spring Boot–based API Rate Limiter that controls request flow per user/IP using Redis caching.Ensures fair usage, stability, and protection of APIs with smart request throttling.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages