View on GitHub

reno-svenska

https://medyassine098.github.io/reno-svenska

Spike Arrest

In SAP HANA Cloud Platform, API management we offer the spike arrest which protects the target system against a sudden spike in the traffic. The spike arrest throttles the number of the incoming request processed by the API Proxy. It is recommended to put this policy as the first policy in the API Proxy execution and attached to the PreFlow of the Proxy End Point flow.

This policy can be used with or without the quota policy. . Typically the target server are built assuming a certain load that it can safely handle, While the quota policy allows x number of calls in time period, the spike arrest policy allows to smooth the traffic that to target server.

Quota policy consists of the following elements:-

Element Description Example
Identifier The unique identifier for the quota, this can be used to set quota per developers. Spike Arrest counter per developer apikey <Identifier ref=”verifyapikey.apikeyaccess.client_id”/>
MessageWeight Used to specify the message weight for each calls. The default message weight is 1. The attribute ref can be used to specify a flow variable containing the message weight for the spike arrest. If both explicit weight and ref is specified then ref takes the priority. The possible ways to set it are as follows:- Messageweight of 2 for each message <MessageWeight>2</MessageWeight> Message weight as set in the header <MessageWeight ref=”request.header.weight” />
Rate Rate to which to limit the traffic spikes. It can specified as number of traffic calls per second or per minute Spike Arrest of 2 calls per minute <Rate>2pm</Rate> Spike Arrest of 2 calls per sec <Rate>2ps</Rate>

Click here to view more details on the Spike Arrest policy.

How to use the sample