file

Billing case

This article introduces the calculation method of object storage OSS fees in the form of cases.

matters needing attention

  • The unit price of the following case comes from the detailed price information published on Alibaba Cloud's official website on January 3, 2018. Please use Alibaba Cloud official website The published data shall prevail.

  • OSS Product Pricing The unit price of storage cost is specified in RMB/GB/month , but the calculation method of pay as you go is Actual resource usage × unit price per hour Therefore, when you need to calculate the actual storage cost, you need to first convert the unit price of the storage cost to RMB/GB/hour The unit price settled by hour depends on the number of days in the month. For example, the number of days in the month is 30, and the unit price of standard (local redundant storage) is 0.12 yuan/GB/month , the unit price settled by hour is about 0.000167 yuan/GB/hour (0.12 ÷ 30 ÷ 24)

Case 1: Standard storage (local redundancy)+data access

In November 2021, Mr. Li stored 505 GB of standard storage (local redundancy) type files in the bucket in East China 1 (Hangzhou) region. The average number of requests per hour is 1000, and the outbound traffic of the internal and external networks is about 5 GB in the 8:00~24:00 period every day. In addition, Mr. Li also purchased 500 GB Standard - Local redundant storage package And if the duration is one month and the specification is 100 GB downlink traffic packet, Mr. Li can choose the following two options for payment.

Mode 1: Pay as you go

The total cost to be paid by this method is 136.32 yuan, and the billing details are as follows:

Billing Item

cost

Storage expenses

505 GB × 0.12 yuan/GB/month=60.6 yuan

Request fee

1000 × 0.01 yuan/10000 times × 24 hours × 30 days=0.72 yuan

Downlink traffic cost

5 GB × 30 days × 0.5 yuan/GB=75 yuan

Mode 2: resource package+pay as you go

The total cost to be paid by this method is 129.32 yuan, and the billing details are as follows:

Billing Item

cost

Storage expenses

RMB 54 (500 GB Standard - Local redundant storage package )+5 GB × 0.12 yuan/GB/month=54.6 yuan

Request fee

1000 × 0.01 yuan/10000 times × 24 hours × 30 days=0.72 yuan

Downlink traffic cost

49 yuan (100 GB downlink traffic packet)+50 GB × 0.5 yuan/GB=74 yuan

Case 2: low-frequency storage (local redundancy)+data access

In November 2021, Mr. Zhang stored 100GB low-frequency storage (local redundancy) files in a bucket in East China 1 (Hangzhou). Among them, there are 10000 files with a size of 30 KB. On the 20th of the same month, Mr. Zhang downloaded a file with a size of 1 GB to the local, updated the file content and uploaded it to OSS again. The updated file size is still 1 GB. The total payment is 8.59 yuan, and the billing details are as follows:

Billing Item

explain

Storage expenses

100.32 GB × 0.08 yuan/GB/month=8.03 yuan

explain

The minimum size of a single low-frequency storage (local redundancy) type file is 64 KB. If it is less than 64 KB, it will be counted as 64 KB. Therefore, the metered storage of 10000 30 KB files is 10000 × (64-30) KB more than the actual storage (about 0.32 GB after conversion), and the total metered storage=100 GB+0.32 GB=100.32 GB.

Outgoing traffic cost of external network

1 GB × 0.5 yuan/GB=0.5 yuan

Capacity charge for insufficient low-frequency storage

1 GB × 0.08/GB/month/30 days × 10 days=0.027 yuan

explain

When uploading a file with the same name to OSS, the original file in OSS will be deleted. OSS only saves newly uploaded files, and the original files will be deleted in advance if their storage time is less than 30 days.

Data retrieval cost

1 GB × 0.0325 yuan/GB=0.0325 yuan

Case 3: Standard storage (local redundancy)+cross regional replication

In November 2021, Mr. Wang stored 100 GB standard storage (local redundancy) files in Bucket A in East China 1 (Hangzhou), and added 3 GB files every day. In order to ensure the security of data storage, Mr. Wang has set up cross regional replication to synchronize data to Bucket B in East China 2 (Shanghai). Bucket A and Bucket B have about 20000 requests per day on average. Mr. Wang can choose the following payment methods according to the situation.

Method 1: Pay as you go

The total cost to be paid by this method is 128.54 yuan, and the billing details are as follows:

Billing Item

explain

Storage expenses

(100 GB × 0.12 yuan/month+3 × 0.004 yuan/day × 29 days+3 × 0.004 × 28+3 × 0.004 × 27+...+3 × 0.004 × 1) × 2=34.44 yuan

explain
  • The daily storage cost of 1 GB files is 0.12 yuan/month/30 days=0.004 yuan/day.

  • Since East China 2 (Shanghai) and East China 1 (Hangzhou) regions need to store the same two copies of data, the storage cost should be multiplied by 2.

Cross regional replication traffic fee

100 GB × 0.5 yuan/GB+3 GB × 0.5 yuan/GB × 29 days=93.5 yuan

Request fee

20000 times × 0.01 yuan/10000 times × 30 days=0.6 yuan

Mode 2: resource package+pay as you go

  • Suppose that Mr. Wang purchased 100 GB in East China 2 (Shanghai) and East China 1 (Hangzhou) respectively Standard - Local redundant storage package , the total cost to be paid is 126.54 yuan, and the billing details are as follows:

    Billing Item

    cost

    Storage expenses

    (11( Standard - Local redundant storage package )+3 × 0.004 yuan/day × 29 days+3 × 0.004 × 28+3 × 0.004 × 27++ 3 × 0.004 × 1) × 2=32.44 yuan

    Cross regional replication traffic fee

    100 GB × 0.5 yuan/GB+3 GB × 0.5 yuan/GB × 29 days=93.5 yuan

    Request fee

    20000 times × 0.01 yuan/10000 times × 30 days=0.6 yuan

  • Assuming that Mr. Wang's data in East China 2 (Shanghai) region is only added but not modified, it can be considered that the backup data in this region is designated as the archive storage type, and the total cost is 114.76 yuan. The billing details are as follows:

    Billing Item

    cost

    Storage expenses

    (11( Standard - Local redundant storage package )+3 × 0.004 yuan/day × 29 days+3 × 0.004 × 28+3 × 0.004 × 27++ 3×0.004×1)+(3( Archive - Local Redundant Storage Package )+3 GB × 0.011 yuan/GB/day × 29 days+3 × 0.011 × 28+3 × 0.011 × 27++ 3 × 0.011 × 1)=20.66 yuan

    Cross regional replication traffic fee

    100 GB × 0.5 yuan/GB+3 GB × 0.5 yuan/GB × 29 days=93.5 yuan

    Request fee

    20000 times × 0.01 yuan/10000 times × 30 days=0.6 yuan

Case 4: Intranet Access Scenario

The traffic fees generated when accessing files in OSS in the same region through the intranet are free. Other fees, such as request fees and storage fees, need to be charged normally.

In November 2021, Mr. Wang stored 1 TB of standard storage (local redundancy) type files in a bucket in East China 1 (Hangzhou). In the same month, he accessed the resources in the bucket through Alibaba Cloud ECS instances in East China 1 (Hangzhou) using the bucket's intranet address. A total of 100 GB of intranet outgoing traffic and 100000 API requests were generated. Then the total payment of 122.98 yuan is detailed as follows:

Billing Item

cost

Standard storage (local redundancy) capacity cost

1 TB × 1024 × 0.12 yuan/GB/month=122.88 yuan

Request fee

100000 × 0.01 yuan/10000 times ÷ 10000=0.1 yuan

Internal network outflow traffic cost

Free Admission

Case 5: Life cycle rule scenario

Example 1

On November 1, 2021, Mr. Wang stored 1.5 million files in a bucket in East China 1 (Hangzhou) region (assuming that the file size of all files is greater than 64 KB), with a total storage capacity of 100 GB. All files are stored in the directory dir in the form of standard storage (local redundancy), and life cycle rules are set for the bucket. All files specified in the rule that match the prefix dir will be converted to the low-frequency access (local redundancy) type 10 days after the last update time, converted to the archive (local redundancy) type 25 days later, and deleted 5 days later.

In addition to the storage costs of 100GB files under different storage types, since the minimum storage time of the archive (local redundancy) type is 60 days, at this time, there will be a capacity cost for 20 days of insufficient archive storage, as well as a request cost for standard storage to low-frequency access and low-frequency access to archive storage types. The total payment is 29.91 yuan, and the charging details are as follows:

Billing Item

cost

Standard storage (local redundancy) capacity cost

100 GB × 0.12 yuan/GB/month ÷ 30 days ÷ 24 hours × (10 × 24) hours=4 yuan

Low frequency access (local redundancy) capacity cost

100 GB × 0.08 yuan/GB/month ÷ 30 days ÷ 24 hours × (25x24) hours ≈ 6.66 yuan

Archive (local redundancy) capacity charge

100 GB × 0.033 yuan/GB/month ÷ 30 days ÷ 24 hours × (5 × 24) hours=0.55 yuan

Archive storage is insufficient for the specified duration

100 GB × 0.033 yuan/GB/month ÷ 30 days ÷ 24 hours × [(60-10-25-5) × 24] hours=2.2 yuan

Standard to low-frequency access request fee

1500000 times × 0.01 yuan/10000 times ÷ 10000=1.5 yuan

Low frequency access to archive request fee

1500000 times × 0.1 yuan/10000 times ÷ 10000=15 yuan

Example 2

On March 1, 2022, Mr. Zhang stored 25 million files in the bucket in East China 1 (Hangzhou) region (assuming that the file size of all files is greater than 64 KB), with a total storage capacity of 2.5 TB. All files were stored in the directory dir in the form of low-frequency access (local redundancy), and life cycle rules were set for the bucket. All files specified in the rule that match the prefix dir are converted to the archive storage (local redundancy) type after 100 days from the last update time, then to the cold archive storage (local redundancy) type after 200 days, and then deleted after 5 days.

In addition to the storage costs of 2.5 TB files under different storage types, since the minimum storage time of the cold archive (local redundancy) type is 180 days, there will be a 175 day long capacity cost for the cold archive storage shortage, as well as a request cost for low-frequency access to archive and archive to cold archive storage types. The total payment is 1976.3 yuan, and the billing details are as follows:

Billing Item

cost

Low frequency access (local redundancy) capacity

2.5 × 1024 GB × 0.08 yuan/GB/month ÷ 30 days ÷ 24 hours × (100 × 24) hours ≈ 682.7 yuan

Archive storage (local redundancy) capacity

2.5 × 1024 GB × 0.033 yuan/GB/month ÷ 30 days ÷ 24 hours × (200 × 24) hours=563.2 yuan

Cold archive storage (local redundancy) capacity

2.5 × 1024 GB × 0.015 yuan/GB/month ÷ 30 days ÷ 24 hours × (5 × 24) hours=6.4 yuan

Cold archive storage is insufficient for the specified duration

2.5 × 1024 GB × 0.015 yuan/GB/month ÷ 30 days ÷ 24 hours × [(180-5) × 24] hours=224 yuan

Low frequency access to archive storage request fee

25000000 times × 0.1 yuan/10000 times ÷ 10000=250 yuan

Archive storage to cold archive storage request fee

25000000 times × 0.1 yuan/10000 times ÷ 10000=250 yuan

Case 6: OSS in combination with AliCloud CDN scenario

In November 2021, Mr. Zhang used OSS in combination with Alibaba Cloud CDN acceleration service. According to statistics, the CDN outgoing traffic generated by transferring data from the CDN edge node to the client is 90 GB, the back to source traffic generated by transferring data from OSS to the CDN edge node is 60 GB, and the number of requests for calling OSS API when the CDN edge node accesses OSS is 10000. The total fee is 30.61 yuan, and the charging details are as follows:

Billing Item

cost

CDN outflow

Charge by CDN: 90 GB × 0.24 yuan/GB=21.6 yuan

CDN source return outflow flow

OSS charges: 60 GB × 0.15 yuan/GB=9 yuan

Request fee

OSS charges: 10000 times × 0.01 yuan/10000 times=0.01 yuan

  • Introduction to this page (1)