Select a billing method based on compute resource usage

更新时间:
复制 MD 格式

You can reduce costs by selecting a billing method based on your usage. This topic describes how to calculate your usage and choose an appropriate billing method.

Scenario

Consider an entrepreneur who leads a team to develop an online education platform. They want to store videos on Alibaba Cloud. They have about 2,000 existing videos that use about 2 TB of storage. Each month, they expect to add 200 new videos, which will use about 200 GB of storage. The duration of most course videos is 25 to 35 minutes, and the videos are classified by course. To ensure a good playback experience on all devices, they plan to offer videos in two definitions: standard definition (SD) 480P and high definition (HD) 720P. The platform has about 500 users, with an average of 2,000 video views per day. The ratio of views on mobile devices to PCs is about 3-to-1. The entrepreneur wants to understand their video resource usage and select the most cost-effective billing method.

Case study

In this scenario, a user requires video-on-demand (VOD) features, such as video upload, storage, and transcoding. The downstream traffic generated by video playback depends on the number of views, video duration, and bitrate. Before calculating the usage, assume the following:

  • Video duration: The duration of most videos is 25 to 35 minutes. The average duration is assumed to be 30 minutes.

  • Definition distribution: Based on viewing patterns, mobile devices are assumed to play SD 480P videos by default, and PCs play HD 720P videos. Cases where users manually switch the definition are ignored.

  • Storage size: The scenario includes existing and new videos. After transcoding, the original video is converted into two versions with different definitions. Therefore, the actual storage usage is calculated as three times the original video size. The effect of the output video resolution and bitrate on the video size is ignored. If the resolution and bitrate of a transcoded video are higher than the original, the actual size will be larger.

Calculate resource usage

The usage and fees calculated in this scenario are estimates.

Based on the scenario, the annual resource usage is as follows. This calculation does not account for rapid business growth.

Item

Formula

Usage

Storage usage

Storage usage: Existing video storage + New video storage - Free storage

  • Existing videos: 2,048 × 3 = 6,144 GB

  • New videos: 200 × 3 × 12 = 7,200 GB

Average annual storage usage: 6,144 + 7,200 = 13,344 GB.

Traffic usage

Traffic usage = (Views × Video duration × Video bitrate) / 8 (bytes)

  • SD traffic on mobile devices: 1,500 (views) × 0.0009 (SD bitrate in Gbit/s) × 30 (average duration in minutes) × 60 (seconds/minute) / 8 (bytes) = 303.75 GB/day

  • HD traffic on PCs: 500 (views) × 0.0015 (HD bitrate in Gbit/s) × 30 (average duration in minutes) × 60 (seconds/minute) / 8 (bytes) = 168.75 GB/day

Average annual traffic usage: (303.75 + 168.75) × 365 = 172,462.5 GB.

Transcoding duration

Determined by the specifications of the output video.

  • Existing SD videos: 2,000 × 30 minutes = 60,000 minutes

  • Existing HD videos: 2,000 × 30 minutes = 60,000 minutes

  • New SD videos: 200 × 30 minutes × 12 = 72,000 minutes

  • New HD videos: 200 × 30 minutes × 12 = 72,000 minutes

Select a billing method

This section calculates the average annual fees for the pay-as-you-go and subscription resource plan billing methods.

Billing method

Billing formula

Usage cost

Pay-as-you-go

Storage fee = Storage unit price × Storage usage

  • Storage unit price: CNY 0.12/GB/month

  • Storage amount: 13,344 GB/year

Average annual storage fee: CNY 0.12/GB/month × 13,344 GB × 12 months = 19,215.36 CNY.

Traffic fee = Traffic unit price × Traffic usage

  • Traffic unit price: CNY 0.24/GB

  • Traffic usage: 172,462.5 GB

Average annual traffic fee: CNY 0.24/GB × 172,462.5 GB = 41,391 CNY.

Transcoding fee = Transcoding unit price × Transcoding duration

  • Transcoding unit price

    • SD (640×480): CNY 0.0217/minute

    • HD (1280×720): CNY 0.0326/minute

  • Transcoding duration

    • HD videos: 60,000 + 72,000 = 132,000 minutes

    • SD videos: 60,000 + 72,000 = 132,000 minutes

Average annual transcoding fee: (CNY 0.0217/minute × 132,000 minutes) + (CNY 0.0326/minute × 132,000 minutes) = 7,167.6 CNY.

Subscription resource plan

Storage fee: Average annual fee for a storage plan

  • Storage usage: 13,344 GB ≈ 14 TB

  • Storage plan specifications: We recommend purchasing two 5 TB/year plans and four 1 TB/year plans for a total of CNY 13,950.

Traffic fee: Average annual fee for a data transfer plan

  • Traffic usage: 172,462.5 GB ≈ 169 TB/year

  • Data transfer plan specifications: We recommend purchasing one 200 TB/year plan for a total of CNY 21,800.

Transcoding fee: A transcoding resource plan can be used to cover usage for H.264 LD, SD, and HD transcoding. The duration of the plan is specified in H.264 LD transcoding minutes. The deduction ratio for LD, SD, and HD is 1:1.5:3.

  • Transcoding duration:

    • HD videos: 132,000 minutes/year

    • SD videos: 132,000 minutes/year

    Total annual transcoding duration in LD equivalent: (132,000 × 1.5) + 132,000 = 330,000 minutes

  • Transcoding plan specifications: We recommend purchasing one 500,000 minutes/year plan for a total of CNY 5,425.

The average annual fees for the two billing methods are:

  • Pay-as-you-go: 19,215.36 + 41,391 + 7,167.6 = 67,773.96 CNY

  • Subscription resource plan: 13,950 + 21,800 + 5,425 = 41,175 CNY

By comparing the costs of the two billing methods, you can see that:

  • Choosing a subscription resource plan can significantly reduce your costs. The more resource plans you purchase, the greater the discount.

  • You can also combine a subscription resource plan with pay-as-you-go billing to maximize resource utilization and minimize costs.