Skip to content

Prezzy06/rate-limiter-implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rate Limiter System (Spring Boot + React)

A full-stack project that demonstrates four classic rate-limiting algorithms implemented in Spring Boot (backend) and visualized through a React (Vite + TypeScript) frontend.
This system simulates API traffic control to ensure fair usage and prevent abuse under high load conditions.


Overview

The project allows users to test and compare the following rate-limiting strategies:

  • Token Bucket
  • Leaky Bucket
  • Fixed Window Counter
  • Sliding Window Log

Each API call responds whether the request is allowed or blocked based on the selected algorithm.

You can learn more about these algorithms here : Rate Limiting Algorithms


Tech Stack

Backend

  • Java 17
  • Spring Boot 3.x
  • Maven
  • Factory + Strategy Design Patterns
  • CORS Configuration
  • Dockerized

Frontend

  • React 18 + Vite
  • TypeScript
  • Axios (for REST API calls)
  • TailwindCSS (optional for styling)
  • Dockerized

DevOps

  • Docker + Docker Compose
  • Bridge Networking for frontend-backend communication

Quick Start (Using Docker Compose)

Prerequisites


Clone the repository

git clone https://github.com/Prezzy06/rate-limiter-project.git
cd rate-limiter-project

Build and run both frontend + backend

docker-compose up --build

This will:

  • Build the backend (Spring Boot JAR)

  • Build the frontend (Vite dev server)

  • Run both inside connected containers

Access the app

Development (Without Docker)

Backend

cd backend
mvn spring-boot:run

Frontend

cd frontend
npm install
npm run dev

Features

  • Four rate-limiting strategies implemented from scratch

  • Clean RESTful API structure

  • Error handling with proper HTTP status codes (200 / 429)

  • CORS enabled for frontend integration

  • Dockerized full-stack environment

  • Ready for deployment or scaling

About

Implementation of rate limiting algorithms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors