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.