Software AG Products 10.5 | Using API Gateway | Policies | System-defined Stages and Policies | Traffic Monitoring | Throttling Traffic Optimization
 
Throttling Traffic Optimization
This policy limits the number of service invocations during a specified time interval, and sends alerts to a specified destination when the performance conditions are violated. You can use this policy to avoid overloading the back-end services and their infrastructure, to limit specific clients in terms of resource usage, and so on.
The Throttling Traffic Optimization policy generates two types of events when the specified limit is breached, policy violation event and monitor event. The policy violation event is for indicating the violations that occur for an API. If there are 100 violations, then 100 policy violation events are generated. The monitor event triggered by this policy is controlled by the alert frequency configuration specified in the policy.
The table lists the properties that you can specify for this policy:
Parameter
Description
Limit Configuration.
Rule name
Specifies the name of throttling rule to be applied. For example, Total Request Count.
Operator
Specifies the operator that connects the rule to the value specified.
Select the operator: Greater Than. For example, in this case the throttling rule is applied when the Total Request Count is greater than (exceeds the limit specified for) the value specified in the Value field.
Value
Specifies the value of the request count beyond which the policy is violated.
When multiple requests are made at the same time, it might be possible that this limit applied to trigger an alert is not strictly adhered to. There is no loss observed in the invocation counts data, but there might be a minor delay in aggregating the count. The invocation count gets incremented, only when API Gateway receives the response from the native API. For example, if you have set the limit at 5 with an interval alert of 1 minute and if you invoke 5 requests in parallel, out of which for 1 of the request the native API delays sending the response to API Gateway. In such cases, the invocation count would still be 4 as the native API is yet to send the response to API Gateway. There is a minor delay in aggregating the count due to native API response delay. Hence, API Gateway allows additional invocation. However, when the invocation count exceeds 5 an alert is triggered.
Destination
Specifies the destination to log the alerts.
Select the required options:
*API Gateway
*API Portal
*CentraSite
Note:
This option is applicable only for the APIs published from CentraSite to API Gateway.
*Digital Events
*Elasticsearch
*Email (you can add multiple email addresses by clicking ).
Note:
If an email alias is available, you can type the email alias in the Email Address field with the following syntax, ${emailaliasname}. For example, if test is the email alias, then type ${test}.
*JDBC
*Local Log: You can select the severity of the messages to be logged (logging level) from the Log Level drop-down list. The available log levels are ERROR, INFO, and WARN.
Note: 
*Set the Integration Server Administrator's logging level for API Gateway to match the logging levels specified for the run-time actions (go to Settings > Logging > Server Logger). For example, if a Log Invocation action is set to the logging level of Error, you must also set Integration Server Administrator's logging level for API Gateway to Error. If the action's logging level is set to a low level (Warning-level or Information level), but Integration Server Administrator's logging level for API Gateway is set to a higher level (Error-level), then only the higher-level messages are written to the log file.
*Entries posted to the local log are identified by a product code of YAI and suffixed with the initial alphabet of the logging level selected. For example, for an error level, the entry appears as [YAI.0900.0002E].
*SNMP
Alert Interval
Specifies the interval of time for the limit to be reached.
Unit
Specifies the unit for the time interval in minutes, hours, days, or weeks for the alert interval.
Alert Frequency
Specifies the frequency at which the alerts are issued and the monitor events are logged.
Specify one of the options:
*Only Once. Triggers an alert every time the specified condition is violated and logs a monitor event for the alert interval specified.
*Every Time. Triggers an alert every time the specified condition is violated and logs multiple monitor events based on the number of API invocations.
Alert Message
Specifies the text message to be included in the alert.
Consumer Applications
Specifies the application to which this policy applies.
You can type a search term to match an application and click to add it.
You can add multiple applications or delete an added application by clicking .