Concurrent Rate Limit per API Key

Not applicable

Hi, I found in the docs that Quota can be assigned per API Key, but what I really need is assigning Concurrent Rate Limit per API Key. Can it be done?

Thanks in advance

0 3 329
3 REPLIES 3

Not applicable

@Petra Budi Karunia

No, it's not. Similar question and possible solution has been discussed here.

As similar requirement has come twice within a week time, this scenario seem to be interesting one. Could you provide detail about the use case.

what I really need is assigning Concurrent Rate Limit per API Key

Are you sure you need that?

Limiting by api key is not the purpose of the Concurrent Rate Limit policy. But we still might find a path to joy. If you describe your requirements in more detail, we might be able to help you find a solution.

You might look into using ResetQuota to mimic a concurrent rate limit. Quota of 1 per day or something like that, and on response flow use reset quota to bring it back to 1. You'd have to think about non-happy path and race conditions to ensure you didn't block calls when you shouldn't, etc.