A distributed, high-performance, cloud-native rate limiting microservice and library developed at Mailgun.
Gubernator is a distributed rate limiting microservice and library built for high-performance, cloud-native applications. It provides scalable, stateless rate limiting without external caching dependencies, solving the challenge of enforcing API and resource usage limits across distributed systems. Developed at Mailgun, it handles thousands of requests per second with minimal latency.
Backend engineers and platform teams building scalable microservices or APIs that require robust, distributed rate limiting. It's particularly suited for organizations running in Kubernetes or similar orchestration platforms.
Developers choose Gubernator for its stateless design, which eliminates Redis/Memcached dependencies and simplifies scaling. Its high performance (sub-millisecond responses), support for multiple algorithms, and flexible deployment options make it a superior alternative to traditional rate limiting solutions.
High Performance Rate Limiting MicroService and Library - Developed at Mailgun
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Eliminates Redis or Memcached, simplifying deployment in orchestrated environments like Kubernetes, as highlighted in the stateless design philosophy.
Evenly distributes rate limit requests across clusters, allowing scaling by adding nodes, per the distributed architecture feature.
Handles over 2,000 requests per second with batched responses under 1 ms, demonstrated in production graphs from the README.
Offers Token Bucket and Leaky Bucket algorithms for different use cases, such as bursty limits or metering, detailed in the algorithm section.
Can run as a sidecar, standalone service, or embedded Go library, providing integration flexibility for various architectures.
Requires external services like etcd, Kubernetes, or DNS for clustering, adding deployment overhead and potential points of failure.
Lacks native disk storage; persistence requires implementing custom Store or Loader interfaces, as admitted in the optional persistence section.
Primarily a Go library, limiting ease of use in polyglot environments without additional gRPC/HTTP wrappers or integration efforts.
Batching behavior improves throughput but increases latency; disabling it reduces throughput, creating a design compromise noted in performance details.