Closed AwesomePatrol closed 6 months ago
/cc @kl52752
/hold
/approve (generally ok, please fix the comments I left, otherwise @kl52752, please complete the review and remove the hold)
/approve
/retest
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: AwesomePatrol, bowei, kl52752
The full list of commands accepted by this bot can be found here.
The pull request process is described here
/remove-hold
TickerRateLimiter
is a simple implementation based on time.Ticker suggested in https://go.dev/wiki/RateLimiting. It works by spacing requests in predefined intervals. It doesn't allows bursts although it is fairly easy to add. A good candidate for replacement would be https://github.com/uber-go/ratelimit which supports "slack"CompositeRateLimiter
doesn't implement any rate limiting algorithm, but allows to combine all rate limiters (implementing theRateLimiter
interface). A user can specify what rate limiter should be used for a specific combination of project, service and operation. An example usage is available ine2e/testmain_test.go
where there are twoTickerRateLimiter
s used forCompute
andNetworkServices
API; and twoMinimumRateLimiter
s forOperations
and as a fallback for all other requestsBug: b/337197802