Help Center/ Object Storage Service/ FAQs/ Billing/ How Are Requests Counted?
Updated on 2024-10-15 GMT+08:00

How Are Requests Counted?

Each calling of an API is counted as a request. When you perform operations on OBS through OBS Console, tools, APIs, or SDKs, you are actually calling APIs.

Request Types

OBS requests fall into the following types:

  • Read requests: GET (for downloading objects), HEAD (for obtaining bucket locations or bucket policies), LIST (for listing objects), and others
  • Write requests: PUT/POST (for uploading objects), COPY (for copying objects), and others
  • Delete requests: DELETE (for deleting objects or canceling multipart uploads) and others
  • Storage class transition requests: requests generated when objects are transitioned from Standard to Infrequent Access or Archive or from Infrequent Access to Archive during the execution of a lifecycle rule

Billing

Requests are billed on a pay-per-use basis. The unit prices for different types of requests are the same. For details, see Product Pricing Details.

If you buy a Standard storage package, you will receive a free quota of read and write requests for each month. The free quota is used first. After the free quota is used up, subsequent requests are billed on a pay-per-use basis. If you continue to purchase additional Standard storage packages, the free requests rewarded to you will be accumulated.

Except the requests whose status code returned by the server is 5XX or 403, all other requests are counted in the number of requests.

Examples

Example 1

Take object upload for example. Each time you upload an object or an object part is counted as a request. Assuming that a folder has 100 objects:

  • If you call the PutObject API to upload all objects, sending 100 PUT requests means that the number of requests is 100.
  • If you use multipart upload tasks to upload the large objects in the folder, the final number of requests is greater than 100, because the processing of object parts will increase the number of requests. In addition, extra requests are required for initializing multipart upload tasks and merging parts into objects.

Example 2

Each operation on OBS Console delivers a request that is counted for billing.

For example, when you open the home page of OBS Console, the list of buckets is loaded. In this process, requests are sent to obtain the bucket list and bucket locations. Then when you switch to the Overview page of a bucket, requests are sent to query bucket storage information and bucket metadata.

Example 3

Take object download as an example. Each time you download an object is counted as a request. Assume that you need to download 100 objects:

  • Downloading 100 Standard or Infrequent Access objects will send 100 GET requests.
  • If these 100 objects are in the Archive storage class and direct reading is not enabled, you need to restore the objects before downloading them. Restoring 100 Archive objects to the Standard storage class will generate 100 PUT requests. Then, downloading the restored 100 Standard objects will send another 100 GET requests. In this case, there are 200 requests in total.
  • If these 100 objects are in the Archive storage class and direct reading is enabled, you can directly download the objects without restoring them first. In such case, only 100 GET requests will be sent.