×
Community Blog How to Use Object Storage Service (OSS) More Economically

How to Use Object Storage Service (OSS) More Economically

What is the best configuration of OSS for you to minimize costs?

ST_006

Background

Mr. Wang is an entrepreneur; he and his team have developed a mobile application for image sharing. They hope to store the images on Alibaba Cloud. The total size of the images is about 1 TB, and they process about 15 million requests per month for a total downstream traffic of 2 TB. Mr. Wang wants to know which Alibaba Cloud products to use to achieve optimal cost effectiveness.

Case Analysis

The dominant charges for a mobile image sharing app are from traffic and storage. Unfortunately, these charges cannot be avoided, as these two elements are essential for mobile apps. Instead, we can try out different payment options to minimize expenditure. Three methods of payment are analyzed below:

  1. OSS Pay-As-You-Go
  2. OSS subscription (purchasing resource package)
  3. Combination of OSS subscription + CDN Pay-As-You-Go

Note: The following unit prices come from Object Storage Service (OSS) pricing details published on the Alibaba Cloud website on April 1, 2017. Click here to see [OSS pricing details]

1. OSS Pay-As-You-Go

Assuming that Mr. Wang's storage bucket is in Hangzhou, and it is charged based on OSS Pay-As-You-Go, then the average cost per month includes:

• Storage Cost: storage unit price multiplied by the storage amount
• Traffic Cost: peak period unit price for Internet outbound traffic multiplied by traffic amount
• Number of Requests: a total of Put requests + Get requests

The average cost per month is calculated as follows:

• Storage Cost: 0.148 (storage unit price: CNY/month) x 1024 (storage amount: GB) = 151.55 CNY/month
• Traffic Cost: 0.5 (peak period unit price for Internet outbound traffic) x 2048 (traffic: GB) = 1024 CNY/month
• Request Cost: 0.01 (request cost for 10000 requests) x 1500 = 15 CNY/month
Total Cost: 1190.55 CNY/month

2. OSS Subscription (Purchasing Resource Package)

Assuming that Mr. Wang's storage bucket is in Hangzhou, and it is charged based on OSS subscription, then the average cost per month includes:

• Storage: average price for storage package per month
• Traffic Package: average price for Internet outbound traffic per month
• Number of Requests (Pay-As-You-Go): a total of Put requests + Get requests (Pay-As-You-Go)

Option 1:

Assuming that Mr. Wang purchases a 1 TB storage package and 2 TB Internet outbound traffic package for 6 months, the cost per month is calculated as follows:

• Storage Cost: 690 (price for 1 TB storage package for 6 months: CNY) ÷ 6 (months) = 115 CNY/month
• Traffic Cost: 5050 (price for 2 TB outbound traffic package for 6 months) ÷ 6 (month) = 841.67 CNY/month
• Request Cost: 1500 x 0.01 = 15 CNY/month
Total Cost: 971.67 CNY/month

Option 2:

Assuming that Mr. Wang purchases a 1 TB storage package and 2 TB Internet outbound traffic package for 12 months, the cost per month is calculated as follows:

• Storage cost: 1242 (price for 1 TB storage package for 12 months: CNY) ÷ 12 (months) = 103.5 CNY/month
• Traffic Cost: 9090 (price for 2 TB outbound traffic package for 12 months) ÷ 12 (month) = 757.5 CNY/month
• Request Cost: 1500 x 0.01 = 15 CNY/month
Total Cost: 876 CNY/month

3. OSS subscription + CDN Pay-As-You-Go

As the dominant charges for a mobile image sharing app are from traffic and storage, we recommend using a combination of OSS + CDN. CDN (Content Delivery Network) delivers hotspot data stored in your OSS to nodes across the country. Users can access the nearest CDN nodes to read files without accessing the original files in OSS for hotspot data, saving OSS Internet traffic. Through this method, the access rate and experience of your edge users are improved. Additionally, the cost of CDN Internet traffic is lower than the cost of OSS Internet traffic, which can effectively reduce the network traffic cost for the entire application.

Assuming that Mr. Wang's storage bucket is in Hangzhou, and it is charged based on OSS + CDN, then the average cost per month includes:

• Storage cost: average price for storage package per month
• Traffic Cost: CDN back-to-source outbound traffic and CDN Internet traffic cost
• Number of Requests: a total of Put requests + Get requests

The cost for the combination of OSS + CDN per month is calculated as follows:

Assuming that Mr. Wang purchases 1 TB storage package and 1 TB CDN back-to-source traffic for 12 months, and 750 back-to-source requests per month (back-to-source traffic and number of requests may be less according to user activity):

• Storage cost (storage package): 1242 (price for 1 TB storage package for 12 months: CNY) ÷ 12 (months) = 103.5 CNY/month
• CDN Internet Traffic Cost (Pay-As-You-Go): 0.272 CNY/GB x 2048 (traffic: GB) = 557.05
• CDN Back-to-Source Request Cost (Pay-As-You-Go): 750 x 0.01 = 7.5 CNY/month
• Back-to-Source Traffic Cost (Pay-As-You-Go): 0.15 CNY/GB (unit price for CDN back-to-source outbound traffic)x 1024 (traffic: GB)= 153.6
• Total Cost: 821.65 CNY/month

(Note: CDN back-to-resource request and CDN back-to-resource traffic refer to request and traffic generated by CDN for initiating a request to obtain data from OSS source when you do not attempt to access data on CDN nodes.)

Summary

The details of each purchase option can be seen in the table below.

Purchase Option Cost (CNY/month)
OSS Pay-as-you-go 1190.55
OSS Subscription (6 months) 971.67
OSS Subscription (12 months) 876
OSS Subscription + CDN Pay-as-you-go 821.65

From the comparison, it is clear that using the resource package subscription can significantly save you costs, and the longer you purchase the resource package for, the more economical it becomes.

Furthermore, you can use Alibaba Cloud CDN service according to further reduce the cost of Internet traffic. Both the OSS Subscription and OSS Subscription + CDN Pay-as-you-go options are ideal for enterprises. For websites with low requirements, such as personal websites, OSS Pay-as-you-go is also a viable option.
1 1 1
Share on

Alibaba Clouder

1,303 posts | 208 followers

You may also like

Comments

Raja_KT March 19, 2019 at 4:30 pm

Interesting comparison. Hope it is not changed since then :)