Quota policy not working in apigee eval version

Not applicable

I have created the below Quota policy and attached it to the pre-flow. Deployed the proxy into the eval test server. However when I test it I am not able to see any restriction in the no of requests. It accepts as many as 10 requests and all go through successfully. Please let me know what I am doing wrong or any issue.

<Quota name="Quota-1"> <Allow count="3"/> <Interval>1</Interval> <TimeUnit>minute</TimeUnit> </Quota>

Solved Solved
0 5 694
1 ACCEPTED SOLUTION

sidd-harth
Participant V

Hi @Krishna Seetharaman, try using this policy config,

<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>

It happens because of Message Processors, please check the docs,

https://docs.apigee.com/api-platform/reference/policies/quota-policy#distributed

View solution in original post

5 REPLIES 5

sidd-harth
Participant V

Hi @Krishna Seetharaman, try using this policy config,

<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>

It happens because of Message Processors, please check the docs,

https://docs.apigee.com/api-platform/reference/policies/quota-policy#distributed

Hi Siddharth

Thanks for your reply. The above configuration seem to be working.

Kindly accept the answer, if it works for you 🙂

Hi Siddharth, It is working with your solution. Do you know why it's necessary that configuration? thanks in advance.

It's because of the message processors. You expect it to work with distributed set to true. There's a great article on the apigee documentation here that explains the cause

https://docs.apigee.com/api-platform/antipatterns/non-distributed-quota