This topic outlines how to use QoS policies for various business needs.
The following use cases cover different scenarios. Choose the one that best fits your needs.
Setting different throttling limits for various services accessing the same TOS resources
In this section, we will set the write bandwidth limits for the 'bucketevent' bucket to 3,000 and 2,000 Mbps for vePFS and EMR, respectively.
Step 1: Throttle the bandwidth for vePFS
- In the left navigation pane, select Flow control management > QoS policy management.
- On the QoS policy management page, set Region to China (Beijing) in the upper-left corner.
- Configure the policy using your preferred view.
Configure QoS policies by visual view:
- On the Create QoS policy page, set the following parameters.
- Policy configuration method: Select Visual view.
- Policy name: Enter a name for the policy. In this example, enter test.
- Policy Type: Select Threshold traffic control.
- QoS value: Set Category to WritesRate, and Value to 3,000.
- Authorized user: Set Authorized user to Specified account and select Current main account. In the Role name section, click Add row to apply ServiceRoleForVEPFS.
- User Policy: Select Include the above users.
- Resource: Check the Objects in bucket checkbox. Set Bucket name to bucketevent and Scope of application to All objects.
- Resource strategy: Select Include the above resources.
- Condition: No conditions are required for this scenario.
- After completing the settings, click Next step.
- After verifying the details, click Confirm.
On the JSON view tab, click Edit. Then, copy the following content into the Statement, and click Save.
Step 2: Throttle the bandwidth for EMR
- In the left navigation pane, select Flow control management > QoS policy management.
- On the QoS policy management page, set Region to China (Beijing) in the upper-left corner.
- Configure the policy using your preferred view.
Configure QoS policies by visual view:
- On the Create QoS policy page, set the following parameters.
- Policy configuration method: Select Visual view.
- Policy name: Enter a name for the policy. In this example, enter test2.
- Policy Type: Select Threshold traffic control.
- QoS value: Set Category to WritesRate, and Value to 2,000.
- Authorized user: Set Authorized user to Specified account and select Current main account. In the Role name section, click Add row to apply ServiceRoleForEMROLAP.
- User Policy: Select Include the above users.
- Resource: Check the Objects in bucket checkbox. Set Bucket name to bucketevent and Scope of application to All objects.
- Resource strategy: Select Include the above resources.
- Condition: No conditions are required for this scenario.
- After completing the settings, click Next step.
- After verifying the details, click Confirm.
On the JSON view tab, click Edit. Then, copy the following content into the Statement, and click Save.
warning
In JSON, elements are separated by commas (,). Before copying new content into the Statement, add a comma (,) after the QoS rules for vePFS.
Applying throttling at the workload level
In this section, we will use vePFS and the IAM user "aaa" as examples. We will set the write bandwidth limit to 5,000 Mbps for vePFS when accessing the "bucketevent1" bucket, and the write bandwidth limit to 3,000 Mbps for aaa when accessing the "bucketevent2" bucket.
Step 1: Throttle the bandwidth for vePFS
- In the left navigation pane, select Flow control management > QoS policy management.
- On the QoS policy management page, set Region to China (Beijing) in the upper-left corner.
- Configure the policy using your preferred view.
Configure QoS policies by visual view:
- On the Create QoS policy page, set the following parameters.
- Policy configuration method: Select Visual view.
- Policy name: Enter a name for the policy. In this example, enter test.
- Policy Type: Select Threshold traffic control.
- QoS value: Set Category to WritesRate, and Value to 5,000.
- Authorized user: Set Authorized user to Specified account and select Current main account. In the Role name section, click Add row to apply ServiceRoleForVEPFS.
- User Policy: Select Include the above users.
- Resource: Check the Objects in bucket checkbox. Set Bucket name to bucketevent1 and Scope of application to All objects.
- Resource strategy: Select Include the above resources.
- Condition: No conditions are required for this scenario.
- After completing the settings, click Next step.
- After verifying the details, click Confirm.
On the JSON view tab, click Edit. Then, copy the following content into the Statement, and click Save.
Step 2: Throttle the bandwidth for the specified user
- In the left navigation pane, select Flow control management > QoS policy management.
- On the QoS policy management page, set Region to China (Beijing) in the upper-left corner.
- Configure the policy using your preferred view.
Configure QoS policies by visual view:
- On the Create QoS policy page, set the following parameters.
- Policy configuration method: Select Visual view.
- Policy name: Enter a name for the policy. In this example, enter test2.
- Policy Type: Select Threshold traffic control.
- QoS value: Set Category to WritesRate, and Value to 2,000.
- Authorized user: Set Authorized user to Specified account and select Current main account. In the Sub account name section, click Add row and select aaa from the list.
- User Policy: Select Include the above users.
- Resource: Check the Objects in bucket checkbox. Set Bucket name to bucketevent2 and Scope of application to All objects.
- Resource strategy: Select Include the above resources.
- Condition: No conditions are required for this scenario.
- After completing the settings, click Next step.
- After verifying the details, click Confirm.
On the JSON view tab, click Edit. Then, copy the following content into the Statement, and click Save.
warning
In JSON, elements are separated by commas (,). Before copying new content into the Statement, add a comma (,) after the QoS rules for vePFS.
Throttling bandwidth for a specific bucket
In this section, we will use the 'bucketevent' bucket in China (Beijing) as an example. The default write bandwidth limit for this region is 10,000 Mbps, but we will limit this bucket's write bandwidth to 3,000 Mbps.
- In the left navigation pane, select Flow control management > QoS policy management.
- On the QoS policy management page, set Region to China (Beijing) in the upper-left corner.
- Configure the policy using your preferred view.
Configure QoS policies by visual view:
- On the Create QoS policy page, set the following parameters.
- Policy configuration method: Select Visual view.
- Policy name: Enter a name for the policy. In this example, enter test3.
- Policy Type: Select Threshold traffic control.
- QoS value: Set Category to WritesRate, and Value to 3,000.
- Authorized user: Select All users.
- User Policy: Select Include the above users.
- Resource: Check the Objects in bucket checkbox. Set Bucket name to bucketevent and Scope of application to All objects.
- Resource strategy: Select Include the above resources.
- Condition: No conditions are required for this scenario.
- After completing the settings, click Next step.
- After verifying the details, click Confirm.
On the JSON view tab, click Edit. Then, copy the following content into the Statement, and click Save.
Throttling bandwidth for a specific user
In this section, we will set a write bandwidth limit of 3,000 Mbps for the IAM user "aaa" in China (Beijing).
- In the left navigation pane, select Flow control management > QoS policy management.
- On the QoS policy management page, set Region to China (Beijing) in the upper-left corner.
- Configure the policy using your preferred view.
Configure QoS policies by visual view:
- On the Create QoS policy page, set the following parameters.
- Policy configuration method: Select Visual view.
- Policy name: Enter a name for the policy. In this example, enter test4.
- Policy Type: Select Threshold traffic control.
- QoS value: Set Category to WritesRate, and Value to 3,000.
- Authorized user: Set Authorized user to Specified account and select Current main account. In the Sub account name section, click Add row and select aaa from the list.
- User Policy: Select Include the above users.
- Resource: Select All buckets.
- Resource strategy: Select Include the above resources.
- Condition: No conditions are required for this scenario.
- After completing the settings, click Next step.
- After verifying the details, click Confirm.
On the JSON view tab, click Edit. Then, copy the following content into the Statement, and click Save.
Prioritizing bandwidth for a specific bucket
In this section, we will use the 'bucketevent' bucket in China (Beijing) as an example. The default write bandwidth limit for this region is 10,000 Mbps. To ensure 'bucketevent' has a write bandwidth limit of 7,000 Mbps while the other buckets in this region collectively have a limit of 3,000 Mbps, we will set the limit for the other buckets to 3,000 Mbps.
- In the left navigation pane, select Flow control management > QoS policy management.
- On the QoS policy management page, set Region to China (Beijing) in the upper-left corner.
- Configure the policy using your preferred view.
Configure QoS policies by visual view:
- On the Create QoS policy page, set the following parameters.
- Policy configuration method: Select Visual view.
- Policy name: Enter a name for the policy. In this example, enter test3.
- Policy Type: Select Threshold traffic control.
- QoS value: Set Category to WritesRate, and Value to 3,000.
- Authorized user: Select All users.
- User Policy: Select Include the above users.
- Resource scope: Check the Objects in bucket checkbox. Set Bucket name to bucketevent and Scope of application to All objects.
- Resource strategy: Select Exclude the above resources.
- Condition: No conditions are required for this scenario.
- After completing the settings, click Next step.
- After verifying the details, click Confirm.
On the JSON view tab, click Edit. Then, copy the following content into the Statement, and click Save.
Prioritizing bandwidth for a specific user
In this section, we will use the IAM user "aaa" and the China (Beijing) region as an example. The default write bandwidth limit for this region is 10,000 Mbps. To ensure aaa has a write bandwidth limit of 7,000 Mbps while the other users collectively have a limit of 3,000 Mbps in this region, we will set the limit for the other users to 3,000 Mbps.
- In the left navigation pane, select Flow control management > QoS policy management.
- On the QoS policy management page, set Region to China (Beijing) in the upper-left corner.
- Configure the policy using your preferred view.
Configure QoS policies by visual view:
- On the Create QoS policy page, set the following parameters.
- Policy configuration method: Select Visual view.
- Policy name: Enter a name for the policy. In this example, enter test4.
- Policy Type: Select Threshold traffic control.
- QoS value: Set Category to WritesRate, and Value to 3,000.
- Authorized user: Set Authorized user to Specified account and select Current main account. In the Sub account name section, click Add row and select aaa from the list.
- User Policy: Select Exclude the above users.
- Resource: Select All buckets.
- Resource strategy: Select Include the above resources.
- Condition: No conditions are required for this scenario.
- After completing the settings, click Next step.
- After verifying the details, click Confirm.
On the JSON view tab, click Edit. Then, copy the following content into the Statement, and click Save.
Implementing priority‑based throttling for various services accessing the same TOS resources
In this section, we will set the guaranteed write bandwidth quotas to 1,000 Mbps for vePFS and 2,000 Mbps for EMR when accessing the "bucketevent" bucket. The total write bandwidth quota is 3,000 Mbps.
- In the left navigation pane, select Flow control management > QoS policy management.
- On the QoS policy management page, set Region to China (Beijing) in the upper-left corner.
- Configure the policy using your preferred view.
Configure QoS policies by visual view:
- On the Create QoS policy page, set the following parameters.
- Policy configuration method: Select Visual view.
- Policy name: Enter a name for the policy. In this example, enter "test-priority1".
- Policy type: Select Priority traffic control.
- QoS value: Set Category to WritesRate, and Value to 3,000 Mbps.
- Priority configuration: Click Add priority to set the guaranteed bandwidth quota and priority level for vePFS.
- Guaranteed flow control value: Set Category to WritesRate, and Value to 1,000 Mbps.
- Authorized user: Set Authorized user to Specified account and select Current main account. In the Role name section, click Add row to apply ServiceRoleForVEPFS.
- User Policy: Select Include the above users.
- Resource: Check the Objects in bucket checkbox. Set Bucket name to bucketevent and Scope of application to All objects.
- Resource strategy: Select Include the above resources.
- Condition: No conditions are required for this scenario.
- After verifying the details, click Confirm.
- Priority configuration: Click Add priority to set the guaranteed bandwidth quota and priority level for EMR.
- Guaranteed flow control value: Set Category to WritesRate, and Value to 2,000 Mbps.
- Authorized user: Set Authorized user to Specified account and select Current main account. In the Role name section, click Add row to apply ServiceRoleForEMROLAP.
- User Policy: Select Include the above users.
- Resource: Check the Objects in bucket checkbox. Set Bucket name to bucketevent and Scope of application to All objects.
- Resource strategy: Select Include the above resources.
- Condition: No conditions are required for this scenario.
- After verifying the details, click OK.
On the JSON view tab, click Edit. Then, copy the following content into the Statement, and click Save.
- After completing the settings, click Next step.
- After verifying the details, click Confirm.
Implementing priority‑based throttling across multiple buckets
In this section, we will use the "bucketevent1" and "bucketevent2" buckets in China (Beijing) as examples. The default write bandwidth limit for this region is 10,000 Mbps. We will set guaranteed write bandwidth quotas of 3,000 Mbps for both "bucketevent1" and "bucketevent2".
- In the left navigation pane, select Flow control management > QoS policy management.
- On the QoS policy management page, set Region to China (Beijing) in the upper-left corner.
- Configure the policy using your preferred view.
Configure QoS policies by visual view:
- On the Create QoS policy page, set the following parameters.
- Policy configuration method: Select Visual view.
- Policy name: Enter a name for the policy. In this example, enter "test-priority2".
- Policy type: Select Priority traffic control.
- QoS value: Set Category to WritesRate, and Value to 10,000 Mbps.
- Priority configuration: Click Add priority to set the guaranteed bandwidth quota and priority level for bucketevent1.
- Guaranteed flow control value: Set Category to WritesRate, and Value to 3,000 Mbps.
- Authorized user: Select All users.
- User Policy: Select Include the above users.
- Resource scope: Check the Objects in bucket checkbox. Set Bucket name to bucketevent1 and Scope of application to All objects.
- Resource strategy: Select Include the above resources.
- Condition: No conditions are required for this scenario.
- After verifying the details, click Confirm.
- Priority configuration: Click Add priority to set the guaranteed bandwidth quota and priority level for bucketevent2.
- Guaranteed flow control value: Set Category to WritesRate, and Value to 3,000 Mbps.
- Authorized user: Select All users.
- User Policy: Select Include the above users.
- Resource scope: Check the Objects in bucket checkbox. Set Bucket name to bucketevent2 and Scope of application to All objects.
- Resource strategy: Select Include the above resources.
- Condition: No conditions are required for this scenario.
- After verifying the details, click OK.
On the JSON view tab, click Edit. Then, copy the following content into the Statement, and click Save.
- After completing the settings, click Next step.
- After verifying the details, click Confirm.