すべてのプロダクト
Search
ドキュメントセンター

API Gateway:スロットルプラグイン

最終更新日:Jul 31, 2024

このトピックでは、スロットリングプラグインの設定について説明し、いくつかの一般的なシナリオの例を示します。

1. 概要

  • スロットリングプラグインは、API、アプリケーション、アプリケーション所有者、または別のカスタムパラメータに基づいてトラフィックを制御するために使用されます。 アプリケーションのAppKeysに基づいて、アプリケーションのトラフィックを制御できます。

  • スロットリングプラグインは、2つの設定テンプレートをサポートします。

    • パラメーターベースのスロットリングの設定テンプレート: このテンプレートは、カスタムパラメーターベースのスロットリングの設定に使用されます。

    • 基本スロットリングの構成テンプレート: このテンプレートは、API Gatewayコンソールのスロットリング機能と互換性があります。

  • スロットリング機能は、プラグインシステムに統合されています。 元のスロットリングインターフェイスとコンソールはまだ使用中です。 スロットリングポリシースロットリングプラグインは、同じプラグインタイプに属します。 スロットリングプラグインをAPIにバインドすると、このAPIにバインドされているスロットリングポリシーが無効になります。

  • 元のスロットリングインターフェイスまたはコンソールでスロットリングポリシーを作成または変更すると、変更内容はプラグインシステムに同期されます。 ただし、プラグインシステムで行った変更は、スロットリングインターフェイスまたはコンソールと同期できません。

2. 基本的なスロットル設定

2.1 スロットル機能

2.1.1 スロットルしきい値

  • APIレベルのスロットリングしきい値: 特定の単位時間内にAPIを呼び出すことができる最大回数。 この時間の単位は、秒、分、時間、または日とすることができる。 たとえば、このしきい値を1分あたり5,000回に設定できます。

  • アプリケーションレベルのスロットリングしきい値: 特定の単位時間内に各アプリケーションがAPIを呼び出すことができる最大回数。 たとえば、このしきい値を1時間あたり50,000回に設定できます。

  • ユーザーレベルのスロットリングしきい値: 特定の単位時間内に各Alibaba CloudアカウントがAPIを呼び出すことができる最大回数。 Alibaba Cloudアカウントに複数のアプリケーションがある場合があります。 このスロットリングしきい値は、このアカウント内のすべてのアプリケーションが開始できるAPI呼び出しの総数に適用されます。 たとえば、このしきい値を1日あたり500,000回に設定できます。

説明

1つのスロットリングプラグインで、前述のすべてのしきい値を同時に指定できます。 ユーザーレベルの調整しきい値をAPIレベルの調整しきい値より大きくすることはできません。また、アプリケーションレベルの調整しきい値をユーザーレベルの調整しきい値より大きくすることはできません。

特別なアプリケーションやユーザーをスロットルポリシーに追加することもできます。 このようにして、アプリケーションまたはユーザーごとに特別なスロットルしきい値を設定できます。 特別なスロットリングしきい値は、APIレベルのスロットリングしきい値より大きくすることはできません。

2.1.2 時間単位とスロットルアルゴリズム

スロットリングプラグインは、スロットリングの時間単位として秒、分、時間、日をサポートします。 時間単位として分、時間、または日が使用される場合、固定時間窓アルゴリズムが使用されます。 秒を時間単位として使用すると、ビジネス要件に基づいて、デフォルトのトークンバケットアルゴリズムを固定時間ウィンドウアルゴリズムに変更できます。 次の項目は、アルゴリズムについて説明します。

  • トークンバケットアルゴリズム: 秒が時間単位として使用されるときに使用されるデフォルトのアルゴリズム。 このアルゴリズムには、トークンバケットと待機キューの2つの概念が含まれます。 API Gatewayは定期的にトークンをトークンバケットに発行します。 リクエストは、API Gatewayで処理する前に、バケットからトークンを取得する必要があります。 トークンの取得に失敗した場合、トークンが利用可能になったときに優先的にトークンが割り当てられるようにキューで待機します。 キューがいっぱいになると、後続の要求に対して429コードが返されます。 発信者のリクエストをキューで待機させない場合は、blockingMode: QUICK_RETURNパラメーターを設定できます。この場合、システムはキューで待機させずにトークンを取得できないリクエストの429を直接返します。

  • 固定時間ウィンドウアルゴリズム: 時間、時間、または日が時間単位として使用されるときに使用されるアルゴリズム。 このアルゴリズムは、単位時間内に受け入れられる要求の総数を制限する。 たとえば、1分あたり1,000リクエストの制限は、制限を超えるリクエストに対して429コードが返されることを指定します。 要求カウントは、次の1分の初めにリセットされる。

2.2 基本的なスロットリングプラグインの設定

スロットリングプラグインをJSONまたはYAML形式で設定できます。 2つの形式は同じスキーマを持ち、変換ツールを使用して互いに変換できます。 次のコードでは、YAML形式のプラグイン構成テンプレートについて説明し。

---
unit: SECOND         # The unit of time. Valid values: SECOND, MINUTE, HOUR, and DAY.
apiDefault: 1000     # The default API-level throttling threshold.
controlMode: FIX_WINDOW  # Specifies that the fixed time window algorithm is used when the time unit is second.
blockingMode: QUICK_RETURN     # Specifies that 429 is returned for requests that fail to obtain a token when the token bucket algorithm is used.
userDefault: 30      # Optional. The default user-level throttling threshold. If you set this threshold to 0, user-level throttling is not performed. The user-level throttling threshold cannot be greater than the API-level throttling threshold.
appDefault: 30       # Optional. The default application-level throttling threshold. If you set this threshold to 0, application-level throttling is not performed. The application-level throttling threshold cannot be greater than the user-level throttling threshold.
specials:            # Optional. The special throttling settings. You can set throttling thresholds for special applications or users in a throttling policy.
  - type: "APP"      # The special throttling type. The value APP specifies that throttling is performed for special applications based on their AppKeys.
    policies:
    - key: 10123123  # The application ID. You can obtain the ID of an application from the application details page. To go to this page, choose Call API > Apps in the left-side navigation pane of the API Gateway console and click the name of the application in the application list.
      value: 10      # The special throttling threshold for the application. This threshold cannot be greater than the user-level throttling threshold in the throttling policy.
    - key: 10123123  # The application ID.
      value: 10      # The special throttling threshold for the application. This threshold cannot be greater than the user-level throttling threshold in the throttling policy.
  - type: "USER"     # The special throttling type. The value USER specifies that throttling is performed for special Alibaba Cloud accounts.
    policies:
    - key: 123455    # The ID of an Alibaba Cloud account. You can move the pointer over the profile picture in the upper-right corner of the Alibaba Cloud console to obtain the ID.
      value: 100     # The special throttling threshold for the Alibaba Cloud account. This threshold cannot be greater than the API-level throttling threshold in the throttling policy.

2.3 プラグインデータセットと基本的なスロットリングプラグインを一緒に使用する

2.3.1 プラグインデータセットの作成

  1. API Gatewayコンソールにログインします。 左側のナビゲーションウィンドウで、[APIの管理] > [プラグイン] を選択します。 次に、[カスタムデータセット] タブをクリックします。

  2. 右上隅の [データセットの作成] をクリックします。 表示されるダイアログボックスで、データセットの名前を指定し、データセットタイプに [TRAFFIC_CONTROL_POLICY] を選択し、[確認] をクリックします。

  3. [カスタムデータセット] タブで、作成したデータセットをクリックします。 データセットの詳細ページで、右上隅の [データセットエントリの作成] をクリックします。 表示される [データセットエントリの作成] ダイアログボックスで、キー、値、および有効期間のパラメーターを指定します。 Keyパラメーターには、アプリケーションまたはAlibaba CloudアカウントのIDを入力する必要があります。 Valueパラメーターには、スロットリングしきい値を入力する必要があります。

2.3.2 スロットリングプラグインのプラグインデータセットの使用例

基本的なスロットリングプラグインは、プラグインデータセットをサポートします。 プラグインデータセットを使用して、特定のアプリケーションまたはアカウントに特別なスロットリングしきい値を設定できます。 例:

---
unit: SECOND         # The unit of time. Valid values: SECOND, MINUTE, HOUR, and DAY.
apiDefault: 1000     # The default API-level throttling threshold.
userDefault: 30      # Optional. The default user-level throttling threshold. If you set this threshold to 0, user-level throttling is not performed. The user-level throttling threshold cannot be greater than the API-level throttling threshold.
appDefault: 30       # Optional. The default application-level throttling threshold. If you set this threshold to 0, application-level throttling is not performed. The application-level throttling threshold cannot be greater than the user-level throttling threshold.
specials:            # Optional. The special throttling settings. You can set throttling thresholds for special applications or users in a throttling policy.
  - type: "APP"      # The special throttling type. The value APP specifies that throttling is performed for special applications based on their AppKeys.
    policyDatasetId: 87 b65008e92541938XXXXXXXX6eda5 # The ID of the plug-in dataset.
    policies:
    - key: 10123123  # The application ID. You can obtain the ID of an application from the application details page. To go to this page, choose Call APIs > Apps in the left-side navigation pane of the API Gateway console and click the name of the application in the application list.
      value: 10      # The special throttling threshold for the application. This threshold cannot be greater than the user-level throttling threshold in the throttling policy.
    - key: 10123123  # The application ID.
      value: 10      # The special throttling threshold for the application. This threshold cannot be greater than the user-level throttling threshold in the throttling policy.
  - type: "USER"     # The special throttling type. The value USER specifies that throttling is performed for special Alibaba Cloud accounts.
    policyDatasetId: 87 b65008eXXXXXXXXXXXXa236eda5 # The ID of the plug-in dataset.
    policies:
    - key: 123455    # The ID of an Alibaba Cloud account. You can move the pointer over the profile picture in the upper-right corner of the Alibaba Cloud console to obtain the ID.
      value: 100     # The special throttling threshold for the Alibaba Cloud account. This threshold cannot be greater than the API-level throttling threshold in the throttling policy.
重要

プラグインデータセットは、基本的なスロットリングプラグインによってのみサポートされます。 パラメータベースのスロットリングプラグインは、プラグインデータセットをサポートしていません。

3. パラメータベースのスロットリング設定

パラメーターベースのスロットリングを使用すると、呼び出し元のリクエストパラメーターと条件付き実行に基づいてトラフィックを制御できます。 次のパラメーターベースのスロットリング設定がサポートされています。

  • 秒、分、時間、または日レベルでのスロットルがサポートされています。

  • リクエストとシステムパラメーターを使用して条件を設定し、さまざまなスロットルしきい値を実装できます。

  • 単一のパラメーターまたは複数のパラメーターの組み合わせを使用して、スロットリングを設定できます。

  • スロットリングスコープをAPIまたはPLUGINに設定できます。

3.1 パラメータベースのスロットリングによるクイックスタート

このセクションでは、例として次のスロットリングポリシーが適用されるシナリオを使用します。IDが10001のアプリケーションではトラフィックを100リクエスト /秒に、他のアプリケーションでは10リクエスト /秒にスロットリングします。

このシナリオでは、YAML形式のスロットリングプラグインが設定されています。

---
scope: "PLUGIN"
#
# Throttling depends on two system parameters.
# 1. The AppId value in the signature. The application ID can be obtained from the CaAppId system parameter.
# 2. The client IP address of the caller, which can be obtained from the CaClientIp system parameter.
parameters:
  AppId: "System: CaAppId"
  ClientIP: "System: CaClientIp"
rules:
  # The first throttling policy. This policy applies to the application whose ID is 10001. The throttling threshold for each client IP address is 100 requests per second.
  - name: "Vip"
    condition: "$AppId = 10001"
    byParameters: "ClientIP"
    value: 100
    period: SECOND
  # The second throttling policy named PerClientIP. The throttling threshold for each client IP address is 10 requests per second.
  - name: "PerClientIP"
    byParameters: "ClientIP"
    bypassEmptyValue: true   # If the condition parameter is left empty in the rules section, the system throttles based on the value of the byParameters parameter. If this parameter is also left empty, the corresponding policy does not take effect and the system throttles based on the default throttling policy.
    value: 10
    period: SECOND

3.2 パラメータベースのスロットリングプラグインの設定

YAMLまたは同等のJSON形式を使用して、スロットリングプラグインのメタデータを設定します。

---
scope: "PLUGIN"                # The scope of the throttling plug-in. Valid values: PLUGIN and API.
blockingMode: QUICK_RETURN     # Specifies that requests without tokens do not queue up. Instead, the 429 code is returned. For more information, see the following field description.
controlMode: FIX_WINDOW  # Specifies that the fixed time window algorithm is used when the time unit is second.
defaultLimit: 100              # The default throttling value, if a default value is specified.
defaultPeriod: SECOND          # The default unit of time for throttling.
defaultRetryAfterBySecond: 60  # Returns the Retry-After header, which gives advice on how long to wait before the next request.
defaultErrorMessage: "Throttled by 100/SECOND"
parameters:                    # The parameters that can be used for throttling.
  clientIp: "System:CaClientIp"
  userId: "Token:userId"
rules:
  - name: "ByClientIp"
    byParameters: "clientIp"
    condition: "$clientIp !in_cidr '61.7.XX.XX/24'"
    limit: 10
    period: MINUTE
    retryAfterBySecond: 60    # Returns the Retry-After header, which gives advice on how long to wait before the next request.
    errorMessage: "Throttled by 10/MINUTE from ${clientIp}"
  - name: "A maximum of 10 requests per minute are allowed for each user, except the administrator."
    byParameters: "clientIp"
    condition: "$userId !like 'admin%'"
    limit: 10
    period: MINUTE
    retryAfterBySecond: 60    # Returns the Retry-After header, which gives advice on how long to wait before the next request.
  - name: "A maximum of 10 requests per minute are allowed for each client IP address."
    byParameters: "clientIp"
    condition: "$clientIp in_cidr '67.0.XX.XX/8'"
    limit: 10
    period: MINUTE
  - name: "A maximum of 15 requests per minute are allowed for each user."
    condition: "$userId !like 'admin%'"
    limit: 15
    period: MINUTE
    byParameters: "clientIp"

フィールド:

  • scope: 必須です。 スロットルプラグインのスコープ。 有効な値: APIおよびPLUGIN。 スロットリングプラグインが複数のAPIにバインドされている場合、scopeフィールドの設定は、APIにバインドされているスロットリングルールのスコープに影響します。 たとえば、スロットリングポリシーは10リクエスト /秒です。

    • このフィールドの値がAPIの場合、各APIのスロットリングしきい値は10リクエスト /秒です。

    • このフィールドの値がPLUGINの場合、すべてのAPIの合計スロットリングしきい値は10リクエスト /秒です。

  • parameters: 必須です。 スロットリングに使用されるパラメーター。 詳細については、「パラメーターと条件式の使用」をご参照ください。

  • rules: オプションです。 調整ポリシー。 defaultLimitおよびdefaultPeriodを指定しない場合、rulesセクションを指定する必要があります。 各スロットリングポリシーには、次のフィールドが含まれます。

    • name: 必須です。 スロットルポリシーの名前。 このフィールドの値は、[A-Za-z0-9_-]+ の正規表現に準拠している必要があります。 各スロットリングポリシーの名前は、スロットリングプラグイン内で一意である必要があります。

    • byParameters: 必須です。 スロットリングに使用されるパラメーター。 複数のパラメーターを指定する場合は、コンマ (,) で区切ります。 このフィールドの値がclientIpの場合、clientIpパラメーターの値に基づいてスロットリングが実行されます。 このフィールドの値がuserId,actionの場合、2つのパラメーターの組み合わせ値に基づいてスロットリングが実行されます。

    • bypassEmptyValue: オプションです。 rulesセクションでconditionパラメーターが空の場合、byParametersパラメーターの値に基づいてシステムが調整されます。 このパラメーターも空のままにすると、対応するポリシーは有効にならず、システムはデフォルトのスロットリングポリシーに基づいてスロットリングします。

    • condition: オプション。 このフィールドを指定した場合、関連するスロットリングポリシーは、このフィールドで示される条件が満たされている場合にのみ使用されます。

    • limit: 必須です。 スロットリングしきい値。 値は正の整数でなければなりません。 このフィールドを -1に設定した場合、指定された条件が満たされてもスロットリングは実行されません。

    • period: 必須です。 スロットリングの時間単位。 有効な値: SECONDMINUTEHOURDAY

    • errorMessage: オプション。 エラーメッセージを示します。 テンプレートを使用して、エラーメッセージをカスタマイズできます。 parametersセクションで指定したパラメーターについては、${Name} 形式でエラーメッセージを定義できます。

    • retryAfterBySecond: オプションです。 Retry-Afterヘッダーを返します。これは、次のリクエストまでの待機時間に関する推奨事項を提供します。

  • defaultLimit: オプション。 デフォルトのスロットリングしきい値。 値は正の整数でなければなりません。

  • defaultPeriod: オプション。 スロットリングの時間単位。 有効な値: SECONDMINUTEHOURDAY

  • defaultErrorMessage: オプションです。 カスタムエラーメッセージ。 このフィールドが指定されている場合、返されるX-Ca-Error-Messageヘッダーにはカスタムエラーメッセージが含まれます。 メッセージにパラメーターを指定しないでください。

  • defaultRetryAfterBySecond: オプション。 Retry-Afterヘッダーを返します。これは、次のリクエストまでの待機時間に関する推奨事項を提供します。

  • blockingMode: API Gatewayは、標準のトークンバケットアルゴリズムを使用してリクエストを抑制します。 次の項目は、フィールド値とアルゴリズムを示しています。

    • QUEUE: デフォルト値。 トークンバケットアルゴリズムには、トークンバケットと待機キューの2つの概念が含まれます。 API Gatewayは定期的にトークンをトークンバケットに送信します。 リクエストは、API Gatewayで受け付けられる前にトークンを取得する必要があります。 トークンの取得に失敗した場合、トークンが豊富になったときに優先的にトークンが割り当てられるようにキューで待機します。 キューがいっぱいの場合、後続の要求に対して429コードが返されます。

    • QUICK_RETURN: この値を使用すると、リクエストはキュー内のトークンを待機しません。 代わりに、429コードが返されます。

  • controlMode: 時間単位が2番目の場合、このパラメーターを使用してスロットリングアルゴリズムを指定できます。 デフォルト値はTOKEN_BUCKETで、トークンバケットアルゴリズムを示します。 このパラメーターは、固定時間ウィンドウアルゴリズムを示すFIX_WINDOWに設定できます。

3.3 スロットルプラグインでサポートされているパラメータ

次の表に、スロットリングプラグインでサポートされているパラメーターを示します。

パラメーター

適用範囲

説明

方式

リクエスト

GETPOSTなどのHTTPリクエストメソッド (大文字) 。

パス

リクエスト

/path/to/queryなどの完全なHTTPリクエストパス。

ヘッダー

リクエスト

ヘッダー:{Name} を使用して、{Name} で指定されたHTTPヘッダーの最初の値を取得します。

クエリ

リクエスト

Query:{Name} を使用して、{Name} で指定されたクエリ文字列の最初の値を取得します。

フォーム

リクエスト

{Name} で指定されたリクエストフォームの最初の値を取得するには、Form:{Name} を使用します。

ホスト

リクエスト

一致するワイルドカードドメイン名のテンプレートパラメーターを取得するには、Host:{Name} を使用します。

パラメーター

リクエスト

パラメーター:{Name} を使用して、{Name} で指定されたカスタムAPIパラメーターの最初の値を取得します。

System

リクエスト

System:{Name} を使用して、{Name} で指定されたシステムパラメーターの値を取得します。

トークン

リクエスト

権限付与にJWTまたはOAuth 2.0が使用されている場合は、Token:{Name} を使用して、{Name} で指定されたトークンの値を取得します。

3.4 実行ルール

API Gatewayは、次のルールを使用してパラメーターベースのスロットリングを実行します。

  • プラグインは、parametersフィールドを使用して、リクエストのコンテキストからパラメーターを取得します。

  • 指定されたすべての条件が満たされている場合、またはスロットリングポリシーで条件が指定されていない場合、ポリシーが実行されます。

  • 一致した複数のポリシーのbyParameters設定が同じ場合、スロットリングプラグインで最初に表示されるポリシーのみが有効になります。

4. 例

4.1 基本的なスロットル

API、アプリケーション、またはユーザーに対して基本的なスロットリングを実行できます。 アプリケーションのスロットリングは、AppKeysに基づいています。

---
unit: SECOND           # The default unit of time for throttling. Valid values: SECOND, MINUTE, HOUR, and DAY.
apiDefault: 50         # The default API-level throttling threshold.
defaultRetryAfterBySecond: 60  # By default, the Retry-After header is returned, which provides advice on how long to wait before the next request.
appDefault: 20         # Optional. The default application-level throttling threshold. This threshold cannot be greater than the user-level throttling threshold.
userDefault: 30        # Optional. The default user-level throttling threshold. This threshold cannot be greater than the API-level throttling threshold.
specials:              # Optional. The special throttling settings. You can set throttling thresholds for special applications or users in a throttling policy.
  - type: "APP"        # The special throttling type. The value APP indicates that throttling is performed for special applications based on their AppKeys.
    policies:
      - key: 10001     # The application ID. You can obtain the ID of an application from the application details page. To go to this page, choose Call API > Apps in the left-side navigation pane of the API Gateway console and click the name of the application in the application list.
        value: 3       # The special throttling threshold for the application. This threshold cannot be greater than the user-level throttling threshold.
      - key: 10003
        value: 40
  - type: "USER"       # The special throttling type. The value USER indicates that throttling is performed for special Alibaba Cloud accounts.
    policies:
      - key: 102       # The ID of an Alibaba Cloud account. You can move the pointer over the profile picture in the upper-right corner of the Alibaba Cloud Management Console to obtain the ID.
        value: 10      # The special throttling threshold for the Alibaba Cloud account. This threshold cannot be greater than the API-level throttling threshold.
      - key: 233
        value: 35

4.2 パラメータベースのスロットリング

このセクションでは、クライアントIPアドレスベースのスロットリングプラグインを提供します。 この例では、次の調整ポリシーが使用されています。

  • 各クライアントIPアドレスに対して、1分あたり最大100のAPI呼び出しが許可されます。

  • クライアントIPアドレスが58.66.XX.XX/24 CIDRブロックに該当する場合、このクライアントIPアドレスに対してスロットリングは実行されません。

  • クライアントIPアドレスが63.0.XX.XXまたは73.0.XX.XX/24 CIDRブロックに該当する場合、このクライアントIPアドレスに対して1日あたり最大5回のAPI呼び出しが許可されます。

---
scope: API             # The throttling scope. Valid values: API and PLUGIN.
parameters:            # The parameters that are used for throttling. Throttling is performed only based on the ClientIP parameter. You can obtain the values of this parameter from the CaClientIp system parameter.
  ClientIp: "System:CaClientIp"
rules:
  - name: whitelist    # The whitelist policy. Throttling is not performed for client IP addresses that meet the condition specified in this policy.
    condition: "$ClientIp in_cidr '58.66.XX.XX/24'"
    limit: -1          # The value -1 indicates that throttling is not performed.
  - name: banList      # The special throttling policy. If a client IP address meets the condition specified in this policy, a maximum of five API calls per day are allowed for the client IP address.
    condition: "$ClientIp in_cidr '63.0.XX.XX' or $ClientIp in_cidr '73.0.XX.XX/24'"  
    byParameters: "ClientIp"
    limit: 5
    period: DAY
  - name: 100perIp     # The default throttling policy. A maximum of 100 API calls per minute are allowed for each client IP address.
    byParameters: "ClientIp"
    limit: 100
    period: MINUTE     # The unit of time. Valid values: SECOND, MINUTE, HOUR, and DAY.

4.3 アンチCC攻撃の設定

このセクションでは、チャレンジcollapsar (CC) 攻撃を防ぐためにスロットリングプラグインを設定する方法の例を示します。

  • 各クライアントIPアドレスに対して、1秒あたり最大3のAPI呼び出しが許可されます。

  • 1秒あたり3回の呼び出しのしきい値を超えると、クライアントIPアドレスからのアクセスは10秒間ブロックされます。

---
scope: API             # The throttling scope. Valid values: API and PLUGIN.
defaultLimit: 3000        # The default throttling threshold.
defaultPeriod: SECOND     # The default unit of time for throttling.
defaultRetryAfterBySecond: 60  # By default, the Retry-After header is returned, which provides advice on how long to wait before the next request.
parameters:        # The parameters that are used for throttling. Throttling is performed only based on the ClientIP parameter. You can obtain the values of this parameter from the CaClientIp system parameter.
  clientIp: "system:CaClientIp"
rules:
  -name: "Each client IP address can initiate three API calls per second. If this threshold is exceeded, the client IP address is blocked for 10 seconds."
    byParameters: "clientIp"
    limit: 3
    period: SECOND
    blockingPeriodBySecond: 10     # Only effective for dedicated instances.

5. エラーコード

エラーコード

HTTP ステータスコード

エラーメッセージ

説明

T429ID

429

INNER DOMAIN Flow Controlによって制限されている ${Domain} はテストドメインで、1日あたりのリクエスト数は1000です。

このエラーメッセージは、デフォルトの第2レベルドメイン名を使用してAPI呼び出しを行っている場合に返されます。 この場合、中国 (香港) リージョンおよび中国本土以外のリージョンでは1日あたり100回の通話を行い、中国本土内のリージョンでは1日あたり1,000回の通話を行うことができます。 さらに呼び出しを行う場合は、カスタムドメイン名をバインドする必要があります。

T429IN

429

INSTANCEフロー制御によるスロットル

現在のインスタンスに対してスロットリングがトリガーされた場合に返されるエラーメッセージ。

T429GR

429

グループの流れ制御によって通される

現在のAPIグループに対してスロットリングがトリガーされた場合に返されるエラーメッセージ。

T429PA

429

APIフロー制御による制限

プラグインで定義されているデフォルトのAPIレベルの調整ポリシーがトリガーされた場合に返されるエラーメッセージ。

T429PR

429

PLUGINフロー制御によるスロットル

プラグインで定義されている特別なスロットリングポリシーがトリガーされた場合に返されるエラーメッセージ。

6. 制限事項

  • スロットリングプラグインには、最大16個のパラメーターを指定できます。

  • 各条件式には、最大512文字を使用できます。

  • 単一のプラグインのメタデータのサイズは50 KBを超えることはできません。

  • スロットリングプラグインには、最大16スロットリングポリシーを定義できます。

  • スロットリングポリシーbyParametersフィールドには、最大3つのパラメーターを指定できます。

  • クライアントIPアドレスに日レベルのスロットリングが指定されていて、システムが過剰なスロットリングレコードを格納している場合、一部のレコードはリリースされます。 共有インスタンスの場合、スロットリングプラグインは最大1,000個のパラメーターに基づいてトラフィックを制御できます。 専用インスタンスの場合、スロットリングプラグインは最大100,000個のパラメーターに基づいてトラフィックを制御できます。