but it affects the throttling of the next request. 'It is important to note that the number of permits requested never affects the throttling of the request itself. Maybe it does not work as expected, depending on the number of requests your application does over time.
I would propose to take a look in the RateLimiter direction.