Apigee Edge - 4MV4D - Quota Policy - Distributed & Synchronous - S02E03

Hello Apigeeks,

Find out why Apigee Edge allows more than specified quota by default & how to apply strict quota limits for your API using Apigee Edge Quota Policy in this 4MV4D video.

Apigee Edge Policies executes in Message Processors during runtime of API traffic. Each trial org gets 2 message processors by default to handle traffic. In production environments you might also find more than 2 message processors to handle production traffic. Apigee router, Routes the traffic to different message processors based on some algorithms.

By default, In Quota Policy, Each message processor has individual counters. Whey you say 3 / minute as quota, Message Processor maintains it's own counter. That's the reason more than the quota is allowed by default.

If you would like to have strict quotas across API requests, You can use <Distributed> & <Synchronous> elements in Quota Policy to enforce strict quota limitations. It comes with a cost of very minimal performance imact which is almost negligible. When you set distributed element to true, Apigee Edge maintains global counter & when you set synchronous xml element to ture, It syncs global counter to message processors synchronously when quota policy gets executed.

Find the Quota policy code used in this 4MV4D below,

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Quota async="false" continueOnError="false" enabled="true" name="QP-QuotaDemo">
    <DisplayName>QP-QuotaDemo</DisplayName>
    <Properties/>
    <Allow count="3"/>
    <Interval>1</Interval>
    <TimeUnit>minute</TimeUnit>
    <Distributed>true</Distributed>
    <Synchronous>true</Synchronous>
</Quota>

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. Feel free to send your feedback/queries using comments below or Ask a question if you have any query. Stay tuned for more videos.

Comments
mohamedabdelma1
Bronze 1
Bronze 1

how many requests can be executed in this case (distributed is true and sync is true)

dchiesa1
Staff

It depends on the Allow count.

Version history
Last update:
‎03-02-2017 05:35 AM
Updated by: