API Rate Limiter Microservice
A production-ready backend microservice for API rate limiting using the Token Bucket algorithm and Redis. Designed for high performance, clarity, and easy integration. Features global and per-client rate limits, REST API endpoints, configurable environment variables, and Docker support for seamless deployment.

About this project
This microservice implements the Token Bucket algorithm for rate limiting, which allows short bursts while enforcing a long-term average rate. It uses Redis for distributed, atomic state management, making it suitable for high-traffic applications. The service provides a REST API with a POST /check endpoint to verify if requests are allowed, returning appropriate responses with retry-after information when rate limits are exceeded. The project includes comprehensive unit tests, Docker support, and middleware for easy integration with other services.
Technologies Used
- Go (Golang)
- Redis
- Docker
- Docker Compose
- REST API
- Token Bucket Algorithm