All Products
Search
Document Center

Mobile Platform as a Service:Throttling configuration

Last Updated:Jan 17, 2024

The throttling configuration includes the throttling mode, throttling value, and throttling response:

  • Throttling Mode

    • Disable: Does not limit API calls.

    • Block: If the number of requests exceeds the throttling threshold, requests are blocked.

  • Throttling Value Set a proper throttling threshold based on your business requirements. Unit: seconds. If the throttling mode is Block and the value of this parameter is exceeded, requests are throttling.

  • Throttling Response The default response to throttling is {"resultStatus":1002,"tips":"Too many customers, please wait"} If you want to customize a response to throttling, use the following format:

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

    In the preceding code:

    • result for customized response data, JSON format. The client uses this field for processing only when the resultStatus is 1000.

    • tips is a custom throttling prompt. If the resultStatus is 1002, this field will be used to prompt the user.

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