Hello Apigeeks,
In this 4MV4D, Find out how rolling window Quota policy works in Apigee Edge hands-on. In general Quota policy works based on interval & resetting the Quota once the interval reaches the defined limit. For example, If you say 2 requests / minute. Quota counter resets start of every minute & If quota is exhausted within a minute error is raised in Apigee Edge.
In rolling window type, there is no quota reset after defined interval. It calculates quota dynamically on every request based on last window. For example, API requests comes to Apigee Edge at 08 : 30 AM & we are using rolling window quota of 3 requests / 2 hours. Apigee edge looks for how many API calls processed in last 2 hours window i.e number of API calls processed between 06 : 30 AM & 08 : 30 AM. If the count is more than or equal to 3 it raises Quota Limit violation error. If it’s less than 3, it allows requests to reach target server.
See Quota Policy used in this 4MV4D video below that shows Quota Policy rolling window in action.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Quota async="false" continueOnError="false" enabled="true" name="Quota-1" type="rollingwindow"> <DisplayName>Quota-1</DisplayName> <Properties/> <Allow count="3"/> <Interval>2</Interval> <Distributed>true</Distributed> <Synchronous>true</Synchronous> <TimeUnit>hour</TimeUnit> </Quota>
For example in normal Quota Policy let’s say 3 / 2 hours, Present time is 08 : 30 AM, Quota is applied based developer app
10 : 30 AM , Quota counter resets
Let’s see sample example in rolling window 3 / 2 hours, Present time in 08 : 30 AM
As you can see above, Difference between how normal quota policy & rolling window type quota policy works. Will this difference in behavior have any effect on backend systems? We don't know - that depends on what the backend system looks like. Surely the rolling window is more restrictive.
4MV4D videos are completely focussed on API Developers & Help you learn many interesting concepts very quickly using hands-on approach. Don't forget to subscribe to channel here & share same with your friends / colleagues who are interested in Apigee.
Feel free to send your feedback/queries using comments below or Ask a question if you have any query. Stay tuned for more videos.