equalizer alternatives and similar packages
Based on the "Utilities" category.
Alternatively, view equalizer alternatives based on common mentions on social networks and blogs.
-
xlsx
Library to simplify reading the XML format used by recent version of Microsoft Excel in Go programs. -
goreporter
A Golang tool that does static analysis, unit testing, code review and generate code quality report. -
go-funk
A modern Go utility library which provides helpers (map, find, contains, filter, chunk, reverse, ...) -
mc
Minio Client provides minimal tools to work with Amazon S3 compatible cloud storage and filesystems. -
mergo
A helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements. -
beaver
Beaver is a real-time messaging server. With beaver you can easily build scalable in-app notifications, realtime graphs, multiplayer games, chat applications, geotracking and more in web applications and mobile apps. -
httpcontrol
Package httpcontrol allows for HTTP transport level control around timeouts and retries.
Get performance insights in less than 4 minutes
Do you think we are missing an alternative of equalizer or a related project?
Popular Comparisons
README
equalizer
Rate limiters collection
About
API Quota is a very valuable resource. And while using it very carefully how do we back off in case of quota exceeded. If we continue with requests it can cause waste load and account lock in specific cases.
Distributed quota management service is a solution but what if this is not a case? Chose one of the following limiters and your preferred backoff algorithm if needed.
Equalizer
Equalizer provides the ability to manage quota based on previous responses and slow down or accelerate accordingly. It uses a bitmap of variable size which is quick and efficient.
Usage
offset := NewRandomOffset(96)
eq := NewEqualizer(96, 16, offset)
//claim quota
haveQuota := eq.Claim()
//nofify equalizer
eq.Notify(true, 10)
Benchmark results
BenchmarkEqualizerShortClaimStep-8 10000000 144 ns/op 0 B/op 0 allocs/op
BenchmarkEqualizerShortClaimRandom-8 10000000 155 ns/op 0 B/op 0 allocs/op
BenchmarkEqualizerShortNotify-8 5000000 266 ns/op 0 B/op 0 allocs/op
BenchmarkEqualizerLongClaimStep-8 10000000 143 ns/op 0 B/op 0 allocs/op
BenchmarkEqualizerLongClaimRandom-8 10000000 146 ns/op 0 B/op 0 allocs/op
BenchmarkEqualizerLongNotify-8 30000 48446 ns/op 0 B/op 0 allocs/op
Slider
Sliding window based rate limiter.
Usage
//slider with 1 second window size, 100 millis sliding interval and capacity of 32
slider := NewSlider(time.Second, time.Millisecond*100, 32)
//claim quota
haveQuota := slider.Claim()
Token bucket
Custom implementation for token bucket rate limiter with refill interval.
Usage
//bucket with capacity of 32 and 100 millis refill interval
tokenBucket := NewTokenBucket(32, time.Millisecond*100)
//claim quota
haveQuota := tokenBucket.Claim()
License
Licensed under the MIT License.
*Note that all licence references and agreements mentioned in the equalizer README section above
are relevant to that project's source code only.