Service Throttling FAQ
This topic answers common questions about the service throttling feature.
Why is my service throttling configuration not working?
Troubleshoot the issue as follows:
Confirm that your SOFA version is 3.3.0 or later. If not, upgrade the version.
For more information about SOFA versions, see Version Guide.
Integrate the dynamic configuration client and service throttling.
<dependency> <groupId>com.alipay.sofa</groupId> <artifactId>ddcs-enterprise-sofa-boot-starter</artifactId> </dependency> <dependency> <groupId>com.alipay.sofa</groupId> <artifactId>guardian-sofa-boot-starter</artifactId> </dependency>Confirm that the customer is using rate limiting for the REST protocol as follows:
Check the code and validate the Facade interface, implementation class, and XML configuration. The interface is defined as follows:

In the XML file, configure the bean for the implementation class and publish the service with the REST protocol.

Deploy the application to CAFE for testing. The steps are as follows:
After the deployment is complete, check the Guardian
guardian-default.logfile to confirm that the Guardian component is registered.
Configure the throttling conditions in the SOFA console.
The application name in the configuration must match the value of
spring.application.namein theapplication.propertiesfile.
After completing the configuration, enable service throttling again.
Check the Guardian
guardian-default.logfile to confirm that the application has logged the configuration information, as shown below:
After confirming that the information is correct, access the application in a browser to verify the result. You can check the
guardian-limit-stat.logfile to view successful requests.
Why is there no service throttling log file directory in the configured logs folder?
Add a custom path in the startup class. The service throttling log files are then generated in the specified directory. For example: System.setProperty("user.home","/tmp/localfile")
Why does Guardian not load when the application starts?
Symptom:
When the application starts, Guardian does not load and the log directory is not created.
Cause:
The Guardian JAR package was not included when the application was packaged.
Solution:
When you package the application, make sure to include the Guardian JAR package.
