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:
resultfor customized response data,JSONformat. The client uses this field for processing only when theresultStatusis 1000.tipsis a custom throttling prompt. If theresultStatusis 1002, this field will be used to prompt the user.resultStatusthe result code returned for throttling. For more information, see Gateway result codes.