Communications Server provides the overload protection feature to protect systems from overload situations. A typical form of overload protection/load regulation is to reject certain types of requests when the load increases. Depending on the overload situation, certain requests are prioritized and certain requests are rejected to decrease the load in the system. In an overload situation, for instance, Communications Server could reject new SIP sessions so that ongoing sessions are prioritized.
You can view and configure Overload Protection Service by using the Configuration —> Overload Protection node in the Admin Console or the asadmin get and set commands.
For overload protection to work in Communications Server,
Set the enabledattribute to true. By default, this value this set to false. Use the following command to set this property:
asadmin set config.overload-protection-service.enabled=true
The use of the following properties are deprecated in Communications Server 2.0. config.sip-container.property.olpInserted, config.sip-container.property.CPUOverLoadRegulationand config.sip-container.property.MemOverLoadRegulation. Use the attributes of the overload-protection-service element instead of these properties.
In addition to setting this attribute, you need to enable one of the following types of overload protection:
Communications Server enables you to regulate incoming HTTP and SIP requests based on the CPU load.
To enable CPU overload protection, set the cpu-overload-protection attribute to true. By default, this value this set to false. Use the following command to set this attribute:
asadmin set config.overload-protection-service.cpu-overload-protection=true
To view the Overload Protection settings, use the following command:
asadmin get config.overload-protection-service.*
config1.overload-protection-service.cpu-http-threshold = 70 config1.overload-protection-service.cpu-ir-threshold = 70 config1.overload-protection-service.cpu-mm-threshold = 99 config1.overload-protection-service.cpu-overload-activation-algorithm = MEDIAN config1.overload-protection-service.cpu-overload-deactivation-algorithm = CONSECUTIVE config1.overload-protection-service.cpu-overload-protection = true config1.overload-protection-service.cpu-sr-threshold = 90 config1.overload-protection-service.number-of-samples = 5 config1.overload-protection-service.retry-after-interval = 10 config1.overload-protection-service.sample-rate = 2 |
The CPU Overload Protection attributes provide the following uses:
cpu-http-threshold - All incoming HTTP requests are rejected and 503 responses are sent out, when this threshold is exceeded.
cpu-ir-threshold - Initial incoming SIP requests are rejected and 503 responses are sent out when this threshold is exceeded.
cpu-sr-threshold - All incoming subsequent SIP requests are rejected and 503 responses are sent out, when this threshold is exceeded.
cpu-mm-threshold - All incoming HTTP and SIP requests are rejected when this threshold is exceeded.
cpu-overload-protection - Specifies if CPU overload protection is enabled.
cpu-overload-activation-algorithm - Specifies the algorithm used for detecting a CPU overload situation. Valid values are CONSECUTIVE and MEDIAN.
cpu-overload-deactivation-algorithm - Specifies the algorithm used for detecting the end a CPU overload situation. Valid values are CONSECUTIVE and MEDIAN.
mm-threshold-http-wait-time - Denotes the interval for which the thread is held before being released back to the pool. This attribute is used in the context of maximum overload for HTTP requests. Under overload, the threads are not immediately available to process requests, thereby contributing to the reduction of congestion in the system. Default is 2 seconds.
sample-rate - Interval or periodicity of the measurement of CPU usage.
number-of-samples -Number of samples that the CPU usage has to be above the threshold level to trigger an action of either dropping the request or sending 503 responses.
retry-after-interval -Interval or periodicity after which the CPU usage is measured. This is the value that is set in the retry-after header in the 503 response.
To view and set these values, you can use the Configuration —> Overload Protection node in the Admin Console or the asadmin get and set commands.
For example, you can use the following command to set the value of the cpu-mm-threshold property:
asadmin set config.overload-protection-service.cpu-mm-threshold =80
Communications Server enables you to regulate incoming HTTP and SIP requests based on the memory usage.
To enable memory overload protection, set the memory-overload-protection attribute to true. By default, this value this set to false. Use the following command to set this attribute:
asadmin set config.overload-protection-service.memory-overload-protection=true
Memory Overload Protection attributes of the Overload Protection Service are as follows:
config1.overload-protection-service.mem-http-threshold = 85 config1.overload-protection-service.mem-ir-threshold = 85 config1.overload-protection-service.mem-mm-threshold = 99 config1.overload-protection-service.mem-overload-activation-algorithm = MEDIAN config1.overload-protection-service.mem-overload-deactivation-algorithm = CONSECUTIVE config1.overload-protection-service.mem-sr-threshold = 85 config1.overload-protection-service.memory-overload-protection = false config1.overload-protection-service.mm-threshold-http-wait-time = 2 config1.overload-protection-service.number-of-samples = 5 config1.overload-protection-service.retry-after-interval = 10 config1.overload-protection-service.sample-rate = 2 |
You can configure the following threshold levels:
mem-http-threshold - All incoming HTTP requests are rejected and 503 responses are sent out, when this threshold is exceeded.
mem-ir-threshold - Initial incoming requests are rejected and 503 responses are sent out when this threshold is exceeded.
mem-mm-threshold - All incoming HTTP and SIP requests are rejected when this threshold is exceeded.
mem-overload-protection - Specifies if memory overload protection is enabled.
mem-overload-activation-algorithm - Specifies the algorithm used for detecting a memory overload situation. Valid values are CONSECUTIVE and MEDIAN.
mem-overload-deactivation-algorithm - Specifies the algorithm used for detecting the end a memory overload situation. Valid values are CONSECUTIVE and MEDIAN.
mm-threshold-http-wait-time - Denotes the interval for which the thread is held before being released back to the pool. This attribute is used in the context of maximum overload for HTTP requests. Under overload, the threads are not immediately available to process requests, thereby contributing to the reduction of congestion in the system. Default is 2 seconds.
sample-rate - Interval or periodicity of the measurement of memory usage.
number-of-samples - Number of samples that the memory usage has to be above the threshold level to trigger an action of either dropping the request or sending 503 responses.
retry-after-interval - Interval or periodicity after which the memory usage is measured. This is the value that is set in the retry-after header in the 503 response.