Configuring Auto Throttling
Scenarios
In high-concurrency internet applications, sudden traffic spikes or abnormal reads/writes can slow system response, affecting user experience and service continuity. Auto throttling allows you to set criteria, such as the vCPU threshold and maximum number of active connections. When the criteria are met, the system automatically performs flow control on sessions to maintain core service availability.
Currently, auto throttling can only be configured for the primary node. You can view valid throttling rules on the SQL Throttling tab.
Supported Versions
The kernel version of your TaurusDB instance must be 2.0.69.250900 or later.
For details about how to check the kernel version, see How Can I Check the Version of a TaurusDB Instance?
Constraints
- Auto throttling can only be configured for the primary node. It is not available for read replicas.
- Enabling auto throttling automatically enables SQL throttling.
- No more than 10 SQL throttling rules can be automatically generated. A maximum of 100 SQL throttling rules are allowed.
- Throttling rules generated after Auto Throttling is triggered will be automatically deleted upon expiry. You can also manually delete them on the SQL Throttling tab. If Auto Throttling is modified or disabled, the generated throttling rules will be automatically deleted.
- Throttling rules only limit new sessions. During auto throttling, concurrent requests may still increase.
- If there is a throttling rule with the same keywords as you specified, no new rule will be automatically generated.
- Throttling rules are generated only for SELECT.
- Auto throttling generates throttling rules based on sessions of non-root accounts.
- Restoring your instance data from a backup will clear SQL throttling rules and auto throttling settings.
Procedure
- Log in to the TaurusDB console.
- On the Instances page, click the instance name.
- In the navigation pane, choose DBA Assistant > Historical Diagnosis.
- Click SQL Explorer and then Auto Throttling.
- Click Auto Throttling.
- Toggle on
and configure required parameters to automatically limit SQL execution under high load. For details about the parameters, see Table 1.
Example:
In the time window 15:00–20:00, if the CPU usage is greater than or equal to 90% and the number of active sessions is greater than or equal to 20 for 5 minutes, auto throttling will be triggered.
The maximum duration of each throttling is 5 minutes. If any of the CPU usage, number of active sessions, and duration no longer meets the throttling policy, the throttling will be stopped.
Figure 1 Example configuration
Table 1 Parameter description Parameter
Description
Time Window
Select a proper time window.
Max. Duration (min)
Maximum length of time that SQL statements matching the auto throttling policy can be throttled on the primary node within the time window.
If the maximum duration is exceeded, the throttling stops automatically. If the criteria remain unchanged, the next throttling will be triggered 1 minute later.
Range: 1–1440
vCPU usage (%)
This threshold helps assess instance load. If the vCPU usage exceeds the threshold (≥ 70%), the system determines whether to trigger auto throttling based on the relationship between vCPU usage and active sessions (and/or).
Active sessions
This threshold helps assess the number of concurrent accesses to an instance. If the number of active sessions exceeds the threshold, the system determines whether to trigger auto throttling based on vCPU usage.
Range: 1–5000
Duration (min)
Auto throttling is only triggered when vCPU usage and active session thresholds are sustained throughout the observation period you specify.
Range: 2–60
Max. Concurrent Requests
This parameter limits how many SQL statements matching the keyword can be executed concurrently. Any statements beyond this limit will not be executed.
Range: 1–1000000000
SQL Throttling Rule
If Retain is selected, existing SQL throttling rules will be retained.
- Click OK.
- After auto throttling is triggered, SQL throttling rules will be automatically generated. Check valid throttling rules on the SQL Throttling tab.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot