How to does Quota and Spike Arrest policy work when in a shared flow?.

So, I have a Spike arrest policy Rate of 200ps in a shared flow. And this shared flow is being used across all 16 (sixteen) Proxy endpoints to which 4 Proxy endpoints could be in one API proxy. . Will the counter be counter per proxy endpoint, or will it be for that entire app be 200ps, regardless of what proxy endpoint it is or something else?. It's just that I want it a single policy in a shared flow as all our endpoints has the same quota and spike arrest limit. If I put it in a share flow, how will the spike arrest and quota policy count if I have a Api Proxy that has multiple proxy endpoints (each of this proxy endpoints has pre-flows and uses the same shared flow?

Below is the code for my spike and quota policy..

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<SpikeArrest async="false" continueOnError="false" enabled="true" name="GlobalSpikeArrestPolicy">
    <DisplayName>Global Spike Arrest</DisplayName>
    <Rate>200pm</Rate>
</SpikeArrest>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Quota async="false" continueOnError="false" enabled="true" name="Global-Quota-Policy" type="flexi">
    <DisplayName>Global Quota Policy</DisplayName>
    <Properties/>
    <Allow count="200"/>
    <Interval>1</Interval>
    <TimeUnit>minute</TimeUnit>
</Quota>

PS:
I mean API proxy the way you could see it on the >Develop> API proxis
And endpoints by having multiple Proxy Endpoints in a Proxy.
I also place the shared flow in all of the pre-flows of this proxy endpoints. So I have multiple Proxy Endpoints in my Proxy.

Solved Solved
0 1 483
1 ACCEPTED SOLUTION

Both Spike Arrest / Quota will count against everything in the App (I think since it's in the shared flow, it might be per-proxy) regardless of proxy endpoint.

You can use the <Identifier> tag on either / both policies to split calls into custom buckets based on whatever variable you like - including a variable which represents the proxy endpoint you plan to connect to.

View solution in original post

1 REPLY 1

Both Spike Arrest / Quota will count against everything in the App (I think since it's in the shared flow, it might be per-proxy) regardless of proxy endpoint.

You can use the <Identifier> tag on either / both policies to split calls into custom buckets based on whatever variable you like - including a variable which represents the proxy endpoint you plan to connect to.