Call rate limit allows too many calls

Not applicable

Hi!

I have encountered strange behavior of my call rate limit policy.Policy looks like that:

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

From what I understand, it setup limit to 1 request per 1 minute. It's not distributed and there is a PreciseAtSecondsLevel flag set to true, so counter should be updated almost immediately, right?

I am testing it using API console, and transactions history looks like that:

1457-callstrace.png

Here is the full trace session log file: trace-1446810127673.txt

Why call rate limit policy do not work as I expected?

Cheers, Tomas

Solved Solved
2 3 345
1 ACCEPTED SOLUTION

@Tomasz Korecki , Are you on free account ? If Yes, each org has two message processors & it may result in multiple calls. Can you try using distributed true ?

Distributed element :

Set to true to specify that a central counter should be maintained and continuously synchronized across all Apigee Edge message processors.

For example, if the quota limit is 10 messages per hour and 2 message processors are being used, the quota count total is continuously updated on both message processors.

View solution in original post

3 REPLIES 3

@Tomasz Korecki , Are you on free account ? If Yes, each org has two message processors & it may result in multiple calls. Can you try using distributed true ?

Distributed element :

Set to true to specify that a central counter should be maintained and continuously synchronized across all Apigee Edge message processors.

For example, if the quota limit is 10 messages per hour and 2 message processors are being used, the quota count total is continuously updated on both message processors.

Thanks, it worked! Yes, I am on the free account. However, how it was possible that more than two requests passed?

Because, We have two message processors by default on free orgs, where it will take some time to get sync between these two. So, It many take more than one due to more than one message processors. That's the reason we have distributed setting in Quota policy.