After you add multiple buckets within your Alibaba Cloud account to the same resource pool, you can configure the bandwidth throttling for buckets and requesters who access the buckets in a fine-grained manner based on your business requirements.
Prerequisites
Resource pool QoS is in invitational preview. If the throughput of your OSS buckets in a region has reached or exceeded 500 Gbps, you can contact technical support to apply for this feature.
ossutil 2.0 is installed.
Configuration examples
Example | Description |
Specify the maximum bandwidth that multiple RAM users can use to access a resource pool | When multiple requesters access different buckets in the same resource pool at the same time as RAM users, you can specify the maximum bandwidth of different RAM users to prevent a RAM user from overusing the bandwidth of the resource pool. |
Specify the maximum bandwidth of a RAM user to access buckets | When different applications access the same bucket in a resource pool, you can specify the maximum bandwidth that a specific RAM user can use to access the bucket. This prevents the RAM user from overusing the bandwidth of the bucket. |
When different applications access different buckets in a resource pool, you can specify the maximum bandwidth of a bucket to prevent the traffic spikes on a single bucket from preempting the bandwidth of other buckets. | |
When you access, preview, or download objects in a bucket in a resource pool over the Internet, outbound traffic is generated. You can specify the maximum download bandwidth over the Internet of the bucket to prevent high traffic fees caused by high concurrent access. | |
Specify the maximum bandwidth that multiple cloud services can use to access a bucket | In most cases, applications or services use RAM roles to access OSS across services. This way, you can specify the maximum bandwidth that a RAM role can use to access a specific bucket in a resource pool. This prevents the RAM role from consuming excessive bandwidth and affecting other services. |
Specify the maximum bandwidth that multiple RAM users can use to access a resource pool
The following examples describe how to specify the maximum bandwidth that two RAM users can use to access a resource pool:
Specify the maximum bandwidth that RAM user A can use to access the resource pool.
Use the local qos.xml configuration file to specify the maximum bandwidth that RAM user A can use to access the resource pool.
Set the total maximum upload bandwidth to 100 Gbit/s. The maximum upload bandwidth over the internal network is 50 Gbit/s, and the maximum upload bandwidth over the Internet is 50 Gbit/s.
Set the total maximum download bandwidth to 200 Gbit/s. The maximum download bandwidth over the internal network is 150 Gbit/s, and the maximum download bandwidth over the Internet is 50 Gbit/s.
Retain the default value -1 for the total queries per second (QPS), QPS for the internal network, and QPS for the Internet, which specifies that no limits are imposed on these items.
<QoSConfiguration> <TotalUploadBandwidth>100</TotalUploadBandwidth> <IntranetUploadBandwidth>50</IntranetUploadBandwidth> <ExtranetUploadBandwidth>50</ExtranetUploadBandwidth> <TotalDownloadBandwidth>200</TotalDownloadBandwidth> <IntranetDownloadBandwidth>150</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>50</ExtranetDownloadBandwidth> <TotalQps>-1</TotalQps> <IntranetQps>-1</IntranetQps> <ExtranetQps>-1</ExtranetQps> </QoSConfiguration>
Add the preceding bandwidth configurations to RAM user A whose UID is 266xxxx.
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
Specify the maximum bandwidth that RAM user B can use to access the resource pool.
Use the local qos.xml configuration file to specify the maximum bandwidth that RAM user B can use to access the resource pool.
Set the total maximum upload bandwidth to 50 Gbit/s. The maximum upload bandwidth over the internal network is 30 Gbit/s, and the maximum upload bandwidth over the Internet is 20 Gbit/s.
Set the total maximum download bandwidth to 50 Gbit/s. The maximum download bandwidth over the internal network is 30 Gbit/s, and the maximum download bandwidth over the Internet is 20 Gbit/s.
Retain the default value -1 for the total QPS, QPS for the internal network, and QPS for the Internet, which specifies that no limits are imposed on these items.
<QoSConfiguration> <TotalUploadBandwidth>50</TotalUploadBandwidth> <IntranetUploadBandwidth>30</IntranetUploadBandwidth> <ExtranetUploadBandwidth>20</ExtranetUploadBandwidth> <TotalDownloadBandwidth>50</TotalDownloadBandwidth> <IntranetDownloadBandwidth>30</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>20</ExtranetDownloadBandwidth> <TotalQps>-1</TotalQps> <IntranetQps>-1</IntranetQps> <ExtranetQps>-1</ExtranetQps> </QoSConfiguration>
Add the preceding bandwidth configurations to RAM user B whose UID is 242xxxx.
ossutil api invoke-operation --op-name put-resource-pool-requester-qos-info --method PUT --parameters resourcePool=examplepool --parameters qosRequester=242xxxx --parameters requesterQosInfo --body=file://qos.xml
For more information about how to view the UID of a RAM user, see View the information about a RAM user.
Specify the maximum bandwidth that a RAM user can use to access buckets
The following example describes how to specify the maximum bandwidth that a RAM user can use to access a bucket in a resource pool:
Use the local qos.xml configuration file to specify the maximum bandwidth that a specific RAM user can use to access a bucket in a resource pool.
Set the total maximum upload bandwidth to 100 Gbit/s. No limits are imposed on the upload bandwidth over the internal network and the upload bandwidth over the Internet.
Set the total maximum download bandwidth to 100 Gbit/s. No limits are imposed on the download bandwidth over the internal network and the download bandwidth over the Internet.
Retain the default value -1 for the total QPS, QPS for the internal network, and QPS for the Internet, which specifies that no limits are imposed on these items.
<QoSConfiguration> <TotalUploadBandwidth>100</TotalUploadBandwidth> <IntranetUploadBandwidth>-1</IntranetUploadBandwidth> <ExtranetUploadBandwidth>-1</ExtranetUploadBandwidth> <TotalDownloadBandwidth>100</TotalDownloadBandwidth> <IntranetDownloadBandwidth>-1</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>-1</ExtranetDownloadBandwidth> <TotalQps>-1</TotalQps> <IntranetQps>-1</IntranetQps> <ExtranetQps>-1</ExtranetQps> </QoSConfiguration>
Add the preceding bandwidth configurations to a RAM user whose UID is 266xxxx for access to a bucket named examplebucket.
ossutil api invoke-operation --op-name put-bucket-requester-qos-info --method PUT --bucket=examplebucket --parameters requesterQosInfo --parameters qosRequester=266xxxx --body file://qos.xml
Specify the total maximum bandwidth of a bucket
The following example describes how to specify the total maximum bandwidth of a bucket in a resource pool:
Use the local qos.xml configuration file to specify the total maximum bandwidth of a bucket in a resource pool.
Set the total maximum upload bandwidth to 100 Gbit/s. No limits are imposed on the upload bandwidth over the internal network and the upload bandwidth over the Internet.
Set the total download bandwidth to 200 Gbit/s. No limits are imposed on the download bandwidth over the internal network and the download bandwidth over the Internet.
<QoSConfiguration> <TotalUploadBandwidth>100</TotalUploadBandwidth> <IntranetUploadBandwidth>-1</IntranetUploadBandwidth> <ExtranetUploadBandwidth>-1</ExtranetUploadBandwidth> <TotalDownloadBandwidth>200</TotalDownloadBandwidth> <IntranetDownloadBandwidth>-1</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>-1</ExtranetDownloadBandwidth> </QoSConfiguration>
Add the preceding bandwidth configurations to a bucket named examplebucket.
ossutil api invoke-operation --op-name put-bucket-qos-info --method PUT --bucket examplebucket --parameters qosInfo --body=file://qos.xml
Specify the maximum bandwidth over the Internet of a bucket
The following example describes how to specify the maximum bandwidth over the Internet of a bucket in a resource pool:
Use the local qos.xml configuration file to specify the maximum bandwidth over the Internet of a bucket.
Set the total maximum upload bandwidth to 100 Gbit/s. No limits are imposed on the upload bandwidth over the internal network, and the maximum upload bandwidth over the Internet is 20 Gbit/s.
Set the total maximum download bandwidth to 100 Gbit/s. No limits are imposed on the download bandwidth over the internal network, and the maximum download bandwidth over the Internet is 20 Gbit/s.
<QoSConfiguration> <TotalUploadBandwidth>100</TotalUploadBandwidth> <IntranetUploadBandwidth>-1</IntranetUploadBandwidth> <ExtranetUploadBandwidth>20</ExtranetUploadBandwidth> <TotalDownloadBandwidth>100</TotalDownloadBandwidth> <IntranetDownloadBandwidth>-1</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>20</ExtranetDownloadBandwidth> </QoSConfiguration>
Add the preceding bandwidth configurations to a bucket named examplebucket.
ossutil api invoke-operation --op-name put-bucket-qos-info --method PUT --bucket examplebucket --parameters qosInfo --body=file://qos.xml
Specify the maximum bandwidth that multiple cloud services can use to access objects in a bucket
The following examples describe how to specify the maximum bandwidth that Alibaba Cloud CDN and Cloud Parallel File Storage (CPFS) can use to access a bucket in a resource pool:
Configure the maximum bandwidth of a RAM role when you use the RAM role to retrieve objects from a private bucket by using Alibaba Cloud CDN
You use a private bucket in a resource pool to store static objects and use Alibaba Cloud CDN to accelerate the delivery of the static objects. To ensure that the Alibaba Cloud CDN can obtain the required static objects from the private bucket, you must enable origin fetch from private OSS buckets for Alibaba Cloud CDN. Then, Alibaba Cloud CDN can access objects in the private bucket by using a RAM role named
AliyunCDNAccessingPrivateOSSRole
.Use the local qos.xml configuration file to specify the maximum bandwidth that the RAM role can use to access objects in the bucket.
Set the total maximum upload bandwidth to 20 Gbit/s. No limits are imposed on the upload bandwidth over the internal network and the upload bandwidth over the Internet.
Set the total maximum download bandwidth to 40 Gbit/s. No limits are imposed on the download bandwidth over the internal network and the download bandwidth over the Internet.
Retain the default value -1 for the total QPS, QPS for the internal network, and QPS for the Internet, which specifies that no limits are imposed on these items.
<QoSConfiguration> <TotalUploadBandwidth>20</TotalUploadBandwidth> <IntranetUploadBandwidth>-1</IntranetUploadBandwidth> <ExtranetUploadBandwidth>-1</ExtranetUploadBandwidth> <TotalDownloadBandwidth>40</TotalDownloadBandwidth> <IntranetDownloadBandwidth>-1</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>-1</ExtranetDownloadBandwidth> <TotalQps>-1</TotalQps> <IntranetQps>-1</IntranetQps> <ExtranetQps>-1</ExtranetQps> </QoSConfiguration>
Add the preceding bandwidth configurations to a RAM role whose ID 362xxxx for access to objects in a bucket named examplebucket.
ossutil api invoke-operation --op-name put-bucket-requester-qos-info --method PUT --bucket=examplebucket --parameters requesterQosInfo --parameters qosRequester=362xxxx --body file://qos.xml
Configure the maximum bandwidth of a RAM role when you use the RAM role to access objects in a bucket by using CPFS
In high-performance computing and AI training scenarios, you need to frequently read a large amount of training data from and write a large amount of training data to OSS buckets. To improve data read and write efficiency, you can use CPFS to create a data flow task to quickly load data from OSS to CPFS. During data loading, CPFS assumes the
AliyunServiceRoleForNasOssDataFlow
role to query, read, and write data in the specified bucket in OSS.Use the local qos.xml configuration file to specify the maximum bandwidth that the RAM role can use to access objects in the bucket.
Set the total maximum upload bandwidth to 30 Gbit/s. No limits are imposed on the upload bandwidth over the internal network and the upload bandwidth over the Internet.
Set the total maximum download bandwidth to 50 Gbit/s. No limits are imposed on the download bandwidth over the internal network and the download bandwidth over the Internet.
Retain the default value -1 for the total QPS, QPS for the internal network, and QPS for the Internet, which specifies that no limits are imposed on these items.
<QoSConfiguration> <TotalUploadBandwidth>30</TotalUploadBandwidth> <IntranetUploadBandwidth>-1</IntranetUploadBandwidth> <ExtranetUploadBandwidth>-1</ExtranetUploadBandwidth> <TotalDownloadBandwidth>50</TotalDownloadBandwidth> <IntranetDownloadBandwidth>-1</IntranetDownloadBandwidth> <ExtranetDownloadBandwidth>-1</ExtranetDownloadBandwidth> <TotalQps>-1</TotalQps> <IntranetQps>-1</IntranetQps> <ExtranetQps>-1</ExtranetQps> </QoSConfiguration>
Add the preceding bandwidth configurations to a RAM role whose ID 300xxxx for access to objects in a bucket named examplebucket.
ossutil api invoke-operation --op-name put-bucket-requester-qos-info --method PUT --bucket=examplebucket --parameters requesterQosInfo --parameters qosRequester=300xxxx --body file://qos.xml
For more information about how to view the ID of a RAM role, see View the information about a RAM role.
Reference
Once you have configured the resource pool, established the associations between the resource pool and requesters, and set the bandwidth thresholds for the resource pool and buckets, you can use CloudMonitor to view the threshold values and monitor bandwidth utilization.