How to Use Object Storage Service (OSS) More Economically

本文涉及的产品
对象存储 OSS,20GB 3个月
对象存储 OSS,恶意文件检测 1000次 1年
对象存储 OSS,内容安全 1000次 1年
简介: 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.
相关实践学习
借助OSS搭建在线教育视频课程分享网站
本教程介绍如何基于云服务器ECS和对象存储OSS,搭建一个在线教育视频课程分享网站。
目录
相关文章
|
22天前
|
存储 Cloud Native Serverless
云原生最佳实践系列 7:基于 OSS Object FC 实现非结构化文件实时处理
阿里云OSS对象存储方案利用函数计算FC,在不同终端请求时实时处理OSS中的原图,减少衍生图存储,降低成本。
|
存储 API 对象存储
OSS新特性:支持文件上传、复制时,指定Object的存储类型以及修改已有文件的存储类型
用户在上传、复制文件时,可灵活地指定文件的存储类型为Standard、IA、Archive;用户也可以修改实时修改文件的存储类型,比如从低频型(IA)修改为标准型。
5239 0
|
10月前
|
存储 安全 Java
OSS(Object Storage Service)
OSS(Object Storage Service)是阿里云提供的对象存储服务,是一种海量、安全、低成本、高可靠的云存储服务。OSS 可以存储和管理各种类型的非结构化数据,例如图片、音频、视频、文档等。
385 0
|
存储 对象存储
【阿里云OSS】You have no right to access this object because of bucket acl.
【阿里云OSS】You have no right to access this object because of bucket acl.
4524 0
【阿里云OSS】You have no right to access this object because of bucket acl.
|
对象存储 开发者
对象存储 OSS 文件(Object)管理功能|学习笔记
快速学习对象存储 OSS 文件(Object)管理功能
372 0
|
对象存储
访问oss出现报错:You have no right to access this object because of bucket acl
访问oss出现报错:You have no right to access this object because of bucket acl 也配置bucket权限和RAM用户权限了但是还是报错,然后看了下代码,发现到httpClient.execute(req)就直接403了 能问下大佬们这是什么问题吗,百度也没找到
|
移动开发 Java 对象存储
Simulating Post Object Form Upload to OSS in Java
Post Object uses an HTML form to upload a file to a specified bucket, making it possible to upload files to the bucket through a browser.
2143 0
|
对象存储
openStack 对象存储object storage swift
环境管理网络 Create initial rings  before starting the object storage services,you must create the initial account,container,and object rings; 1.
943 0
|
5月前
|
Java
java判断Object对象是否为空demo
java判断Object对象是否为空demo
|
12天前
|
JavaScript
js 字符串String转对象Object
该代码示例展示了如何将一个以逗号分隔的字符串(`'1.2,2,3,4,5'`)转换为对象数组。通过使用`split(',')`分割字符串并`map(parseFloat)`处理每个元素,将字符串转换成浮点数数组,最终得到一个对象数组,其类型为`object`。

热门文章

最新文章