GoBouncer is a high-performance rate-limiting API service built with Go. It leverages Redis as its backing store and implements the Sliding Window algorithm for accurate and smooth traffic control. This service is designed to be configurable and easy to deploy, making it an excellent choice for managing API request rates effectively.
Sliding Window Algorithm: Offers a more precise and consistent rate-limiting mechanism than traditional fixed window counters.
Redis Integration: Utilizes Redis for efficient, distributed state management, ensuring scalability and speed.
Environment Driven Configuration: Easily configurable via .env files, simplifying deployment and local testing.
Atomic Operations: Implements thread-safe operations using go.uber.org/atomic for robust performance.
Policy-Based Rate Limits: Supports named policies, allowing developers to define and manage rate limits without hardcoding them directly into application logic. This includes support for multi-dimensional limits based on IP, user, route, and more.
Metrics Exposure: Provides Prometheus-compatible metrics at the /metrics endpoint for monitoring and observability.
Docker Support: Includes Docker and Docker Compose configurations for streamlined local development and deployment.
The project is structured to be modular, with clear separation of concerns for API handlers, rate-limiting logic, and configuration. It supports various algorithms and allows for custom policy definitions through JSON files.
developer sdk : [https://github.com/ritik-kharya/gobouner-package]
Built with