Skip to content

manyworldss/Rate_Limiter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Rate_Limiter

ratelimit

Flask Rate Limiter Project

Project Overview

Built a custom rate limiter using Flask to control API access and prevent abuse. The system tracks and limits user requests based on IP addresses, implementing a rolling time window approach. Technical Implementation

Framework: Flask web framework

Core Logic: Tracks requests using an in-memory data structure (defaultdict) with IP-based tracking Time Management: Uses Python's datetime for rolling window implementation Request Tracking: Maintains timestamps of requests and automatically cleans expired entries

Key Features

Rolling time window (1 minute) for request tracking IP-based request limiting Automatic cleanup of expired request data Real-time request counting

Technical Skills Demonstrated

RESTful API design Resource management Concurrency handling Data structure optimization Clean code practices

Why This Matters Rate limiting is a crucial component in modern web applications for:

Preventing API abuse Managing server resources Ensuring fair usage across users Protecting against DoS attacks

Future Enhancements

Redis integration for distributed systems Custom rate limits per endpoint User authentication integration Response headers for rate limit status

This project demonstrates understanding of web security, API design, and resource management - all critical skills in backend development.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages