dajac commented on pull request #9114:
URL: https://github.com/apache/kafka/pull/9114#issuecomment-668593472


   @junrao @apovzner I have updated the PR to address your comments. I have 
also refactored the code a bit and updated all the tests of the controller 
quota manager to work with the Token Bucket.
   
   From a public api perspective, we would have a new metric per user/clientId 
named: `tokens`. It represents the number of tokens in the bucket.
   
   Please, pay close attention to the unit tests of the controller mutation 
quota manager. Most of the throttle times have been updated there to match the 
token bucket usage. This is due to the fact that the token bucket does not have 
to wait until old samples are purged to get it amount of tokens updated. It is 
updated continuously.
   
   I wonder if we should use by default strait away of put it behind a config 
flag to let user opt in. It does not matter much for our new quota but that may 
matter if/when we migrate existing quotas. What do you think?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to