All Products
Search
Document Center

Mobile Platform as a Service:API traffic limit

Last Updated:Jan 29, 2026

API traffic limit lets you set limits for individual APIs, default rate limits for all APIs, and a total rate limit for an application. This feature prevents your backend servers from being overwhelmed during peak traffic. If you set both a default API rate limit and a total application rate limit, the lower of the two limits takes precedence.

This topic describes how to configure default API rate limits and total application rate limits. To set a rate limit for a specific API, you can configure it on the API details page. For more information, see Configure an API.

Prerequisites

To use traffic limit configurations, you must first enable the traffic limit feature. Log on to the mPaaS console. In the navigation pane on the left, choose Mobile Gateway > Gateway Management. Then, turn on the Limit API traffic switch.

Default API rate limit

You can set a default rate limit for all APIs in the current application. The default rate limit is applied based on the following rules:

  • If a rate limit is configured for a specific API, that limit overwrites the default rate limit.

  • A per-API throttling configuration overwrites the default configuration.

  • Changes to the default rate limit configuration affect all APIs that use the default configuration.

Steps:

  1. Turn on the API default traffic limit switch.

  2. In the default rate limit configuration box, click Edit and configure the rate limit information.

    • Default rate limit: Set a reasonable threshold based on your business needs. Requests that exceed this value are throttled.

      Note

      The rate limit threshold is the maximum number of requests per second.

    • Traffic limit response: The default response for throttled requests is: {"resultStatus":1002,"tips":"The server is busy. Please try again later."} To customize the throttling response, use the following format:

        {
            "result": "==Enter your custom response content here==",
            "tips": "ok",
            "resultStatus": 1000,
        }

      Where:

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

      • tips is the custom throttling message. If resultStatus is 1002, this field is used to notify the user.

      • resultStatus is the result code returned for a throttled request. For more information about result code definitions, see Gateway result codes.

Total application rate limit

You can set a total rate limit for all APIs in the current application. If the total number of requests exceeds this limit, all subsequent requests to any API in the application are throttled.

Steps:

  1. Turn on the Total traffic limit of the App switch.

  2. In the total application rate limit configuration box, click Edit and configure the rate limit information.

    • Total rate limit: Set a reasonable threshold in requests per second based on your business needs. Requests that exceed this value are throttled.

    • Traffic limit response: The default response for throttled requests is: {"resultStatus":1002,"tips":"The server is busy. Please try again later."} To customize the throttling response, use the following format:

        {
            "result": "==Enter your custom response content here==",
            "tips": "ok",
            "resultStatus": 1000,
        }

      Where:

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

      • resultStatus is the result code returned for a throttled request. For more information about result code definitions, see Gateway result codes.

      • tips is the custom throttling message. If resultStatus is 1002, this field is used to notify the user.