update quota for any service failure

Hi,

I want to update my quota limit if i receive any failure like 500 or 503 from my service endpoint.

How can i achieve this functionality?

Solved Solved
0 7 143
1 ACCEPTED SOLUTION

@Ankur Jain

I again have a different opinion. I agree the count need to be addressed, but as a service provided you should be providing highly available service. So these exception helps you improve your services. However for your use case, probably Reset Quota policy will help. Check out this post too

View solution in original post

7 REPLIES 7

@Ankur Jain - why would you want to do that ? If you have that logic built, it will be applicable for every client using that endpoint. Why don't you just increase the quota limit in the first place then ? I think you should get such exception so that you can analyze the calls being made by your clients

@Sai Saran Vaidyanathan - Suppose i allowed client for 100 requests, but somehow my service gave 500 response for 10 requests, then in that case, the quota of client should not be exhausted as he did only 90 successful requests and 10 requests failed due to service failure

Not applicable

in this case, you could try to use quota policy on the response flow and execute it on some condition e.g if you recieve a succesful response, execute and if not then skip.

@Ilyas shah can quota policy be executed on a basis on some condition? i am new to apigee,so i want to find a way to do that

yes off course it can be, see the attachment below and also read the docs thoroughly, everything is mentioned there.

6775-screenshot-from-2018-04-19-15-24-28.png

I would not recommend that as you need to include calls for non 200 responses as well (like 4xx). Please look at my answer below if that helps

@Ankur Jain

I again have a different opinion. I agree the count need to be addressed, but as a service provided you should be providing highly available service. So these exception helps you improve your services. However for your use case, probably Reset Quota policy will help. Check out this post too