Updated on 2026-11-24 GMT+08:00

Configuring QoS for a Bucket

Function

This API configures QoS limits, such as queries per second (QPS), byte per second (BPS), and concurrent requests, for a bucket.

Constraints

  • Bucket QoS is currently under closed beta test and is available only to invited tenants.
  • Currently, only bucket-level QoS rules can be created by users. To adjust account-level QoS rules, submit a service ticket to contact technical support. If no bucket-level QoS rule is configured for a bucket, the bucket can use up to the maximum cluster resources available to the account.
  • If there is no limit on the metrics of the cluster to which the bucket belongs, the maximum value that can be configured for the corresponding bucket-level metric is 263 – 1.
  • Traffic control is triggered when either the QPS or bandwidth threshold is exceeded. When this happens, request latency increases, and the response includes the x-obs-qos-delay-time header, which indicates the duration for which the request was throttled, in milliseconds (ms). Upload requests (such as PUT uploads and part uploads) return the exact throttling duration. However, download requests (such as object downloads) only return an estimate based on the degree of throttling and the object size.
  • Traffic control is triggered when the concurrent request threshold is exceeded. When this happens, requests fail immediately with HTTP 429. When QPS or bandwidth traffic control is triggered, the resulting increase in request latency can also lead to more concurrent requests.

Authorization

To call this API, you must be the bucket owner or have the permission to configure bucket QoS. You are advised to use IAM or bucket policies for authorization.

  • If you use IAM for authorization, you need to use either role/policy-based authorization or identity policy-based authorization and configure the required permissions:
    • If you use role/policy-based authorization (IAM v3 APIs in the old IAM version), you must have the obs:bucket:PutBucketQosInfo permission. For details, see Creating a Custom IAM Policy.
    • If you use identity policy-based authorization (IAM v5 APIs in the new IAM version), you must have the obs:bucket:putBucketQosInfo permission, as shown in the following table. For details, see Creating a Custom IAM Identity Policy.

      Action

      Access Level

      Resource Type (*: Required)

      Condition Key

      Alias

      Dependencies

      obs:bucket:putBucketQosInfo

      Write

      bucket *

      -

      -

      -

      • obs:EpochTime
      • obs:SourceIp
      • obs:TlsVersion
      • obs:CustomDomain
  • If you use bucket policies for authorization, you must have the obs:bucket:PutBucketQosInfo permission. For details, see Creating a Custom Bucket Policy.

URI

PUT /

Request Syntax

The following is an example request. Replace BucketName with your bucket name and RegionID with the ID of the region where your bucket resides. You can obtain the region ID by referring to Supported Regions.

PUT /?x-obs-qosInfo HTTP/1.1
User-Agent: curl/7.29.0
Host: BucketName.obs.RegionID.myhuaweicloud.com 
Accept: */*
Date: GMT Date
Authorization: SignatureValue
Content-Type: application/xml
Content-Length: length

<?xml version="1.0" encoding="UTF-8"?>
<PutBucketQoSRequestBody>
    <QoSConfiguration>
        <QoSRule>
            <NetworkType>extranet</NetworkType>
            <ConcurrentRequestLimit>0</ConcurrentRequestLimit>
            <QpsLimit>
                <Get>1500</Get>
                <PutPostDelete>1000</PutPostDelete>
                <List>1500</List>
            </QpsLimit>
            <BpsLimit>
                <Get>512000</Get>
                <PutPost>512000</PutPost>
                <Total>512000</Total>
            </BpsLimit>
        </QoSRule>
        <QoSRule>
            <NetworkType>intranet</NetworkType>
            <ConcurrentRequestLimit>1000</ConcurrentRequestLimit>
            <QpsLimit>
                <Get>1500</Get>
                <PutPostDelete>1000</PutPostDelete>
                <List>1000</List>
            </QpsLimit>
            <BpsLimit>
                <Get>512000</Get>
                <PutPost>512000</PutPost>
                <Total>512000</Total>
            </BpsLimit>
        </QoSRule>
        <QoSRule>
            <NetworkType>total</NetworkType>
            <ConcurrentRequestLimit>1000</ConcurrentRequestLimit>
            <QpsLimit>
                <Get>2000</Get>
                <PutPostDelete>2000</PutPostDelete>
                <List>2000</List>
              </QpsLimit>
            <BpsLimit>
                <Get>1024000</Get>
                <PutPost>1024000</PutPost>
            </BpsLimit>
        </QoSRule>
    </QoSConfiguration>
</PutBucketQoSRequestBody>

URI Parameters

Table 1 URI parameters

Parameter

Mandatory

Type

Description

x-obs-qosInfo

Yes

String

Definition

An identifier that marks this API as related to bucket QoS.

Constraints

When calculating the signature, add /BucketName/?x-obs-qosInfo to CanonicalizedResource. For details, see Using an Authorization Header.

Range

x-obs-qosInfo

Default Value

N/A

Request Headers

This request uses common headers. For details, see Table 3.

Request Body

The request for configuring bucket QoS must contain the bucket QoS configuration in elements. The request body is in XML format. For details about the elements, see Table 2.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

PutBucketQoSRequestBody

Yes

Container

Definition

Root element of bucket QoS configuration parameters. PutBucketQoSRequestBody is the parent node of QoSConfiguration.

Constraints

N/A

Range

N/A

Default Value

N/A

QoSConfiguration

Yes

Container

Definition

QoS configuration of a bucket.

Constraints

N/A

Range

For details, see QoSConfiguration.

Default Value

N/A

Table 3 QoSConfiguration

Parameter

Mandatory

Type

Description

QoSRule

No

Container

Definition

A bucket QoS rule.

Constraints

N/A

Range

For details, see QoSRule.

Default Value

N/A

Table 4 QoSRule

Parameter

Mandatory

Type

Description

NetworkType

Yes

Enum

Definition

QoS limit range of a bucket.

Constraints

The value must be unique.

Range

  • total: total QoS limit
  • extranet: Internet QoS limit
  • intranet: intranet QoS limit

Default Value

N/A

ConcurrentRequestLimit

No

Integer

Definition

Maximum number of concurrent bucket requests. Concurrency refers to the number of requests that are being processed at the same time. The unit is requests/s.

Constraints

  • The value 0 indicates no limit.
  • The value must be at least 1000 and no greater than the concurrency limit of the cluster to which the bucket belongs.

Range

0 to 9223372036854775807

Default Value

N/A

QpsLimit

No

Container

Definition

QPS limit rule for bucket requests.

Constraints

  • The value must be at least 1000 and no greater than the QPS limit of the cluster to which the bucket belongs.

Range

For details, see QpsLimit.

Default Value

N/A

BpsLimit

No

Container

Definition

Bandwidth limit rule for bucket requests.

Constraints

  • The value must be at least 512000 and no greater than the BPS limit of the cluster to which the bucket belongs.

Range

For details, see BpsLimit.

Default Value

N/A

Table 5 QpsLimit

Parameter

Mandatory

Type

Description

Get

No

Integer

Definition

QPS limit of bucket download requests. Unit: requests/s.

Constraints

  • The value 0 indicates no limit.
  • The value must be at least 1000 and no greater than the download QPS limit of the cluster to which the bucket belongs.

Range

0 to 9223372036854775807

Default Value

N/A

PutPostDelete

No

Integer

Definition

QPS limit of bucket upload requests. Unit: requests/s.

Constraints

  • The value 0 indicates no limit.
  • The value must be at least 1000 and no greater than the upload QPS limit of the cluster to which the bucket belongs.

Range

0 to 9223372036854775807

Default Value

N/A

List

No

Integer

Definition

QPS limit of bucket listing requests. Unit: requests/s.

Constraints

  • The value 0 indicates no limit.
  • The value must be at least 1000 and no greater than the request listing QPS limit of the cluster to which the bucket belongs.

Range

0 to 9223372036854775807

Default Value

N/A

Total

No

Integer

Definition

QPS limit of total requests for a bucket. Unit: requests/s. List requests are not included.

Constraints

  • The value 0 indicates no limit.
  • The value must be at least 1000 and no greater than the total QPS limit of the cluster to which the bucket belongs.

Range

0 to 9223372036854775807

Default Value

N/A

Table 6 BpsLimit

Parameter

Mandatory

Type

Description

Get

No

Integer

Definition

Bandwidth limit of bucket download requests. Unit: Byte/s.

Constraints

  • The value 0 indicates no limit.
  • The value must be at least 512000 and no greater than the download BPS limit of the cluster to which the bucket belongs.

Range

0 to 9223372036854775807

Default Value

N/A

PutPost

No

Integer

Definition

Bandwidth limit for bucket upload requests. Unit: Byte/s.

Constraints

  • The value 0 indicates no limit.
  • The value must be at least 512000 and no greater than the upload BPS limit of the cluster to which the bucket belongs.

Range

0 to 9223372036854775807

Default Value

N/A

Total

No

Integer

Definition

Maximum total bandwidth of bucket requests. Unit: Byte/s.

Constraints

  • The value 0 indicates no limit.
  • The value must be at least 512000 and no greater than the total BPS limit of the cluster to which the bucket belongs.

Range

0 to 9223372036854775807

Default Value

N/A

Response Syntax

HTTP/1.1 status_code
Server: OBS
x-obs-request-id: request id
x-obs-id-2: id
Date: date
Content-Length: length

Response Headers

This response uses common headers. For details, see Table 1.

Response Body

This response does not contain a response body.

Error Responses

No special errors. You can find all errors in Error Code Overview.

Sample Request 1: Configuring the Total QoS for a Bucket

Set the maximum total QPS of bucket requests to 2,000 and the maximum total bandwidth of bucket requests to 1,024,000.

PUT /?x-obs-qosInfo HTTP/1.1
User-Agent: curl/7.29.0
Host: bucketname.obs.region.myhuaweicloud.com 
Accept: */*
Date: Wed, 21 May 2025 08:22:54 +0000
Authorization: OBS UDSIAMSTUBTEST000254:ydH8ffpcbS6YpeOMcEZfn0wE90c=
Content-Type: application/xml
Content-Length: 628

<?xml version="1.0" encoding="UTF-8"?>
<PutBucketQoSRequestBody>
    <QoSConfiguration>
        <QoSRule>
            <NetworkType>total</NetworkType>
            <ConcurrentRequestLimit>2000</ConcurrentRequestLimit>
            <QpsLimit>
                <Get>1500</Get>
                <PutPostDelete>1000</PutPostDelete>
            </QpsLimit>
            <BpsLimit>
                <Get>512000</Get>
                <PutPost>512000</PutPost>
            </BpsLimit>
        </QoSRule>
    </QoSConfiguration>
</PutBucketQoSRequestBody>

Sample Response 1

HTTP/1.1 200 OK
Server: OBS
x-obs-request-id: 00000196F1F037525306DC088DF06BD5
x-obs-id-2: 36AAAQAAEAABSAAgAAEAABAAAQAAEAABAAAaI=AAAAAAAAAAAAAAAAAAAAAAAAAA
Date: Wed, 21 May 2025 08:22:54 GMT
Content-Length: 0

Sample Request 2: Configuring the Total and Internet Bandwidth QoS for a Bucket

Set the QPS limit for Internet/intranet download requests to 1,000 and the bandwidth limit for Internet/intranet download requests to 512,000.

PUT /?x-obs-qosInfo HTTP/1.1
User-Agent: curl/7.29.0
Host: bucketname.obs.region.myhuaweicloud.com 
Accept: */*
Date: Wed, 21 May 2025 08:40:18 +0000
Authorization: OBS UDSIAMSTUBTEST000254:ydH8ffpcbS6YpeOMcEZfn0wE90c=
Content-Type: application/xml
Content-Length: 1121

<?xml version="1.0" encoding="UTF-8"?>
<PutBucketQoSRequestBody>
    <QoSConfiguration>
        <QoSRule>
            <NetworkType>extranet</NetworkType>
            <BpsLimit>
                <Get>512000</Get>
                <PutPost>512000</PutPost>
            </BpsLimit>
        </QoSRule>
        <QoSRule>
            <NetworkType>total</NetworkType>
            <ConcurrentRequestLimit>0</ConcurrentRequestLimit>
            <QpsLimit>
                <Get>1000</Get>
                <PutPostDelete>0</PutPostDelete>
                <List>1000</List>
            </QpsLimit>
            <BpsLimit>
                <Get>1024000</Get>
                <PutPost>1024000</PutPost>
            </BpsLimit>
        </QoSRule>
    </QoSConfiguration>
</PutBucketQoSRequestBody>

Sample Response 2

HTTP/1.1 200 OK
Server: OBS
x-obs-request-id: 00000196F20026245306A7D73C891518
x-obs-id-2: 36AAAQAAEAABSAAgAAEAABAAAQAAEAABAAAaI=AAAAAAAAAAAAAAAAAAAAAAAAAA
Date: Wed, 21 May 2025 08:40:18 GMT
Content-Length: 0