简体   繁体   中英

WSO2 API Manager - how to "reset" the api call count for an application

Product: WSO2 API Manager

version: 2.6.0.1

Use case:

We have defined throttling policies for some of our APIs, that are currently configured in a more lax manner than the one agreed upon with our clients.

The main reason is that we are still learning to use the tool, and although configuration seems ok, we are not sure of the "proper" way to stop throttling requests for a given subscription in case of issue.

For example:

a client calls one of our APIs with 2000 calls/min due to a bug on their side, 
while we have configured the throttling policy to 10000 calls/24hours.
in such a case, their requests will be throttled after 5 minutes, but even if they were to fix their
bug in the next hour, no new call would be pass through for the next 24 hours. 

If such case would occur, we currently see two options:

  • modify the API configuration, and increase the advanced throttling policy to accomodate more calls, but this would mean providing this increase to all the clients, and having to absorb the original excess in the calculation
  • create a new application for the client, and have it subscribed to the api

Neither option seems ideal to cater to the use case, so we've been searching for another approach, in the line of "reset" of the api call count for the given subscription.

Any pointer towards a documentation describing how to achieve this (or why one shouldn't) would be greatly appreciated.

I'm not sure api manager has the capability to reset the request count. But what you can do is define a conditional policy.

ie IP condition, header condition etc. If the specific condition is met, the throttling can be done based on the configured settings.

Please take a look at this documentation . This may help you in your case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM