honeycombio/leakybucket

Name: leakybucket

Owner: Honeycomb

Description: null

Created: 2016-11-05 14:32:02.0

Updated: 2018-04-10 12:44:01.0

Pushed: 2017-03-02 20:19:54.0

Homepage: null

Size: 9

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

leakybucket

leakybucket is a go library for implementing rate limits using the leaky bucket algorithm

The rate limit is expressed in terms of a throughput and burst limit - over time the average throughput can't exceed the throughput limit, but in any given time period, traffic may be allowed to exceed the throughput limit in bursts.

This type of rate limit is often seen in network - you might buy 1Mb of bandwidth with a 100Mb burst limit. Over the course of time, your average throughput must be below 1Mb, but if you need to temporarily spike above it, it's fine.

Other implementations

There are quite a few leaky bucket implementations out there, each is slightly different. Some of the alternatives written in go:

Contributions and license

Features, bug fixes and other changes are gladly accepted. Please open issues or a pull request with your change.

All contributions will be released under the Apache License 2.0.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.