Solved! Go to Solution.
<Quota name="MyQuota"> <Identifier ref="client.ip"/> <Interval>1</Interval> <TimeUnit>hour</TimeUnit> <Allow count="100"/> </Quota>
<Quota name="MyQuota"> <Identifier ref="client.ip"/> <Interval>1</Interval> <TimeUnit>hour</TimeUnit> <Allow count="100"/> </Quota>
@Madhumita Kumari , If above issue is resolved, Don't forget to hit "Accept" below the answer that fully addressed your question. This gives well-deserved reputation points to the person who answered. It also ensures that the next user with the same question will have the best answer at their fingertips.
It surely works, but there is a small catch(I tested for minutes and should be same for other units)
The TimeUnit is not the actual time when the first call is made. TimeUnit references the clock (current server time).
If I have to restrict 2 calls per minute, when I make a 2 call at 2:31:30 (hours:Minutes:Seconds), I cannot make another call until 2:32:00, but can make call at 2:32:01.
So this will not work for the fist time which is not a big deal for my scenario. It is amazingly simple considering the solution that I developed through Mashery, LOL.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |