Communications Server では、CPU の負荷に基づいて、受信 HTTP および SIP 要求を規制できます。
CPU 過負荷保護を有効にするには、cpu-overload-protection 属性を true に設定します。デフォルトでは、この値は false に設定されています。次のコマンドを使用して、この属性を設定します。
asadmin set config.overload-protection-service.cpu-overload-protection=true
過負荷保護の設定を表示するには、次のコマンドを使用します。
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 |
CPU 過負荷保護の属性は次のとおりです。
cpu-http-threshold - このしきい値を超えると、すべての受信 HTTP 要求が拒否され、503 応答が送信されます。
cpu-ir-threshold - このしきい値を超えると、初期受信 SIP 要求が拒否され、503 応答が送信されます。
cpu-sr-threshold - このしきい値を超えると、以降のすべての受信 SIP 要求が拒否され、503 応答が送信されます。
cpu-mm-threshold - このしきい値を超えると、すべての受信 HTTP 要求および SIP 要求が拒否されます。
cpu-overload-protection - CPU 過負荷保護が有効かどうかを指定します。
cpu-overload-activation-algorithm - CPU の過負荷状態を検出するアルゴリズムを指定します。有効な値は、CONSECUTIVE と MEDIAN です。
cpu-overload-deactivation-algorithm - CPU の過負荷状態の終わりを検出するアルゴリズムを指定します。有効な値は、CONSECUTIVE と MEDIAN です。
mm-threshold-http-wait-time - スレッドをプールに解放するまでに保持する期間を示します。この属性は、HTTP 要求の最大過負荷に関して使用されます。過負荷状態では、要求の処理にスレッドをすぐに利用できないため、システムの過剰な要求を減らすことができます。デフォルトは 2 秒です。
sample-rate - CPU 使用状況を測定する間隔。
number-of-samples - 要求の拒否と 503 応答の送信がトリガーされるまでに、CPU 使用状況がしきい値レベルを超える必要があるサンプル数。
retry-after-interval - CPU 使用状況を測定するまでの間隔。これは、503 応答の retry-after ヘッダーに設定される値です。
これらの値を表示および設定するには、管理コンソールで「設定」—>「過負荷保護」ノードを使用するか、asadmin get と set コマンドを使用します。
たとえば、cpu-mm-threshold プロパティーの値は、次のコマンドを使用して設定できます。
asadmin set config.overload-protection-service.cpu-mm-threshold =80