Setting different Quota Policies for each consumer (DevApp)

Not applicable

Hi,

We are trying to implement consumer specific quota policies on our API products. We need to set different values of quota policies for different consumers.

For example, Consumer1 can only make 10,000 API hits per day, and Consumer2 can only make 25,000 hits per day.

One of the ways to achieve this is to set Custom Attributes on the DevApp, and them pull them dynamically into the quota policy, but this does not seem to be extensible because of the following:

There is also a requirement that the quota limit needs to be specific to the product that the consumers want to consume. For example:

Consumer1 -- > can make 10,000 hits on ProductA

Consumer1 -- > can make 5,000 hits on ProductB

Consumer2 -- > can make 25,000 hits on ProductA

Consumer2 -- > can make 1,000 hits on ProductB

So, the only way to achieve this would be to retain "Consumer.Product" attributes on the DevApp, but maintaining those could soon become an issue.

Also having the values on the DevApp as custom attributes makes this a not-so-elegant solution.

Is there a better way to handle the above use case on Apigee?

-Thanks

3 3 368
3 REPLIES 3

@Raju ,

Great Question, I believe developer portal comes into the rescue for maintaining above configs & building workflows. Have you ever considered implementing above solution in Apigee Developer Portal ?

Though it's not out of the box feature in portal , You can easily build screens so that portal admin can seamlessly manage above configurations for each consumer or consumer role by implementing custom workflows in portal. Let me know what do you think about same.

Hi Anil,

We do not currently have the developer portal procured yet. What's the best way to handle this without the Developer Portal being in place?

-Thanks

The way to handle this most simply is to group consumers into sets.

Set the quota not as a custom attribute on the consumer, but as a custom attribute on the API product.

Consumer Product Quota limit ...for Proxy
Consumer1 ProductA1 10000 ProxyA
ProductB1 5000 ProxyB
Consumer2 ProductA2 25000 ProxyA
ProductB2 1000 ProxyB

This assumes that when you provision Consumer3, it would fit into one of those categories.

if you don't like being constrained, and there really is no grouping... in other words, Consumer3 might get 3000 of one Product and 14000 of another, while Consumer4 would get 4200 of one Product, and 7300 of another, ... then... I see no other possibility than specifying those quota limits as individual custom attributes on each developer app. There is no way to simplify the solution to the problem, if you define your requirements that way.