...
Property | Description | |||||||||||
Quota | Specifies the number of request messages that an application is allowed to submit to an API per hour/day/week/month. | |||||||||||
Quota Identifier | For the Quota policy to work, each application requires a unique identifier to be presented with each request. The identifier can be customized. It can be any HTTP header, query parameter, form parameter, or message content that is unique to each consumer application. | |||||||||||
Weight | Assignsweightto Assigns weight to specific messages to increase/decrease the impact of request messages over other messages. For example, it can consider POST messages twice as "heavy" or expensive asGETmessages.
| |||||||||||
Distributed option | This option is used to fetch data from the distributed database (Cassandra). If disabled, it fetches data from the cache memory in the local machine. | |||||||||||
Synchronous
| Specifies that the remaining quota value gets updated after every call. This option is suggested when the quota value is a hard limit to the number of calls that can be made. The Synchronous option gets enabled when the Distributed option is enabled.
| |||||||||||
Re-sync Interval | Specifies the time that the system waits for before rechecking the availability of quota for the user. The Re-sync Interval option gets enabled when the Synchronous option is disabled.
|
...
The number of requests that have to be processed for a project is obtained by dividing 'WeightQuota' with by 'QuotaWeight'. As per the configuration below, Quota/Weight equals to ‘5’. Therefore, the maximum number of requests processed per hour is ‘5’.
- Quota :
- Type: COSTANTCONSTANT
- Default Value: 10/1/hour
- Quota Identifier:
- Type: CONTEXT_VARIABLE
- Variable Name: api.developer.id
- Default Value: default
- Weight:
- Type: COSTANTCONSTANT
- DefaultValue: 2
Figure 11: Quota policy properties with values provided in Example 2
...