{"repo":"coinpaprika/ratelimiter","free":true,"listed":false,"github":"https://github.com/coinpaprika/ratelimiter","clone":"git clone https://github.com/coinpaprika/ratelimiter.git","description":"Minimal lock-free sliding-window rate limiter for Go — used by Coinpaprika for cryptocurrency API throttling. Inspired by Cloudflare.","language":"Go","stars":35,"topics":["concurrency","go","golang","library","middleware","rate-limiter","rate-limiting","sliding-window","throttling","api"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"ratelimiter Simple rate limiter for any resources inspired by Cloudflare's approach: How we built rate limiting capable of scaling to millions of domains. Usage Getting started Rate-limit IP requests in http middleware See full example Share rate-limit state across processes with Redis NewMapLimitStore keeps counters in-process, so each instance of a service enforces its own limit. To share limits across a horizontally-scaled fleet, use the built-in Redis-backed store. It accepts any go-redis client (single node, cluster or sentinel), and relies on native Redis TTLs for expiration instead of a background flush goroutine: Implement your own limit data store To use custom data store (memcached, Redis, MySQL etc.) you just need to implement LimitStore interface: Examples Check out the examples directory. License ratelimiter is available under the MIT license. See the LICENSE file for more info.","default_branch":null,"files":null,"tree":[],"storefront":"/r/coinpaprika","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/coinpaprika/ratelimiter/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."}