Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

Rate Limiter

A basic rate limiter implementation to understand how request limiting works in backend systems.


Overview

This project limits the number of requests a user can make within a specific time window.
If the user exceeds the allowed limit, further requests are rejected.


Features

  • Multiple rate limiting strategies:
    • Fixed Window
    • Sliding Window
    • Token Bucket
  • Per-user request tracking
  • Thread-safe in-memory storage
  • Simple and extensible design

How It Works

  1. Each request is associated with a user key (e.g., userId or API key)
  2. The system tracks requests for that key
  3. On every request:
    • If limit not exceeded → request allowed
    • If limit exceeded → request rejected

Tech Stack

  • Java
  • ConcurrentHashMap (in-memory storage)
  • Basic concurrency handling

Limitations

  • Uses in-memory storage (data lost on restart)
  • Not suitable for distributed systems
  • No persistence layer
  • Basic implementation for learning purposes

Getting Started

git clone https://github.com/your-username/rate-limiter.git
cd rate-limiter

mvn clean install
mvn spring-boot:run

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages