Throttling configuration

更新时间:
复制 MD 格式

Throttling configuration controls how your API handles traffic spikes by setting three parameters: throttling mode, throttling value, and throttling response.

  • Throttling mode

    • Disable: No limit on API calls.

    • Block: Requests that exceed the throttling threshold are blocked.

  • Throttling value: The maximum number of requests allowed per second. When the throttling mode is Block and requests exceed this value, they are throttled.

  • Throttling response: The default throttling response is {"resultStatus":1002,"tips":"Too many customers, please wait"}

    To customize the response, use the following format:

    {
        "result": "==This is the custom response content. Enter==",
        "tips": "ok",
        "resultStatus": 1000
    }

    The response fields are:

    • result: Custom response data in JSON format. The client processes this field only when resultStatus is 1000.

    • tips: Custom throttling message shown to the user when resultStatus is 1002.

    • resultStatus: Result code returned for throttling. For more information, see Gateway result codes.