Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. limiters

limiters

MITGov1.13.11

A Go library providing distributed rate limiting algorithms with pluggable backends and locks for scalable applications.

Visit WebsiteGitHubGitHub
651 stars63 forks0 contributors

What is limiters?

Limiters is a Go library that provides a collection of distributed rate limiting algorithms for scalable applications. It enables developers to enforce rate limits consistently across distributed systems by offering configurable backends and distributed locks. The library supports various algorithms like Token Bucket, Leaky Bucket, and Sliding Window Counter, decoupling rate limiting logic from storage and locking mechanisms.

Target Audience

Go developers building scalable distributed applications, such as microservices or APIs, that require consistent rate limiting across multiple instances. It is also suitable for developers needing flexible backend integrations with systems like Redis, DynamoDB, or etcd.

Value Proposition

Developers choose Limiters for its flexibility in supporting multiple rate limiting algorithms and pluggable backends, allowing easy integration with existing infrastructure. Its unique selling point is the decoupling of rate limiting logic from storage and locking, providing reliability and thread safety in distributed environments without vendor lock-in.

Overview

Golang rate limiters for distributed applications

Use Cases

Best For

  • Implementing global rate limiting for gRPC services across distributed instances.
  • Enforcing API rate limits with strict control using sliding window counters to smooth bursts.
  • Building scalable applications that require token bucket algorithms with burst capacity support.
  • Integrating rate limiting with cloud databases like DynamoDB or Cosmos DB for persistent storage.
  • Managing concurrent request limits in microservices using concurrent buffer algorithms.
  • Ensuring consistency in distributed systems with etcd or Consul-based distributed locks for rate limiting.

Not Ideal For

  • Systems where ultra-low latency is critical for every request, as distributed locks in algorithms like Token Bucket can introduce additional overhead.
  • Teams without existing infrastructure for distributed coordination (e.g., etcd, Consul), as setting up these components solely for rate limiting adds significant complexity.
  • Applications that require simple, in-memory rate limiting without persistence, where the distributed features of Limiters would be overkill and add unnecessary dependencies.
  • Environments relying heavily on Memcached for rate limiting, as the library explicitly warns about its unreliability for locks and data persistence.

Pros & Cons

Pros

Algorithm Variety

Offers multiple rate limiting algorithms including Token Bucket, Leaky Bucket, and Sliding Window, allowing developers to select the best fit based on precision and resource needs, as detailed in the README's feature list.

Backend Flexibility

Supports a wide range of backends from in-memory to cloud databases like DynamoDB and Cosmos DB, enabling seamless integration with existing infrastructure without vendor lock-in, as emphasized in the pluggable architecture.

Distributed Consistency

Integrates with distributed locks via etcd, Consul, and others, ensuring thread-safe and consistent rate limiting across distributed instances, which is core to the library's philosophy for scalable applications.

Practical Examples

Provides real-world examples like gRPC interceptors and IP-based limiters, helping developers implement rate limiting quickly, as shown in the gRPC and DynamoDB sections of the README.

Cons

Memcached Caveats

The README explicitly states that Memcached is not ideal for reliable locks or data persistence due to eviction issues, which can lead to unexpected behavior and data loss in distributed systems.

Setup Overhead

Backends like DynamoDB and Cosmos DB require manual table or container creation with specific schemas and TTL settings, adding configuration steps that can be cumbersome for quick deployments, as noted in the DynamoDB and Cosmos DB sections.

Lock Dependency

Algorithms like Token Bucket and Leaky Bucket necessitate distributed locks, creating a dependency on external services that can fail, increasing system complexity and potential points of failure.

Memory Usage

Algorithms like Sliding Window Counter use twice the memory of Fixed Window, which might be a concern in memory-constrained environments, as mentioned in the algorithm descriptions.

Frequently Asked Questions

Quick Stats

Stars651
Forks63
Contributors0
Open Issues0
Last commit6 days ago
CreatedSince 2019

Tags

#redis#sliding-window#distributed-systems#token-bucket#distributed-locks#sliding-windows#grpc#golang#zookeeper#rate-limiting#scalability#go

Built With

G
Go
e
etcd
P
PostgreSQL
D
DynamoDB
C
Cosmos DB
C
Consul
Z
Zookeeper
M
Memcached
R
Redis

Links & Resources

Website

Included in

Go169.1k
Auto-fetched 9 hours ago

Related Projects

fzffzf

:cherry_blossom: A command-line fuzzy finder

Stars82,864
Forks2,863
Last commit1 day ago
divedive

A tool for exploring each layer in a docker image

Stars54,539
Forks1,998
Last commit8 months ago
HubHub

A command-line tool that makes git easier to use with GitHub.

Stars22,957
Forks2,221
Last commit2 years ago
lolo

💥 A Lodash-style Go library based on Go 1.18+ Generics (map, filter, contains, find...)

Stars21,429
Forks953
Last commit20 hours ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub