Hi guys, when I am trying to use a Quota policy with below config, it doesn't restrict anything as it allows unlimited calls,
<Quota name="Quota-1" enabled="true" continueOnError="false" async="false"> <DisplayName>Quota-1</DisplayName> <Properties/> <Allow count="2"/> <Interval>1</Interval> <Distributed>true</Distributed> <Synchronous>true</Synchronous> <TimeUnit>minute</TimeUnit> </Quota>
but when I use below config with ref tags, it is working fine (allowing 2 calls pm)
<Quota name="Quota-1" enabled="true" continueOnError="false" async="false"> <DisplayName>Quota-1</DisplayName> <Properties/> <Allow countRef="request.header.allowed_quota" count="2"/> <Interval ref="request.header.quota_count">1</Interval> <Distributed>true</Distributed> <Synchronous>true</Synchronous> <TimeUnit ref="request.header.quota_timeout">minute</TimeUnit> </Quota>
I know we can use ref tag to get the values from API Product. But as far as I remember both the above configs should be working right?
Solved! Go to Solution.
I tested your first configuration and it's working just fine for me. After the first 2 calls, further invocations are rejected until a minute passes.
I tested your first configuration and it's working just fine for me. After the first 2 calls, further invocations are rejected until a minute passes.
I have tested it now, it is working fine.
Yesterday it was allowing unlimited calls. May be some issue with Trail account MP.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |