You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.
Sometimes when using multiple resources at the same time I want to make sure they are all clear before beginning the work. For example before calling an external API, I want to make sure my own server has capacity to handle the work AND I want to make sure not to abuse the limits of the external API.
I would like to be able to include a chain (list) of limiters in one request. Gubernator would atomically determine if each limiter is UNDER_LIMIT, and only then increment all the hits. If any one of the requested limits is OVER_LIMIT, then the request fails and no hits are incremented.
The response would probably be a Boolean flag of whether the overall request is successful and a list of responses for each limiter requested. The longest reset_time for a failed limiter would be useful as well.
The closest way to achieve this currently is querying each limiter with zero hits to see if they are all open, and only then sending another request to deduct hits from each limiter. The problem is that this operation is not atomic so they could have filled up between requests.
The text was updated successfully, but these errors were encountered:
I've been thinking about this. We could support this by adding a Behavior to the GetRateLimitsReq like so.
messageGetRateLimitsReq {
repeatedRateLimitReqrequests=1;
// Behavior is a set of int32 flags that control the // behavior that applies to all requestsUnionBehaviorbehavior=2;
}
Then a Behavior of ATOMIC_REQUESTS could be added as an option to UnionBehavior
Sometimes when using multiple resources at the same time I want to make sure they are all clear before beginning the work. For example before calling an external API, I want to make sure my own server has capacity to handle the work AND I want to make sure not to abuse the limits of the external API.
I would like to be able to include a chain (list) of limiters in one request. Gubernator would atomically determine if each limiter is UNDER_LIMIT, and only then increment all the hits. If any one of the requested limits is OVER_LIMIT, then the request fails and no hits are incremented.
The response would probably be a Boolean flag of whether the overall request is successful and a list of responses for each limiter requested. The longest
reset_time
for a failed limiter would be useful as well.The closest way to achieve this currently is querying each limiter with zero hits to see if they are all open, and only then sending another request to deduct hits from each limiter. The problem is that this operation is not atomic so they could have filled up between requests.
The text was updated successfully, but these errors were encountered: