Как стать автором
Обновить
0

Cloud services for WebRTC CDN: How much does it cost? Where to place it?

Время на прочтение6 мин
Количество просмотров2.4K

The developer or owner of a software product often faces the question of choosing a suitable location for hosting server capacity. As you know, software always meets hardware. Usually there are several options:

  1. Use your capacities. But here there is a question of fault tolerance and many other requirements to the equipment to satisfy which at home on the balcony in the server room of a small enterprise is almost impossible.

  2. Rent servers in the data center. This is usually expensive. And such an infrastructure will be quite cumbersome in terms of scaling and load balancing.

  3. Place it in the cloud. Cloud services are one of the most modern solutions. Moreover, there're plenty of vendors now, so everyone can find a service that's suitable for their tasks and budget.

In the previous two articles of our blog, we took a detailed look at the process of deploying WebRTC CDN with balancing and automatic scaling based on Amazon Web Services and Google Cloud Platform, and now we will compare these platforms to figure out which platform will be the best choice in the price-quality ratio.

A small comparison of AWS and GCP

Amazon Web Services is one of the most widely used cloud platforms in the world. Being a pioneer in this field, it has filled a large part of the market. AWS covers 80 availability zones in 25 geographic regions around the world. More than 200 full-featured services are available on the platform, which allow you to build an infrastructure of any complexity from the scratch. AWS has the most extensive, reliable, and secure global cloud infrastructure. For more than 15 years, the platform has been delivering cloud services to millions of customers around the world for a variety of purposes. AWS offers the most reliable solutions on the market for working at any scale, making it the undisputed leader among cloud service providers. Amazon Web Services offers a wide range of global cloud products, including computing services, storages, databases, analytics tools, network technologies, mobile services, developer tools, management tools, Internet of Things technologies, security tools, and enterprise applications. These services help various organizations grow faster, reduce IT costs, and enable scaling.

Google Cloud Platform — a set of cloud services that run on the same infrastructure as Gmail, Google Search, and YouTube. The service has been available to users since 2011. The platform provides a wide range of tools and various APIs for developers and businesses. The Google Cloud Platform includes virtual machines, application and container hosting, machine learning, data storage and processing services, and much more. The platform's servers are located in 25 geographical regions and are available in more than 200 countries. The data centers and network architecture of the Google Cloud Platform are designed for maximum reliability and uptime.

The difference between Web Call Server deployment and licensing on AWS and GCP platforms

At the moment of this writing Web Call Server is not available as an instance template in GCP Marketplace. This reflects on the difference in licensing and deployment.

When deploying WCS based on AWS, customers can, depending on the project, choose to either launch a ready-made WCS instance from the AWS Marketplace with a built-in hourly license with just a few a few clicks, or start a virtual machine, manually install WCS and activate a standard monthly subscription. In the latter case, apart from the monthly subscription fee—which, according to the billing rules, depends on the maximum amount of servers used— the user has to pay the rental fee for the instance.

We'd recommend using the hourly Amazon Marketplace license for short-term WCS launches (days, hours) and opting for the standard monthly license for long-term launches (months, years).

WCS deployment on the Google Cloud Platform requires manual setup on a virtual machine. To enable autoscaling and load balancing you would need to create an image of the virtual machine with an installed and configured WCS. In the case of GCP, standard monthly subscription is the only option available to users. Keep in mind that, as noted above, the monthly fee is calculated based on the maximum number of servers the license was used on. This makes it impossible to save money on subscription costs when doing short-term launches.

The difference in the pricing policies of the AWS and GCP platforms

The functionality of the two platforms is virtually the same, but their pricing models differ greatly.

AWS offers a pricing calculator for every service on the platform. Because the pricing is calculated separately for each service, the resulting number of variables makes it difficult to obtain accurate estimates of the total cost of the infrastructure.

In turn, Google Cloud Platform makes offering "customer-friendly" prices a priority. That means bigger discounts and a more flexible approach to pricing.

Let us crunch the numbers and see which platform is better suited for setting up a CDN with load balancing and autoscaling for a one-hour-long webinar with 30 and 300 viewers.

The CDN architecture will be the same as described in previous articles on deployment:

  • one Origin server;

  • one Edge server incorporated into a load balancer allowing to increase the number of Edge servers to three or more during peak loads.

Let's assume the Origin server hosts a video stream with 854x480 (480p) resolution and a 1000 kbps bitrate. Thirty viewers are watching the stream with no transcoding on Edge servers. In this case the number of subscribers is low, so we can minimize the number of instances used. (Prices used were valid at the time of writing. Because of flexible pricing policies, prices offered to you might be slightly different.)

Parameter

Amazon Web Services t3.micro ( 2 vCPUs, 1 GB memory, HDD 20 GB); USD/hr

Google Cloud Platform n1-standard-1 (1 vCPU, 3.75 GB memory, HDD 20 GB); USD/hr

WCS license cost

$0.01

$75

Instance rental cost

$0.011

$0.047

Disk space rental cost

$0.025 GB/month

$0.04 GB/month

Instance traffic cost

$0.09 per GB

$0.04 per GB

Total for 1 WCS instance

$0.512

$75,847

Approximate volume and cost of CDN traffic

12.6 GB $1.134‬

12,6 GB $0.504

Total cost (4 instances)

$3.182‬

$303,892

Traffic within the CDN is free of charge on both platforms. External traffic from Edge servers to viewers in GCP is priced depending on the geographic location of data centers and customers. For our calculations, we use an average price of $ 0.04 per GB. Due to the cost of the WCS license, the total cost of a CDN based on Google Cloud Platform is quite high. In this case, even comparatively lower traffic costs do not play a significant role.

A projected increase in viewers calls for server capacity upgrades. For Edge servers, we recommend the following configuration: 16 vCPUs, 64 GB memory and 10 TB of traffic. Three hundred viewers will require three Edge servers.

Now let's calculate the CDN deployment options for 300 users for one hour:

Parameter

Amazon Web Services m5.4xlarge ( 16 vCPUs, 64 GB memory, HDD 20 GB); USD/hr

Google Cloud Platform n1-standard-16 (16 vCPUs, 60 GB memory, HDD 20 GB); USD/hr

WCS license cost

$0.768

$75

Instance rental cost

$0.816

$0.76

Disk space rental cost

$0.025 GB/month

$0.04 GB/month

Instance traffic cost

$0.09 per GB

$0.04 per GB

Total for 1 WCS instance

$2.084

$76.56

Approximate volume and cost of CDN traffic

126 GB $11.34

126 GB $5.04

CDN cost

$45.36

$311.28

And for a month (720 hours):

Parameter

Amazon Web Services m5.4xlarge ( 16 vCPUs, 64 GB memory, HDD 20 GB); USD/hr Hourly WCS license

Amazon Web Services m5.4xlarge ( 16 vCPUs, 64 GB memory, HDD 20 GB); USD/hr Standard WCS license

Google Cloud Platform n1-standard-16 (16 vCPUs, 60 GB memory, HDD 20 GB); USD/hr Standard WCS license

WCS license cost

$0.768 *720

$75

$75

Instance rental cost

$0.816 *720

$0.816 *720

$0.76 *720

Disk space rental cost

$0.025 per GB / month

$0.025 per GB / month

$0.040 per GB / month

Instance traffic cost

$0.09 per GB

$0.09 per GB

$0.04 per GB

Total for 1 WCS instance

$1 115.06

$663.02

$623

Approximate volume and cost of CDN traffic

88.6 TB $8 164.8

88.6 TB $8 164.8‬

88.6 TB $3 628.8‬

CDN cost

$12 625.04‬

$10 816.88

$6 120,8‬

As you can see, the standard WCS license proved to be more cost-efficient for long-term deployment. The total cost of deploying a WebRTC CDN with a load balancer and autoscaling when using a standard WCS license on AWS and GCP platforms depends on the cost of traffic for a specific geographic area. Due to relatively high costs of long-term running of CDN, we recommend deploying on Amazon Web Services if you already have infrastructure that is deeply rooted there. It will help you limit the number of platforms you use, and the flexible pricing policy might let you save money on CDN integration into an existing infrastructure. The same holds true for short-term deployments on the Google Cloud Platform.

Our calculations were just a rough estimate of the possible costs, due to pricing transparency issues both platforms have. The platforms might charge the customers for storing deployment images, backups, leases of domain names and external IP addresses, and more. However, our estimates still make it possible to roughly compare total CDN prices.

In the end, the choice of the platform for WebRTC CDN deployment with load balancing and autoscaling depends not only on technical and economic considerations, but also on personal preference. We hope this article will make your deliberations a little bit easier.

Good streaming!

Links

Demo

CDN for low latency WebRTC streaming

WCS on Amazon EC2

Quick deployment and testing of the server

WCS in Amazon EC2

AWS load balancer with auto scale quick setup

WCS on Google Cloud Platform

GCP load balancer with autoscale quick setup

Теги:
Хабы:
Всего голосов 1: ↑1 и ↓0+1
Комментарии0

Публикации

Информация

Сайт
flashphoner.com
Дата регистрации
Дата основания
2010
Численность
2–10 человек
Местоположение
Россия

Истории