Quota counters : what makes them distinct? Are there additional filters on top of the Identifier field?

1 0 670

Question: Say within an API bundle, we have 3 different flows (e.g., flow A, flow B, and flow C), and they all reference the same Quota policy named QuotaLimitPolicy. Are they really using separate counters for a given Identifier?

 Flow A is executed -> QuotaLimitPolicy is executed.  Result: "A counter" = 1
 Flow B is executed -> QuotaLimitPolicy is executed.  Result: "B counter" = 1
 Flow A is executed -> QuotaLimitPolicy is executed.  Result: "A counter" = 1 +1 = 2
 Flow C is executed -> QuotaLimitPolicy is executed.  Result: "C counter" = 1
 Flow A is executed -> QuotaLimitPolicy is executed.  Result: "A counter" = 2 +1 = 3

Answer: No, only 1 is maintained. Within a bundle, all references to the same policy use the same counter. In the example above, QuotaLimitPolicy is really a single counter for a given Identifier. So for a single Identifier (say, client_id = 10.10.10.10), the chain above would result in a single counter with a value of 5, one for each execution of QuotaLimitPolicy.

More generally, what makes a quota counter distinct in addition to the Identifier?

The distinction is at the policy name level per API bundle. If you want to create separate counters for various flows in the same bundle, you need to create separate policies with different"name=" attributes. Furthermore, I don't believe I can share a single quota counter across multiple API bundles for a given environment using the Quota policy.

These are not good or bad things, but rather, I'd like to bring awareness so that these are considered in solution designs.

Version history
Last update:
‎02-11-2015 10:45 AM
Updated by: