I am using a quota policy as below.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Quota async="false" continueOnError="false" enabled="true" name="CopperQuota" type="calendar"> <DisplayName>CopperQuota</DisplayName> <Properties/> <Identifier ref="app.name"/> <Allow countRef="actualLimit"/> <StartTime>2017-2-23 12:00:00</StartTime> <Interval>5</Interval> <TimeUnit>minute</TimeUnit> <Distributed>true</Distributed> <Synchronous>true</Synchronous> </Quota>
I have a requirement to send the current count in response. I am using js policy for this as below.
context.setVariable("CopperCount", parseInt(context.getVariable("ratelimit.CopperQuota.used.count")));
But I have observed that the count is inconsistent though I am triggering multiple requests within the 5 minute window. Is this an Apigee issue. Please confirm
Can you give us more details regarding "count is inconsistent though I am triggering multiple requests" ?
Like what time do you see the count mismatch ? Can you give an example with GMT time ? Don't just go by trace, trace doesn't show first in first display order.
It's been three weeks, is this still an issue for you? Still an open question?
No @Dino. This didnot occur again. Thanks
ok, thank you!
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |