-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Question for rate limiter #698
Comments
It seems the token need a long time to refill itself.
Result:
I seems I need to make my program sleep 2 sec, so it will refill. Any ideas? |
Not a problem actually. // A Limiter controls how frequently events are allowed to happen. // Every converts a minimum time interval between events to a Limit. If I have rate.NewLimiter(rate.Every(time.Second * 1/3), 2), |
Rate limiting examples might be a bit confusing when Every method is used go-kit#698. Naturally one would expect to see a throttling demo as a number of requests per unit of time instead of defining an interval between requests.
Rate limiting examples might be a bit confusing when Every method is used go-kit#698. One could expect to see throttling expressed as a number of requests per unit of time whereas another would see it as an interval between requests.
Rate limiting examples might be a bit confusing when Every method is used #698. One could expect to see throttling expressed as a number of requests per unit of time whereas another would see it as an interval between requests.
Rate limiting examples might be a bit confusing when Every method is used go-kit/kit#698. One could expect to see throttling expressed as a number of requests per unit of time whereas another would see it as an interval between requests.
Rate limiting examples might be a bit confusing when Every method is used go-kit/kit#698. One could expect to see throttling expressed as a number of requests per unit of time whereas another would see it as an interval between requests.
I am trying to set up rate limiter for my grpc:
limit := rate.NewLimiter(rate.Every(time.Minute), 10)
e = ratelimit.NewErroringLimiter(limit)(e)
pb.RegisterFlowServer(s, server.NewBinding(e))
...
My client test code is to send 10 RPC, wait a minute, then send another 10 RPC.
However, my 2nd batch failed 9 out of 10.
Any ideas?
The text was updated successfully, but these errors were encountered: