Quota policy violation does not work, even with distributed and synchronous

I created a quota policy and attached it to pre-flow for one of my test case. I followed your videos and did the same.

I have set the counter to 3 and turn on distributed and sync as true.

Still in the trace session i can see that it does not restrict it to 3 only. sometimes it goes to 5 or 6 and shows status as 429 and after that randomly it shows 200 and sometimes 429.

Please find the snippet

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Quotaasync="false"continueOnError="false"enabled="true"name="Quota-1"><DisplayName>Quota-1</DisplayName><Properties/><Allowcount="3"/><Interval>1</Interval><Distributed>true</Distributed><Synchronous>true</Synchronous><TimeUnit>hour</TimeUnit></Quota>
,

Hi I have followed your videos and applied a quota policy with distributed and sync for one of my test case.

I don't see it working. even with the count as 3 it goes to 5-6 sometimes and shows 429 afterwards but again when i send it shows 200 again and 429 again randomly.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Quotaasync="false"continueOnError="false"enabled="true"name="Quota-1"><DisplayName>Quota-1</DisplayName><Properties/><Allowcount="3"/><Interval>1</Interval><Distributed>true</Distributed><Synchronous>true</Synchronous><TimeUnit>hour</TimeUnit></Quota>
0 2 281
2 REPLIES 2

Hi @Umit Bhargava, there is nothing wrong in the quota configuration(apart from the spaces). If you are using Apigee Free Cloud Account, then in some rare cases the policy allows more than the mentioned amount of calls. In that case, just try to undeploy & redeploy the proxy. Then it will strictly follow per quota config.

I think it happens due to the MP's associated with free orgs.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Quota async="false" continueOnError="false" enabled="true" name="Quota-1">
    <DisplayName>Quota-1</DisplayName>
    <Properties/>
    <Allow count="3"/>
    <Interval>1</Interval>
    <Distributed>true</Distributed>
    <Synchronous>true</Synchronous>
    <TimeUnit>minute</TimeUnit>
</Quota>

Hi @Siddharth Barahalikar Thanks for the quick response.

I was also doubting that it could be related to MPs associated with free orgs but if we are using Distributed and Synchronous tags with "true" values. The number of MPs shouldn't matter i guess??

Also i have tried to undeploy and deploy the proxy again but it still gives random status.

3 times 200 then 429 then again 200 and then again 429..429.. 200..

I still believe it should be related to MPs but not sure then what is the use of applying distributed and synchronous. 😞