Rate Limiting across Proxies in Apigee X - Shared Quota Counter

I will like to know if rate limiting is possible across multiple api proxies by leveraging shared counters.

For e.g. if we define the quota as 100 requests per minute based on an identifier in the request, would I be able to enforce quota across the platform using shared counters? e.g. proxies running across multiple environments within an environment group

Solved Solved
0 3 207
1 ACCEPTED SOLUTION

The problem with the API Product quota is, in fact, the default Quota counter includes the PROXY NAME, and the POLICY NAME as well as the PRODUCT NAME in the quota bucket identifier key.   Which means today, if you have 3 proxies, each with an independent Quota policy, then you will get three independent quota buckets and counters. 

There is an outstanding feature request to allow quotas shared across proxies. In other words, it simply omits the proxy name and policy name from the quota bucket identifier.  the internal reference for that feature request is b/149229963 . At this point a design for the implementation has been done, but the team has not committed to performing the work or including this feature into Apigee.  If you believe this is very important, then I suggest you connect with your account team, to communicate the importance and impact of this capability to them. This can help the product team to prioritize the work. 

In the meantime the workaround is to create a single common "Quota proxy" per API Product, and then have each API proxy call that Quota proxy, probably via LocalTargetConnection.  This will work, though it requires extra effort on your part.

View solution in original post

3 REPLIES 3

Hi Julian,

It sounds like what you are looking for is API Product Quota. You can group multiple proxies together in an API Product, then apply quota to the Product instead of the individual proxies.

The problem with the API Product quota is, in fact, the default Quota counter includes the PROXY NAME, and the POLICY NAME as well as the PRODUCT NAME in the quota bucket identifier key.   Which means today, if you have 3 proxies, each with an independent Quota policy, then you will get three independent quota buckets and counters. 

There is an outstanding feature request to allow quotas shared across proxies. In other words, it simply omits the proxy name and policy name from the quota bucket identifier.  the internal reference for that feature request is b/149229963 . At this point a design for the implementation has been done, but the team has not committed to performing the work or including this feature into Apigee.  If you believe this is very important, then I suggest you connect with your account team, to communicate the importance and impact of this capability to them. This can help the product team to prioritize the work. 

In the meantime the workaround is to create a single common "Quota proxy" per API Product, and then have each API proxy call that Quota proxy, probably via LocalTargetConnection.  This will work, though it requires extra effort on your part.

Hi Dino. Thanks for your answer. We were heading down the same path with the Quota Proxy and LocalTargetConnection with our implementation and it seems to work. I will reach out to my Google rep to see if they can prioritize this feature soon