Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the difference with the "standard" rate limiting? #9

Closed
novikk opened this issue Jul 12, 2017 · 2 comments
Closed

What is the difference with the "standard" rate limiting? #9

novikk opened this issue Jul 12, 2017 · 2 comments

Comments

@novikk
Copy link

novikk commented Jul 12, 2017

Not an issue itself, just curious to know what is the difference with this and the advantages/disadvantages of each: https://github.com/golang/go/wiki/RateLimiting

@felix0080
Copy link

want too

@rabbbit
Copy link
Contributor

rabbbit commented Oct 4, 2020

Hi,

In https://github.com/golang/go/wiki/RateLimiting you pass in the "work" upfront, from a single go-routine, and the limiter takes care of sending the work at a scheduled interval.

This module has a different interface - it allows you to call it from a number of go-routines, as the work is available. Technically, you could build https://github.com/golang/go/wiki/RateLimiting using this module.

As to difference between this module and https://godoc.org/golang.org/x/time/rate - it's mostly similar, but at the time of creation of this module x/time/rate was ~10 times slower. We're not sure if that's still the case, we'll be looking more into the performance over the next weeks.

@rabbbit rabbbit closed this as completed Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants