As a part of one requirement , I want to apply spike arrest policy at resource level. We have different spike arrest rates for different resources. I used the Java script policy to set the rate in a variable based on the resource pathsuffix. And referred the variable in the rate of the spike arrest policy. The rate is getting set properly. However, the “ratelimit.OpLevel_SpikeArrest_Throttle.allowed.count” is not getting set properly. It remains same even though I trigger the request for some other resource with different rate settings. Due to this my requests are failing sometime.
I want to set 10 TPS for 3 resources individually.
So,if I set 10TPS for Spike arrest,then I guess each resource will not be satisfied with the condition 10TPS for each.Because this 10TPS is shared by resources.
If I set 30TPS for Spike arrest,then even 1 resource can violate the SLA with 30TPS instead of 10TPS.
If I use option with proxy.pathsuffix,what should be the message weight I need to give for this scenario?
If you want to set 10ps for each resource then setting the identifier tag with proxy.pathsuffix and rate as 10ps should do. MessageWeight need not be set for this scenario.
Is it fine to have a spike arrest policy with Identifier as a combination of client ip address and resource path. My requirement is to arrest continues requests from an ip address to the resources defined in proxy.