{"repo":"mennanov/limiters","free":true,"listed":false,"github":"https://github.com/mennanov/limiters","clone":"git clone https://github.com/mennanov/limiters.git","description":"Golang rate limiters for distributed applications","language":"Go","stars":652,"topics":["grpc","rate-limiting","token-bucket","leaky-bucket","fixed-window","sliding-windows","golang","concurrent-limiter","redis","zookeeper"],"license":"MIT","category":"databases-storage","readme_excerpt":"Distributed rate limiters for Golang Rate limiters for distributed applications in Golang with configurable back-ends and distributed locks. Any types of back-ends and locks can be used that implement certain minimalistic interfaces. Most common implementations are already provided. - Token bucket - in-memory (local) - redis - memcached - etcd - dynamodb - cosmos db Allows requests at a certain input rate with possible bursts configured by the capacity parameter. The output rate equals to the input rate. Precise (no over or under-limiting), but requires a lock (provided). - Leaky bucket - in-memory (local) - redis - memcached - etcd - dynamodb - cosmos db Puts requests in a FIFO queue to be processed at a constant rate. There are no restrictions on the input rate except for the capacity of the queue. Requires a lock (provided). - Fixed window counter - in-memory (local) - redis - memcached - dynamodb - cosmos db Simple and resources efficient algorithm that does not need a lock. Precision may be adjusted by the size of the window. May be lenient when there are many requests around the boundary between 2 adjacent windows. - Sliding window counter - in-memory (local) - redis - memcached - dynamodb - cosmos db Smoothes out the bursts around the boundary between 2 adjacent windows. Needs as twice more memory as the Fixed Window algorithm (2 windows instead of 1 at a time). It will disallow all the requests in case when a client is flooding the service with requests. It's the clie","default_branch":null,"files":null,"tree":[],"storefront":"/r/mennanov","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mennanov/limiters/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}