When a traffic surge hits a specific collection — such as a burst of find queries driving CPU utilization up — SQL throttling lets you cap the number of concurrent find, insert, update, and delete operations on that collection. Requests that exceed the cap are blocked until concurrency drops back below the threshold, protecting overall database availability and stability.
Prerequisites
Before you begin, make sure your instance version meets the following requirements:
| Major version | Minimum minor version |
|---|---|
| 5.0 | 6.0.13 |
| 6.0 | 7.0.9 |
| 7.0 | 8.0.4 |
| 8.0 | All minor versions except 9.0.5 |
Create a throttling rule
Go to the MongoDB Replica Set Instances page or the MongoDB Sharded Cluster Instances page. Select a resource group and region at the top of the page, then click the ID of the target instance.
In the left navigation pane, choose CloudDBA > Sessions.
Click Session Throttling.
On the Session Throttling page, click Create Throttling Rule.
In the dialog box, configure the following parameters.
Parameter Description Operation type The operations to throttle. Select one or more: find,insert,update,delete.operation concurrency value The maximum number of concurrent executions allowed for the selected operations. Requests that exceed this threshold are throttled. Rate Limiting Duration How long the rule stays active. After the duration ends, the rule expires automatically and moves to the Ended tab. Kill Statement (Optional) When enabled, the system immediately terminates all active operations that match the rule the moment the rule takes effect. This runs once to release connections and compute resources held by long-running operations. New requests that arrive after the rule is active are blocked by the throttling mechanism — they are not killed. Enable this option when a load burst has caused many long-running transactions to accumulate and you need to free resources immediately. Rate Limiting Scope Available for sharded cluster instances only. Apply the rule to All Shards or Partial Shards. Rate Limiting Collection The collection to throttle. Use the format databaseName.collectionName.Click Submit.
Manage throttling rules
After a rule is created, you can manage it from the Session Throttling page:
| Tab | Available actions |
|---|---|
| Running | View, modify, or disable an active throttling rule. |
| Ended | View or re-enable an expired throttling rule. |