Single-link rate limit
Single-link rate limit
Baidu AI Cloud Object Storage (BOS) provides a public network bandwidth limit of 10 Gbit/s per bucket and an intranet bandwidth limit of 50 Gbit/s per bucket. When the upload or download usage reaches the bandwidth limit, the error code RequestRateLimitExceeded will be returned. To ensure normal service usage, BOS supports traffic control during uploads and downloads to prevent high traffic services from affecting other applications.
Application method
When users use the following APIs
- Upload request APIs: PutObject, AppendObject, PostObject, UploadPart, UploadPartCopy;
- Copy request API: CopyObject;
- Download the requested API: GetObject.
They can carry the x-bce-traffic-limit parameter in the request header or request parameters and specify a speed limit value. The value range of the speed limit is 819,200~838,860,800, in bit/s, which is 100 KB/s~100 MB/s. The rate limit value must be a number. BOS will limit the rate of this request according to the specified rate limit value. When the rate limit value is not within this range or is illegal, it will return the error code 400.
Upload request example
1PUT /<ObjectName> HTTP/1.1
2Host: <BucketName>.bj.bcebos.com
3Date: <Date>
4Authorization: <AuthorizationString>
5Content-Type: text/plain
6Content-Length: <Content_Length>
7x-bce-storage-class: <Storage_class>
8x-bce-traffic-limit: 819200
9[11434 bytes of object data]
1PUT /<ObjectName>?x-bce-traffic-limit=819200 HTTP/1.1
2Host: <BucketName>.bj.bcebos.com
3Date: <Date>
4Authorization: <AuthorizationString>
5Content-Type: text/plain
6Content-Length: <Content_Length>
7x-bce-storage-class: <Storage_class>
8[11434 bytes of object data]
Download request example
1GET /<ObjectKey> HTTP/1.1
2Host: <BucketName>.bj.bcebos.com
3Date: <Date>
4Authorization: <AuthorizationString>
5Range: <Range_String>
6x-bce-traffic-limit: 819200
1https://<BucketName>.bj.bcebos.com/<ObjectName>?x-bce-traffic-limit=819200
Note: For private files, when generating a signed external link, the speed limit parameter
x-bce-traffic-limit=819200needs to be included in the signature for calculation.
