×
Community Blog Friday Blog - Week 35 - "The Price Is Right": Understanding CDN Pricing on Alibaba Cloud

Friday Blog - Week 35 - "The Price Is Right": Understanding CDN Pricing on Alibaba Cloud

Learn how to understand CDN pricing on Alibaba Cloud, to save costs and accelerate access to your content.

By: Jeremy Pedersen

Understanding CDN Pricing

This week, we take a look at how Alibaba Cloud's CDN pricing works. Let's not dive in too quickly, though! First, we'll talk about what a CDN does.

If you already have some CDN experience, don't worry: the introductory stuff will be very short, then we'll move right into the pricing.

What is a CDN?

A CDN - or Content Delivery Network - is system that accelerates access to web content.

Imagine that you have a user in Ireland, and they want to visit google.com. Assuming Google's servers are located in California, the user's traffic has to leave Ireland, travel over an undersea cable across the Atlantic ocean, and then travel over some more cables from the US East Coast to the West Coast, before finally arriving at Google's data centers.

Needless to say, this is going to result in some pretty slow page load times for our user in Ireland.

How can we solve this problem? One obvious solution is to recreate a copy of Google's entire site in Ireland. Depending on the number of users in Ireland, this might be a practical solution, but it would require creating and maintaining identical copies of all of Google's data. All the indexed web content, all Google user account data, and a lot more.

In practice, this is rarely practical. What we can do is keep local copies of some of the site's content, especially so called "static" content, which does not change often and is the same for all users that visit the site (think of the Google logo, above the search bar on google.com: it looks the same for all users everywhere).

This is exactly what CDN providers do, in practice: they keep local copies of website content inside a "cache" that is located near the users. Getting this to work for global websites like Google requires having CDN nodes not just in Ireland, but in virtually every country where Google has users.

A CDN "network" is composed of hundreds or thousands of these local caches of content, and users are routed to the closest CDN node when requesting a webpage. This speeds up access significantly, which is why virtually all modern websites make use of some type of CDN service.

What's special about the Alibaba Cloud CDN?

From a technological standpoint, the Alibaba Cloud CDN works just like any CDN service. Services like Akamai, AWS CloudFront, and Cloudflare all employ the same general principle: have lots of CDN nodes, and put them in as many places as possible.

What's special about Alibaba's CDN is its large presence in Mainland China and in Southeast Asia. This isn't to say that Alibaba Cloud is not useful outside Asia: with more than 2,800 CDN nodes spanning 70+ countries and every continent except Antarctica, you can use the Alibaba Cloud CDN just about anywhere. That said, more than 1/3 of those CDN nodes are located in Asia, making Alibaba Cloud CDN a solid choice for "Go Asia" projects.

Enough already, how much does it cost!?

Ok ok, I did promise I would explain the pricing. Pricing differs based on what type of content we're accelerating. I'll break the costs down like so:

  1. Standard CDN (CDN): standard CDN service for accelerating static content like HTML, CSS, JavaScript, and images
  2. Dynamic CDN (DCDN): CDN service for accelerating dynamic or semi-dynamic content (i.e. content where some processing is involved before a response is sent to the user)
  3. Video On Demand: Not a CDN service in itself, the ApsaraVideo VOD service stores and processes video content, and can be linked to Alibaba Cloud CDN for video acceleration.
  4. Streaming Video: The ApsaraVideo Live service accelerates streaming content. Can be linked to Alibaba Cloud CDN for content replays.

Important note: All my examples assume we're using alibabacloud.com and not aliyun.com. What's the difference?

  1. aliyun.com for users in Mainland China
  2. alibabacloud.com for users everywhere else (including Macau, Taiwan, and Hong Kong)

All right, let's look at the costs for each of these solutions!

Standard CDN

The standard CDN is designed to accelerate static content, including:

  1. HTML
  2. CSS
  3. JavaScript
  4. Media (video, audio, images)

The CDN service generates hourly bills based on the amount of outbound CDN traffic generated.

The pricing is "tiered" based on where it is generated. There are currently 8 regions:

  1. Mainland China - CN
  2. North America - NA
  3. European Union - EU
  4. Asia Pacific 1 - AP1
  5. Asia Pacific 2 - AP2
  6. Asia Pacific 3 - AP3
  7. Middle East & Africa - MEAA
  8. South America - SA

With CDN, the primary thing Alibaba Cloud charges for is traffic (measured in GB - Gigabytes). The billing model used is Pay-by-data-transfer.

This means you are charged for the total amount of outbound traffic generated, in Gigabytes (GB).

Let's assume you are generating 100 Mbps worth of traffic, 24 hours a day. What would your 1-day CDN traffic costs be?

First, we need to work out how much traffic (in GB) is generated per day, at 100 Mbps:

100 Mbps x 3,600 seconds/hour / 8 bits/byte = 45,000 MB
45,000 MB / 1024 MB/GB = ~44 GB

Great! Now, to work out the total cost, we need to know the region and traffic tier we fall into.

Let's assume we are generating all this traffic in the Mainland China region, and that we are in the 0-50 TB traffic tier. In this case, our per-GB traffic cost is 0.04 USD/GB. This gives us a total cost of:

44 x 24 x 0.04 = 42 USD / day

It's possible to reduce costs further with an "outbound traffic plan", which allows you to pay up-front for a fixed amount of traffic. See the bottom of this page for more info. This will save you money if you have steady, regular CDN traffic.

Other Costs

Beyond just traffic, the CDN service also charges separate rates for:

  1. Static HTTPS requests (per 10,000 requests, prices vary by region)
  2. Static QUIC requests (per 10,000 requests, prices vary by region)

DCDN (Dynamic CDN)

Dynamic CDN (DCDN) uses the same pricing model as CDN, with the addition of some additional charges for dynamic requests:

  1. Dynamic HTTP/QUIC requests (per 10,000 requests, prices vary by region)
  2. Dynamic HTTPS/QUIC requests (per 10,000 requests, prices vary by region)
  3. Open websockets (charged in USD/Mbps/day, prices vary by region)

Secure DCDN

There is also a Secure DCDN that includes Anti-DDoS and WAF (Web Application Firewall) functions.

The pricing calculations are done the same way as for DCDN, but the prices are different, and there is an additional minimum commitment of 3,000 USD/month. You can learn more here.

Video On Demand (VOD)

The ApsaraVideo VOD service is designed to storage and process video content. There are three main charges:

  1. Storing video content
  2. Video transcoding
  3. CDN usage

If you use a third-party CDN, there is also a charge for outbound Internet traffic but that charge doesn't apply if you're using Alibaba Cloud CDN. Nice!

1. Storage

Storage costs vary by region, but are relatively low. The first 50 GB of content is stored for free and after that, costs vary by region but are typically around 0.02 USD/GB/Month.

So storing a full 1 TB of video (1024 GB) for a year would cost just:

1024 x 0.02 x 12 = 245.76 USD

2. Transcoding

Transcoding costs are the hardest to explain clearly because they vary so much based on resolution and file format. Let's use H.264 HD (1920 x 1080). Prices are per minute. Transcoding 10 minutes of video in this format in Singapore would cost:

0.025 USD/minute x 10 minutes = 0.25 USD

3. CDN Usage

This is already covered in the first section of today's blog, so I won't cover it again. Scroll up! ^_^

New Features

The VOD service is a good one to watch closely for future changes. VOD will be adding all kinds of video-related features soon, including:

  1. DRM
  2. Video Auditing
  3. Production-related video processing

And probably more as well.

Live Video

ApsaraVideo Live is a service is designed to accelerate streaming video. Though this does not work in the same way as a traditional CDN, I include it here because it is a form of content acceleration.

The ApsaraVideo Live service charges for 4 different things:

  1. Traffic (Internet outbound traffic)
  2. Streaming Acceleration
  3. Video transcoding
  4. Additional features (streaming / time shifting)

Traffic & Streaming

Similar to other CDN products, Live charges for standard traffic at a per-GB rate. One key difference is that there is a separate charge for RTS (real time streaming) traffic. This is traffic from ongoing, real-time video streams. This is also charged in USD/GB, but at a higher cost than standard outbound traffic.

Comparing the costs in Mainland China, standard video traffic costs 0.042 USD/GB in the 0-10 TB tier, while real-time streaming traffic costs 0.084 USD/GB (also for the 0-10 TB tier).

2. Transcoding

The Live service offers real-time transcoding of video streams. The costs there are in USD/minute, with the rate depending on the quality of the video stream.

Live transcoding of a full resolution 4K video stream would cost 0.155 USD/minute in the Mainland China region, for instance.

3. Additional Features

There are a couple of other special-purpose features built into the Live service, each with its own associated costs:

  1. Screenshotting service: charged in USD per 1,000 still frame captures per day (USD/1K captures/day)
  2. Time shifting: this allows "replays" of streams to be viewed several days after original streaming date, with costs calculated in USD/GB (with the USD/GB cost increasing based on how many days you want to store the stream, up to a maximum of 30 days)

There are also separate rates for "Production studio" streaming and for "Premium streaming" but I won't cover those in today's blog. These are special purpose features only likely to be used by customers with very specific streaming needs.

Summing Up

It's hard to know when to use which set of tools, so let's try and summarize with a handy chart! This should give you a general idea how these services fit together, and when to choose each one:

choose_cdn_drawio

Awesome, now get out there and get your speed on!

I've Got A Question!

Great! Reach out to me at jierui.pjr@alibabacloud.com and I'll do my best to answer in a future Friday Q&A blog.

You can also follow the Alibaba Cloud Academy LinkedIn Page. We'll re-post these blogs there each Friday.

Not a LinkedIn person? We're also on Twitter and YouTube.

0 0 0
Share on

JDP

71 posts | 155 followers

You may also like

Comments

JDP

71 posts | 155 followers

Related Products