Global RPS Control for Admin Batch Operation#10546
Conversation
| ) fxResult { | ||
| adminBatcherHostRateFn := calculator.NewLoggedCalculator( | ||
| calculator.ClusterAwareQuotaCalculator{ | ||
| MemberCounter: serviceResolver, |
There was a problem hiding this comment.
shouldn't this pay attention to the per-ns worker count? you can get the number from the workercommon.RegistrationDetails passed to Register, and this worker's share is Multiplicity / TotalWorkers
There was a problem hiding this comment.
hmm not really? this is limit across all namespaces and all admin batch jobs.
There was a problem hiding this comment.
actually I will check if I can just use the distributed rate limit here.
There was a problem hiding this comment.
oh I see, I misunderstood the scope
| ) | ||
|
|
||
| var Module = fx.Options( | ||
| fx.Provide(AdminBatcherRateLimiterProvider), |
There was a problem hiding this comment.
This allows us to inject a different implementation in cloud.
| ) | ||
|
|
||
| type ( | ||
| AdminBatcherRateLimiter quotas.RequestRateLimiter |
There was a problem hiding this comment.
Our internal implementation only implements RequestRateLimiter interface, not RateLimiter.
What changed?
Why?
How did you test it?