By default, all buckets under an Alibaba Cloud account in the same region share bandwidth. When multiple buckets transfer large volumes of data concurrently, bandwidth contention can delay critical services. Resource pool Quality of Service (QoS) throttling solves this with two complementary methods: threshold-based throttling caps the maximum bandwidth a bucket can use, and priority-based throttling guarantees a minimum bandwidth for high-priority services. Together, they keep critical services stable under load.
How it works
Threshold-based throttling
Threshold-based throttling sets bandwidth ceilings at different levels of the resource pool hierarchy — resource pool, BucketGroup, and bucket — to prevent any single object from consuming too much bandwidth.
Throttling rules
Resource pool: Max 100 Gbps
├─ Bucket A: Max 40 Gbps ← Cannot exceed 40 Gbps even if bandwidth is available
├─ Bucket B: Max 30 Gbps
└─ Bucket C: Unlimited ← Can use all remaining bandwidthThree rules govern how limits combine:
All active limits apply simultaneously. The actual bandwidth is the minimum across all active rules.
Child bandwidth cannot exceed parent bandwidth. The sum of bandwidths of lower-level objects cannot exceed the total bandwidth of their parent object.
Requester limits are independent. The requester limit applies alongside the resource pool hierarchy limit. The lower value wins.
Example: A RAM user accesses a bucket with a requester limit of 20 Gbps and a bucket limit of 30 Gbps.
Actual maximum bandwidth = min(20 Gbps, 30 Gbps) = 20 Gbps
Priority-based throttling
Priority-based throttling assigns minimum bandwidth commitments to objects by priority level, so high-priority services get bandwidth first during contention.
Configure 3 to 10 priority levels per resource pool. A higher number means higher priority. Objects without an explicit priority use the default priority level; priority levels without an explicit minimum bandwidth commitment use the default minimum bandwidth commitment.
How bandwidth is allocated
Minimum commitment guarantee: Each priority level has a guaranteed minimum bandwidth that the system strictly honors.
Preemption: High-priority objects can reclaim bandwidth that low-priority objects use beyond their minimum commitment. Higher priority wins in all preemption contests.
Idle resource utilization: Low-priority objects can use the idle minimum bandwidth of higher-priority objects. Higher-priority objects still have precedence when they need it back.
Configuration constraint: The sum of all minimum bandwidth commitments cannot exceed the resource pool's total bandwidth.
Allocation examples
All examples use a 100 Gbps resource pool.
Scenario 1: High-priority preemption (3 levels, 20 Gbps each)
Priority 1 needs 10 Gbps, Priority 2 needs 30 Gbps, Priority 3 needs 80 Gbps.
| Priority | Minimum commitment | Required | Actual allocation | Notes |
|---|---|---|---|---|
| Priority 3 | 20 Gbps | 80 Gbps | 70 Gbps | Gets 20 Gbps commitment + 10 Gbps idle from Priority 1 + 40 Gbps remaining |
| Priority 2 | 20 Gbps | 30 Gbps | 20 Gbps | Gets 20 Gbps commitment. Extra is preempted by Priority 3. |
| Priority 1 | 20 Gbps | 10 Gbps | 10 Gbps | Gets 10 Gbps as required. 10 Gbps idle is preempted by Priority 3. |
Final allocation: 10 + 20 + 70 = 100 Gbps
Scenario 2: Higher-priority precedence in preemption (4 levels, 25 Gbps each)
Priority 1 needs 0 Gbps, Priority 2 needs 5 Gbps, Priority 3 needs 40 Gbps, Priority 4 needs 60 Gbps.
| Priority | Minimum commitment | Required | Actual allocation | Notes |
|---|---|---|---|---|
| Priority 4 | 25 Gbps | 60 Gbps | 60 Gbps | Gets 25 Gbps commitment + preempts 35 Gbps |
| Priority 3 | 25 Gbps | 40 Gbps | 35 Gbps | Gets 25 Gbps commitment + preempts remaining 10 Gbps |
| Priority 2 | 25 Gbps | 5 Gbps | 5 Gbps | Less than commitment; gets exactly what it needs |
| Priority 1 | 25 Gbps | 0 Gbps | 0 Gbps | Needs nothing; all idle bandwidth is preempted |
Final allocation: 0 + 5 + 35 + 60 = 100 Gbps
Scenario 3: Total commitments less than pool bandwidth (4 levels, 10 Gbps each = 40 Gbps total)
Priority 1 needs 50 Gbps, Priority 2 needs 50 Gbps, Priority 3 needs 30 Gbps, Priority 4 needs 20 Gbps.
| Priority | Minimum commitment | Required | Actual allocation | Notes |
|---|---|---|---|---|
| Priority 4 | 10 Gbps | 20 Gbps | 20 Gbps | Highest priority; gets full required bandwidth |
| Priority 3 | 10 Gbps | 30 Gbps | 30 Gbps | Next highest priority; gets full required bandwidth |
| Priority 2 | 10 Gbps | 50 Gbps | 40 Gbps | Gets 10 Gbps commitment + 30 Gbps remaining |
| Priority 1 | 10 Gbps | 50 Gbps | 10 Gbps | Gets only the minimum commitment |
Final allocation: 10 + 40 + 30 + 20 = 100 Gbps
Using both throttling methods together
Pair threshold-based throttling with priority-based throttling to set both a ceiling and a floor for each object.
Threshold-based limit is a hard limit. Bandwidth never exceeds this value, regardless of the minimum bandwidth commitment.
Priority-based minimum commitment is a soft guarantee. The system honors it within the threshold-based limit.
Normal configuration: Bucket A has a minimum commitment of 50 Gbps and a threshold of 80 Gbps. Available bandwidth: 50–80 Gbps.
Configuration conflict: Bucket A has a minimum commitment of 80 Gbps and a threshold of 50 Gbps. The threshold takes precedence. Available bandwidth: 50 Gbps.
Always set the threshold-based limit higher than the priority-based minimum commitment, so high-priority objects can use additional bandwidth when it is available.
Prerequisites
Before you begin, ensure that you have:
Bandwidth in the target region of 400 Gbps or more
A resource pool created by Alibaba Cloud Technical Support (see Request a resource pool)
Request a resource pool
Contact Technical Support to request a resource pool. Provide the following information in the ticket:
Region: China (Hangzhou)
Resource pool name: qos-resource-pool-1
Bucket list: qos-examplebucket-1, qos-examplebucket-2
Total upload bandwidth: 300 Gbps
Internal network upload bandwidth: 100 Gbps
Public network upload bandwidth: 200 Gbps
Total download bandwidth: 100 Gbps
Internal network download bandwidth: 50 Gbps
Public network download bandwidth: 50 Gbps
Enable resource pool in console: Yes
Enable priority-based throttling: YesAfter the resource pool is created, the Resource Pool QoS page becomes available in the OSS console.
Configure threshold-based throttling
Use threshold-based throttling to cap the maximum bandwidth for a bucket, BucketGroup, or requester. This prevents any single object from consuming too many resources.
All bandwidth values in XML configurations are in Gbps. Set a value to-1for unlimited (uses shared pool bandwidth) or0to block all traffic (use with caution).
Set a bandwidth limit for a bucket
Use this when one bucket generates excessive traffic that affects other buckets in the same resource pool.
Console
On the Resource Pool QoS page, click the name of the target resource pool. For the target bucket, click Modify Throttling Configuration and set the bandwidth values.
| Field | Description |
|---|---|
| Total upload bandwidth | Combined upload limit across internal and public networks (Gbps) |
| Internal network upload bandwidth | Upload limit for VPC/internal endpoint traffic (Gbps) |
| Public network upload bandwidth | Upload limit for internet traffic (Gbps) |
| Total download bandwidth | Combined download limit across internal and public networks (Gbps) |
| Internal network download bandwidth | Download limit for VPC/internal endpoint traffic (Gbps) |
| Public network download bandwidth | Download limit for internet traffic (Gbps) |
ossutil
Before you begin, install ossutil.
Create a local XML file named
qos.xmlwith the bandwidth configuration:Intranetrefers to internal network (VPC) traffic.Extranetrefers to public network traffic. All values are in Gbps. Set-1for unlimited.<QoSConfiguration> <TotalUploadBandwidth>100</TotalUploadBandwidth> <IntranetUploadBandwidth>-1</IntranetUploadBandwidth> <ExtranetUploadBandwidth>20</ExtranetUploadBandwidth> <TotalDownloadBandwidth>100</TotalDownloadBandwidth> <IntranetDownloadBandwidth>-1</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>20</ExtranetDownloadBandwidth> </QoSConfiguration>Apply the configuration to the bucket (replace
examplebucketwith your bucket name):ossutil api invoke-operation --op-name put-bucket-qos-info --method PUT --bucket examplebucket --parameters qosInfo --body=file://qos.xml(Optional) Verify the configuration:
ossutil api invoke-operation --op-name get-bucket-qos-info --method GET --bucket examplebucket --parameters qosInfo
SDK
Bucket bandwidth limits are supported by Python SDK V2 and Go SDK V2.
Create
qos.xmlwith the same content as the ossutil example above.Apply the configuration: Python
import alibabacloud_oss_v2 as oss def put_bucket_qos_info(): credentials_provider = oss.credentials.EnvironmentVariableCredentialsProvider() cfg = oss.config.load_default() cfg.credentials_provider = credentials_provider cfg.region = "cn-hangzhou" # Replace with your bucket's region client = oss.Client(cfg) with open('qos.xml', 'r') as f: qos_xml_body = f.read() req = oss.OperationInput( op_name='PutBucketQoSInfo', method='PUT', parameters={'qosInfo': ''}, headers=None, body=qos_xml_body, bucket='examplebucket', # Replace with your bucket name ) resp = client.invoke_operation(req) print(resp.status_code) if __name__ == "__main__": put_bucket_qos_info()
API
Call PutBucketQoSInfo with the following request body:
<QoSConfiguration>
<TotalUploadBandwidth>100</TotalUploadBandwidth>
<IntranetUploadBandwidth>-1</IntranetUploadBandwidth>
<ExtranetUploadBandwidth>20</ExtranetUploadBandwidth>
<TotalDownloadBandwidth>100</TotalDownloadBandwidth>
<IntranetDownloadBandwidth>-1</IntranetDownloadBandwidth>
<ExtranetDownloadBandwidth>20</ExtranetDownloadBandwidth>
</QoSConfiguration>Set a bandwidth limit for a bucket requester
Use this when multiple services share the same bucket and you need to prevent a single RAM user or RAM role from consuming too much bandwidth.
RAM user
Console
Get the RAM user ID.
On the Resource Pool QoS page, click the target resource pool name. For the target bucket, click Configure Requester Throttling and set the bandwidth for the RAM user.
ossutil
Before you begin, install ossutil.
Create
qos.xmlwith the bandwidth limits for the RAM user:<QoSConfiguration> <TotalUploadBandwidth>100</TotalUploadBandwidth> <IntranetUploadBandwidth>-1</IntranetUploadBandwidth> <ExtranetUploadBandwidth>-1</ExtranetUploadBandwidth> <TotalDownloadBandwidth>100</TotalDownloadBandwidth> <IntranetDownloadBandwidth>-1</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>-1</ExtranetDownloadBandwidth> </QoSConfiguration>Get the RAM user ID.
Apply the configuration (replace
examplebucketand266xxxxwith your values):ossutil api invoke-operation --op-name put-bucket-requester-qos-info --method PUT --bucket=examplebucket --parameters requesterQosInfo --parameters qosRequester=266xxxx --body file://qos.xml(Optional) Verify the configuration:
ossutil api invoke-operation --op-name get-bucket-requester-qos-info --method GET --bucket=examplebucket --parameters requesterQosInfo --parameters qosRequester=266xxxx
SDK
RAM user bandwidth limits for buckets are supported by Python SDK V2 and Go SDK V2.
Create
qos.xmlwith the same content as the ossutil example above.Get the RAM user ID.
Apply the configuration: Python
import alibabacloud_oss_v2 as oss def put_bucket_requester_qos_info(): credentials_provider = oss.credentials.EnvironmentVariableCredentialsProvider() cfg = oss.config.load_default() cfg.credentials_provider = credentials_provider cfg.region = "cn-hangzhou" # Replace with your bucket's region client = oss.Client(cfg) with open('qos.xml', 'r') as f: qos_xml_body = f.read() req = oss.OperationInput( op_name='PutBucketRequesterQoSInfo', method='PUT', parameters={ 'requesterQosInfo': '', 'qosRequester': '2598732222222xxxx', # Replace with the RAM user ID }, headers=None, body=qos_xml_body, bucket='examplebucket', # Replace with your bucket name ) resp = client.invoke_operation(req) print(resp.status_code) print(resp.headers) print(resp.http_response.content) if __name__ == "__main__": put_bucket_requester_qos_info()
API
Get the RAM user ID.
Call PutBucketRequesterQoSInfo with the following request body:
<QoSConfiguration> <TotalUploadBandwidth>100</TotalUploadBandwidth> <IntranetUploadBandwidth>-1</IntranetUploadBandwidth> <ExtranetUploadBandwidth>-1</ExtranetUploadBandwidth> <TotalDownloadBandwidth>100</TotalDownloadBandwidth> <IntranetDownloadBandwidth>-1</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>-1</ExtranetDownloadBandwidth> </QoSConfiguration>
RAM role
Use this when you need to limit bandwidth for a RAM role accessing a bucket. A common case: CDN accesses a private bucket through the AliyunCDNAccessingPrivateOSSRole role for back-to-origin, and you need to cap how much bandwidth it can consume.
Console
Get the RAM role ID.
On the Resource Pool QoS page, click the target resource pool name. For the target bucket, click Configure Requester Throttling and set the bandwidth for the RAM role.
ossutil
Before you begin, install ossutil.
Create
qos.xmlwith the bandwidth limits for the RAM role:<QoSConfiguration> <TotalUploadBandwidth>100</TotalUploadBandwidth> <IntranetUploadBandwidth>-1</IntranetUploadBandwidth> <ExtranetUploadBandwidth>20</ExtranetUploadBandwidth> <TotalDownloadBandwidth>100</TotalDownloadBandwidth> <IntranetDownloadBandwidth>-1</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>40</ExtranetDownloadBandwidth> </QoSConfiguration>Get the RAM role ID.
Apply the configuration (replace
examplebucketand362xxxxwith your values):ossutil api invoke-operation --op-name put-bucket-requester-qos-info --method PUT --bucket=examplebucket --parameters requesterQosInfo --parameters qosRequester=362xxxx --body file://qos.xml(Optional) List all RAM role bandwidth configurations in the resource pool:
ossutil api invoke-operation --op-name list-resource-pool-requester-qos-infos --method GET --parameters resourcePool=examplePool --parameters requesterQosInfo
SDK
RAM role bandwidth limits for buckets are supported by Python SDK V2 and Go SDK V2.
Create
qos.xmlwith the same content as the ossutil example above.Get the RAM role ID.
Apply the configuration: Python
import alibabacloud_oss_v2 as oss def put_bucket_requester_qos_info(): credentials_provider = oss.credentials.EnvironmentVariableCredentialsProvider() cfg = oss.config.load_default() cfg.credentials_provider = credentials_provider cfg.region = "cn-hangzhou" # Replace with your bucket's region client = oss.Client(cfg) with open('qos.xml', 'r') as f: qos_xml_body = f.read() req = oss.OperationInput( op_name='PutBucketRequesterQoSInfo', method='PUT', parameters={ 'requesterQosInfo': '', 'qosRequester': '2598732222222xxxx', # Replace with the RAM role ID }, headers=None, body=qos_xml_body, bucket='examplebucket', # Replace with your bucket name ) resp = client.invoke_operation(req) print(resp.status_code) print(resp.headers) print(resp.http_response.content) if __name__ == "__main__": put_bucket_requester_qos_info()
API
Get the RAM role ID.
Call PutBucketRequesterQoSInfo with the following request body:
<QoSConfiguration> <TotalUploadBandwidth>100</TotalUploadBandwidth> <IntranetUploadBandwidth>-1</IntranetUploadBandwidth> <ExtranetUploadBandwidth>20</ExtranetUploadBandwidth> <TotalDownloadBandwidth>100</TotalDownloadBandwidth> <IntranetDownloadBandwidth>-1</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>40</ExtranetDownloadBandwidth> </QoSConfiguration>
Set a bandwidth limit for a BucketGroup
Use this to group low-priority buckets and cap their combined bandwidth. This prevents background workloads from competing with critical services at the pool level.
A BucketGroup name must be 3–30 characters, using only lowercase letters, digits, and hyphens.
Console
On the Resource Pool QoS page, click the target resource pool name. Click Create BucketGroup, enter a name, and set the bandwidth limits.
For each bucket to add to the group, click Configure BucketGroup to the right of the bucket.
ossutil
Before you begin, install ossutil.
Add buckets to the BucketGroup (run once per bucket):
ossutil api invoke-operation --op-name put-bucket-resource-pool-bucket-group --method PUT --bucket scheduled-posts --parameters resourcePool=pool-for-ai --parameters resourcePoolBucketGroup=test-group ossutil api invoke-operation --op-name put-bucket-resource-pool-bucket-group --method PUT --bucket archived-comments --parameters resourcePool=pool-for-ai --parameters resourcePoolBucketGroup=test-group(Optional) List all buckets in the BucketGroup:
ossutil api invoke-operation --op-name list-resource-pool-bucket-groups --method GET --parameters resourcePool=pool-for-ai --parameters resourcePoolBucketGroupCreate
qos.xmlwith the bandwidth limits for the BucketGroup:<QoSConfiguration> <TotalUploadBandwidth>20</TotalUploadBandwidth> <IntranetUploadBandwidth>-1</IntranetUploadBandwidth> <ExtranetUploadBandwidth>10</ExtranetUploadBandwidth> <TotalDownloadBandwidth>30</TotalDownloadBandwidth> <IntranetDownloadBandwidth>-1</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>20</ExtranetDownloadBandwidth> </QoSConfiguration>Apply the bandwidth configuration to the BucketGroup:
ossutil api invoke-operation --op-name put-resource-pool-bucket-group-qos-info --method PUT --parameters resourcePoolBucketGroupQosInfo --parameters resourcePool pool-for-ai --parameters resourcePoolBucketGroup offline-group --body=file://qos.xml(Optional) Verify the configuration:
ossutil api invoke-operation --op-name get-resource-pool-bucket-group-qos-info --method GET --parameters resourcePool=pool-for-ai --parameters resourcePoolBucketGroup=offline-group --parameters resourcePoolBucketGroupQoSInfo
SDK
BucketGroup bandwidth limits are supported by Python SDK V2 and Go SDK V2.
Add a bucket to the BucketGroup: Python
import alibabacloud_oss_v2 as oss def put_bucket_resource_pool_bucket_group(): credentials_provider = oss.credentials.EnvironmentVariableCredentialsProvider() cfg = oss.config.load_default() cfg.credentials_provider = credentials_provider cfg.region = "cn-hangzhou" client = oss.Client(cfg) req = oss.OperationInput( op_name='PutBucketResourcePoolBucketGroup', method='PUT', parameters={ 'resourcePoolBucketGroup': 'example-group', # Replace with your BucketGroup name 'resourcePool': 'example-resource-pool', # Replace with your resource pool name }, headers=None, body=None, bucket='examplebucket', # Replace with your bucket name ) resp = client.invoke_operation(req) print(resp.status_code) if __name__ == "__main__": put_bucket_resource_pool_bucket_group()Create
qos.xmlwith the bandwidth limits (same content as the ossutil example above).Apply the bandwidth configuration to the BucketGroup: Python
import alibabacloud_oss_v2 as oss def put_resource_pool_bucket_group_qos_info(): credentials_provider = oss.credentials.EnvironmentVariableCredentialsProvider() cfg = oss.config.load_default() cfg.credentials_provider = credentials_provider cfg.region = "cn-hangzhou" client = oss.Client(cfg) with open('qos.xml', 'r') as f: qos_xml_body = f.read() req = oss.OperationInput( op_name='PutResourcePoolBucketGroupQoSInfo', method='PUT', parameters={ 'resourcePoolBucketGroupQosInfo': '', 'resourcePool': 'example-resource-pool', # Replace with your resource pool name 'resourcePoolBucketGroup': 'example-group', # Replace with your BucketGroup name }, headers=None, body=qos_xml_body, bucket=None, ) resp = client.invoke_operation(req) print(resp.status_code) if __name__ == "__main__": put_resource_pool_bucket_group_qos_info()
API
Call PutResourcePoolBucketGroupQoSInfo with the following request body:
<QoSConfiguration>
<TotalUploadBandwidth>20</TotalUploadBandwidth>
<IntranetUploadBandwidth>-1</IntranetUploadBandwidth>
<ExtranetUploadBandwidth>10</ExtranetUploadBandwidth>
<TotalDownloadBandwidth>30</TotalDownloadBandwidth>
<IntranetDownloadBandwidth>-1</IntranetDownloadBandwidth>
<ExtranetDownloadBandwidth>20</ExtranetDownloadBandwidth>
</QoSConfiguration>Set a bandwidth limit for a resource pool requester
Use this when multiple RAM users access different buckets in the same resource pool and you need to prevent any single user from monopolizing pool-wide bandwidth.
Console
Get the RAM user ID or RAM role ID.
On the Resource Pool QoS page, click the target resource pool name. On the Resource Pool Requester List tab, click Modify Throttling Configuration for the target RAM user or RAM role.
ossutil
Before you begin, install ossutil.
Create
qos.xmlwith the bandwidth limits:<QoSConfiguration> <TotalUploadBandwidth>100</TotalUploadBandwidth> <IntranetUploadBandwidth>50</IntranetUploadBandwidth> <ExtranetUploadBandwidth>50</ExtranetUploadBandwidth> <TotalDownloadBandwidth>200</TotalDownloadBandwidth> <IntranetDownloadBandwidth>150</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>50</ExtranetDownloadBandwidth> </QoSConfiguration>Get the RAM user ID or RAM role ID.
Apply the configuration (replace
examplepooland266xxxxwith your values):ossutil api invoke-operation --op-name put-resource-pool-requester-qos-info --method PUT --parameters resourcePool=examplepool --parameters qosRequester=266xxxx --parameters requesterQosInfo --body=file://qos.xml(Optional) List all RAM user configurations in the resource pool:
ossutil api invoke-operation --op-name list-resource-pool-requester-qos-infos --method GET --parameters resourcePool=examplePool --parameters requesterQosInfo
SDK
Resource pool requester bandwidth limits are supported by Python SDK V2 and Go SDK V2.
Create
qos.xmlwith the same content as the ossutil example above.Get the RAM user ID or RAM role ID.
Apply the configuration: Python
import alibabacloud_oss_v2 as oss def put_resource_pool_requester_qos_info(): credentials_provider = oss.credentials.EnvironmentVariableCredentialsProvider() cfg = oss.config.load_default() cfg.credentials_provider = credentials_provider cfg.region = "cn-hangzhou" client = oss.Client(cfg) with open('qos.xml', 'r') as f: qos_xml_body = f.read() req = oss.OperationInput( op_name='PutResourcePoolRequesterQoSInfo', method='PUT', parameters={ 'requesterQosInfo': '', 'resourcePool': 'example-resource-pool', # Replace with your resource pool name 'qosRequester': '2598732222222xxxx', # Replace with the RAM user or role ID }, headers=None, body=qos_xml_body, bucket=None, ) resp = client.invoke_operation(req) print(resp.status_code) print(resp.headers) print(resp.http_response.content) if __name__ == "__main__": put_resource_pool_requester_qos_info()
API
Get the RAM user ID or RAM role ID.
Call PutResourcePoolRequesterQoSInfo with the following request body:
<QoSConfiguration> <TotalUploadBandwidth>100</TotalUploadBandwidth> <IntranetUploadBandwidth>50</IntranetUploadBandwidth> <ExtranetUploadBandwidth>50</ExtranetUploadBandwidth> <TotalDownloadBandwidth>200</TotalDownloadBandwidth> <IntranetDownloadBandwidth>150</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>50</ExtranetDownloadBandwidth> </QoSConfiguration>
Configure priority-based throttling
Use priority-based throttling to guarantee minimum bandwidth for high-priority services. Pair it with threshold-based throttling to define both a floor and a ceiling for each object.
Set resource pool priorities
Use this when a resource pool contains multiple buckets and you need to ensure core service buckets get sufficient bandwidth even during contention.
ossutil
Create a priority configuration file named
priority-qos.xml:<PriorityQosConfiguration> <PriorityCount>3</PriorityCount> <DefaultPriorityLevel>1</DefaultPriorityLevel> <!-- Default minimum bandwidth commitment for unassigned priority levels --> <DefaultGuaranteedQosConfiguration> <TotalUploadBandwidth>10</TotalUploadBandwidth> <IntranetUploadBandwidth>5</IntranetUploadBandwidth> <ExtranetUploadBandwidth>5</ExtranetUploadBandwidth> <TotalDownloadBandwidth>20</TotalDownloadBandwidth> <IntranetDownloadBandwidth>10</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>10</ExtranetDownloadBandwidth> </DefaultGuaranteedQosConfiguration> <!-- Priority 3 (highest): core service buckets --> <QosPriorityLevelConfiguration> <PriorityLevel>3</PriorityLevel> <GuaranteedQosConfiguration> <TotalUploadBandwidth>50</TotalUploadBandwidth> <IntranetUploadBandwidth>20</IntranetUploadBandwidth> <ExtranetUploadBandwidth>30</ExtranetUploadBandwidth> <TotalDownloadBandwidth>80</TotalDownloadBandwidth> <IntranetDownloadBandwidth>30</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>50</ExtranetDownloadBandwidth> </GuaranteedQosConfiguration> <Subjects> <Bucket>critical-bucket</Bucket> <BucketGroup>core-group</BucketGroup> </Subjects> </QosPriorityLevelConfiguration> <!-- Priority 2: important service buckets --> <QosPriorityLevelConfiguration> <PriorityLevel>2</PriorityLevel> <GuaranteedQosConfiguration> <TotalUploadBandwidth>30</TotalUploadBandwidth> <IntranetUploadBandwidth>10</IntranetUploadBandwidth> <ExtranetUploadBandwidth>20</ExtranetUploadBandwidth> <TotalDownloadBandwidth>50</TotalDownloadBandwidth> <IntranetDownloadBandwidth>20</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>30</ExtranetDownloadBandwidth> </GuaranteedQosConfiguration> <Subjects> <Bucket>important-bucket</Bucket> </Subjects> </QosPriorityLevelConfiguration> </PriorityQosConfiguration>Apply the configuration (replace
hz-rp-03with your resource pool name):ossutil api invoke-operation --op-name put-resource-pool-priority-qos-configuration --method PUT --parameters resourcePool=hz-rp-03 --parameters priorityQos --body=file://priority-qos.xml(Optional) Verify the configuration:
ossutil api invoke-operation --op-name get-resource-pool-priority-qos-configuration --method GET --parameters resourcePool=hz-rp-03 --parameters priorityQos
SDK
Go
package main
import (
"bytes"
"context"
"crypto/md5"
"encoding/base64"
"fmt"
"os"
"github.com/aliyun/alibabacloud-oss-go-sdk-v2/oss"
"github.com/aliyun/alibabacloud-oss-go-sdk-v2/oss/credentials"
)
func PutResourcePoolPriorityQosConfiguration() {
// Replace cn-hangzhou with your bucket's region
cfg := oss.LoadDefaultConfig().
WithCredentialsProvider(credentials.NewEnvironmentVariableCredentialsProvider()).
WithRegion("cn-hangzhou")
client := oss.NewClient(cfg)
resourcePool := "hz-rp-01" // Replace with your resource pool name
qosConf, err := os.ReadFile("priority-qos.xml")
if err != nil {
fmt.Printf("failed to read priority-qos.xml: %v\n", err)
os.Exit(1)
}
calcMd5 := func(input []byte) string {
if len(input) == 0 {
return "1B2M2Y8AsgTpgAmY7PhCfg=="
}
h := md5.New()
h.Write(input)
return base64.StdEncoding.EncodeToString(h.Sum(nil))
}
input := &oss.OperationInput{
OpName: "PutResourcePoolPriorityQoSConfiguration",
Method: "PUT",
Parameters: map[string]string{
"priorityQos": "",
"resourcePool": resourcePool,
},
Headers: map[string]string{
"Content-MD5": calcMd5(qosConf),
},
Body: bytes.NewReader(qosConf),
Bucket: nil,
}
res, err := client.InvokeOperation(context.TODO(), input)
if err != nil {
fmt.Printf("invoke operation got error: %v\n", err)
os.Exit(1)
}
fmt.Println("PutResourcePoolPriorityQoSConfiguration result:", res.Status)
}API
Set resource pool requester priorities
Use this in a multi-tenant Software as a Service (SaaS) platform where customers of different tiers access the same resource pool. Assign higher priority to premium customers to guarantee their bandwidth, while standard customers share the remaining resources.
ossutil
Create a requester priority configuration file named
requester-priority-qos.xml:<PriorityQosConfiguration> <PriorityCount>3</PriorityCount> <DefaultPriorityLevel>1</DefaultPriorityLevel> <!-- Default minimum bandwidth commitment for unassigned requesters --> <DefaultGuaranteedQosConfiguration> <TotalUploadBandwidth>10</TotalUploadBandwidth> <IntranetUploadBandwidth>5</IntranetUploadBandwidth> <ExtranetUploadBandwidth>5</ExtranetUploadBandwidth> <TotalDownloadBandwidth>20</TotalDownloadBandwidth> <IntranetDownloadBandwidth>10</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>10</ExtranetDownloadBandwidth> </DefaultGuaranteedQosConfiguration> <!-- Priority 3 (highest): premium customers --> <QosPriorityLevelConfiguration> <PriorityLevel>3</PriorityLevel> <GuaranteedQosConfiguration> <TotalUploadBandwidth>60</TotalUploadBandwidth> <IntranetUploadBandwidth>20</IntranetUploadBandwidth> <ExtranetUploadBandwidth>40</ExtranetUploadBandwidth> <TotalDownloadBandwidth>100</TotalDownloadBandwidth> <IntranetDownloadBandwidth>40</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>60</ExtranetDownloadBandwidth> </GuaranteedQosConfiguration> <Subjects> <Requester>123456789012****</Requester> <Requester>234567890123****</Requester> </Subjects> </QosPriorityLevelConfiguration> <!-- Priority 2: standard customers --> <QosPriorityLevelConfiguration> <PriorityLevel>2</PriorityLevel> <GuaranteedQosConfiguration> <TotalUploadBandwidth>30</TotalUploadBandwidth> <IntranetUploadBandwidth>10</IntranetUploadBandwidth> <ExtranetUploadBandwidth>20</ExtranetUploadBandwidth> <TotalDownloadBandwidth>50</TotalDownloadBandwidth> <IntranetDownloadBandwidth>20</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>30</ExtranetDownloadBandwidth> </GuaranteedQosConfiguration> <Subjects> <Requester>345678901234****</Requester> </Subjects> </QosPriorityLevelConfiguration> </PriorityQosConfiguration>Apply the configuration:
ossutil api invoke-operation --op-name put-resource-pool-requester-priority-qos-configuration --method PUT --parameters resourcePool=hz-rp-03 --parameters requesterPriorityQos --body=file://requester-priority-qos.xml(Optional) Verify the configuration:
ossutil api invoke-operation --op-name get-resource-pool-requester-priority-qos-configuration --method GET --parameters resourcePool=hz-rp-03 --parameters requesterPriorityQos
SDK
Go
package main
import (
"bytes"
"context"
"crypto/md5"
"encoding/base64"
"fmt"
"os"
"github.com/aliyun/alibabacloud-oss-go-sdk-v2/oss"
"github.com/aliyun/alibabacloud-oss-go-sdk-v2/oss/credentials"
)
func PutResourcePoolRequesterPriorityQosConfiguration() {
cfg := oss.LoadDefaultConfig().
WithCredentialsProvider(credentials.NewEnvironmentVariableCredentialsProvider()).
WithRegion("cn-hangzhou") // Replace with your region
client := oss.NewClient(cfg)
resourcePool := "hz-rp-01" // Replace with your resource pool name
qosConf, err := os.ReadFile("requester-priority-qos.xml")
if err != nil {
fmt.Printf("failed to read requester-priority-qos.xml: %v\n", err)
os.Exit(1)
}
calcMd5 := func(input []byte) string {
if len(input) == 0 {
return "1B2M2Y8AsgTpgAmY7PhCfg=="
}
h := md5.New()
h.Write(input)
return base64.StdEncoding.EncodeToString(h.Sum(nil))
}
input := &oss.OperationInput{
OpName: "PutResourcePoolRequesterPriorityQoSConfiguration",
Method: "PUT",
Parameters: map[string]string{
"requesterPriorityQos": "",
"resourcePool": resourcePool,
},
Headers: map[string]string{
"Content-MD5": calcMd5(qosConf),
},
Body: bytes.NewReader(qosConf),
Bucket: nil,
}
res, err := client.InvokeOperation(context.TODO(), input)
if err != nil {
fmt.Printf("invoke operation got error: %v\n", err)
os.Exit(1)
}
fmt.Println("PutResourcePoolRequesterPriorityQoSConfiguration result:", res.Status)
}API
Monitoring and alerting
Monitor bandwidth usage
Go to CloudMonitor - Object Storage Service Resource Pool to view real-time bandwidth usage for each service in the resource pool.
Set bandwidth alerts
Create alert rules in CloudMonitor to get notified before bandwidth issues affect critical services. For example, trigger an alert when bandwidth usage exceeds 80% to give yourself time to adjust configurations before peak traffic hits.
Going live
Capacity planning
Follow these guidelines before deploying resource pool QoS in production.
Keep total minimum commitments below 50% of pool bandwidth.
Reserve at least 50% of bandwidth as elastic headroom for dynamic scheduling. This improves overall utilization and prevents high-priority objects from being starved when demand spikes unexpectedly.
Example configuration for a 100 Gbps pool:
Priority 3 minimum commitment: 20 Gbps
Priority 2 minimum commitment: 20 Gbps
Priority 1 minimum commitment: 10 Gbps
Total committed: 50 Gbps (50 Gbps elastic headroom)Use 3 to 5 priority levels.
More levels increase management complexity without meaningful benefit. A practical tier structure:
Core services: Priority 4–5
Important services: Priority 3
Regular services: Priority 1–2
Set threshold limits above minimum commitments.
This lets high-priority objects burst beyond their guaranteed floor when bandwidth is available:
Minimum commitment (floor): Bucket A — 50 Gbps
Threshold-based limit (ceiling): Bucket A — 80 Gbps
Actual available bandwidth: 50–80 GbpsBest practices
Video-on-demand platform
Live streams: Priority 3, minimum commitment 50 Gbps
On-demand content: Priority 1, minimum commitment 20 Gbps
CDN back-to-origin: Threshold-based limit 100 Gbps
Multi-tenant SaaS platform
Enterprise Edition customers: Priority 3, with a minimum bandwidth commitment
Free Edition customers: Priority 1, sharing the remaining bandwidth
Single-tenant cap: Threshold-based throttling to prevent any one tenant from monopolizing bandwidth
Data lake analytics
Real-time analytics: Priority 2, minimum commitment 30 Gbps
Offline analytics: Priority 1, minimum commitment 20 Gbps
Archived data: Threshold-based limit 10 Gbps
Risk prevention
Review quota usage regularly. Use CloudMonitor to track bandwidth usage trends for each object and adjust configurations promptly:
If the minimum bandwidth commitment for high-priority objects is consistently satisfied less than 95% of the time, increase that commitment or reduce commitments for lower-priority objects.
If low-priority objects are unable to get any bandwidth for extended periods, reduce high-priority commitments or scale out the resource pool.
Set multi-level alerts:
Warning level (80%): Prepare a scale-out plan.
Critical level (90%): Start the emergency response immediately.
Avoid configuration conflicts:
The sum of minimum bandwidth commitments cannot exceed the resource pool's total bandwidth.
Threshold-based limits must be higher than priority-based minimum commitments.
When a bucket belongs to a BucketGroup, the BucketGroup's priority applies — not the bucket's individual priority.
Test changes before production:
Validate configuration changes in a staging environment first.
Save the current configuration before making changes to enable quick rollback.
Apply changes during off-peak hours.
Quotas and limits
Configuration changes take effect within 5 minutes.
| Resource | Quota/Limit |
|---|---|
| Resource pools per region | 100 |
| Buckets per resource pool | 100 |
| BucketGroups per resource pool | 100 |
| Requesters with throttling per resource pool | 300 |
| BucketGroup name length | 3–30 characters |
| BucketGroup name characters | Lowercase letters, digits, hyphens (-) |
| Priority levels per resource pool | 3–10 (integer) |
| Priority level value | Integer from 1 to the total number of priority levels |
| Minimum bandwidth commitment constraint | Sum of all commitments must not exceed total pool bandwidth |
| Minimum bandwidth commitment floor | At least MIN[5, (upper-level threshold) / (2 x number of priority levels)] Gbps |
| Bandwidth parameter: positive integer | Sets limit in Gbps |
| Bandwidth parameter: -1 | Unlimited (uses shared pool bandwidth) |
| Bandwidth parameter: 0 | Blocks all traffic — use with caution |