Open-Source Internship opportunity by OpenGenus for programmers. Apply now.
In this article, we have done the calculations for Cost Estimate of hosting YouTube in two ways: One by using Hosting services (like AWS) and second is by buying our own hardware.
Table of contents:
- Introduction
- Factors Affecting the Cost of Developing a YouTube App
- Cost Estimate if you use hosting services
- Cost Estimate if you handle your own Hardware
- Summary
As a summary, For using Hosting services (like AWS), one-time hardware cost will be $460K while monthly running cost will be $1.05M. If you buy and manage your own hardware, then one-time cost will be $4M and monthly running cost will be $490K.
Introduction
The most effective generator of user engagement and conversions is video content. The success tales and steeply progressive graphs of global company brands such as YouTube, Netflix, TikTok, and Vimeo have fueled the enthusiasm and encouragement of businesses all over the world to create a video-sharing app like YouTube. However, if you miss the technical reality underlying this platform's success, your excitement can quickly turn into a blunder.
Keep in mind that all these worldwide behemoths were once startups. But the good news is that you now have access to all the tools that they used on their platform to make it huge. So, it is no surprise that your app will be the next remarkable thing!
But, before you get too eager to go right into the process of creating a video-sharing app like YouTube, it is a clever idea to figure out how much the app development will cost. If you have already decided to establish a video-sharing app, your first reaction will be to contact a software development business that can quickly bridge the gap between your aims and success.
YouTube, as a Content Market Titan, and Video Sharing Apps
With today's growing technologies and developments, 239 million US digital video viewers use video-sharing and streaming apps for a variety of purposes, including education, entertainment, information, and more.
While the video content market has given birth to a slew of video streaming apps, YouTube remains the primary source of video content. Ninety percent of the world's video output is re-distributed through various channels through YouTube. YouTube's extensive range of features and functionalities have made it a dominant platform in the video content business, from educational videos to cooking channels and online workshops.
Because of their rising popularity, video streaming apps' market share is growing by the day. There is, however, no software that can match YouTube's popularity.
Five hundred hours of new video are posted to YouTube every minute. With over two billion monthly users and one billion hours of daily video streaming, competing with YouTube seemed to be impossible. Netflix is in second place with forty-six million monthly users, or around a quarter of YouTube's total users.
Entrepreneurs and people have been inspired by the success of YouTube to explore developing a comparable app, but most have decided not to pursue because of the cost.
Factors Affecting the Cost of Developing a YouTube App
The cost of app development varies significantly based on the complexity of the app and the features you choose to include. The basic selection of features will save you time and money.
To create a highly functional, yet lightweight and simple program like YouTube, you will need a basic development team with experience building a robust backend and innovative frontend.
Your development team should ideally include the following specialists:
Business Analyst
Project Manager
Backend/Frontend Developer
iOS Developer
Android Developer
UI/UX Designer
Software Tester
You may create an app that runs on various platforms with the same codebase by using cross-platform app development frameworks like React Native, Flutter, or Xamarin. It's a faster, easier, and more efficient way to create an app.
Assume we are creating a video streaming service with the following capabilities:
β’ High availability, scalability, and reliability requirements
β’ Quick video uploading
β’ Smooth video streaming
β’ Video quality control
β’ Low infrastructure costs
β’ Apps for mobile devices, online browsers, and smart TVs are all supported.
Cost Estimate if you use hosting services
One time hardware cost:
High end Workstation: $2,500
Curved Display Monitor: $1000
Router for large business with balance network feature: $260
Best Wireless Mouse and Keyboard Set: $28.00
Hard drives:
2 TB hard drives cost approximately $100 or less.
Storage capacity : 9000 tb / month
Number of hard drives for storage: 4,500
So 9000 tb x $50 = $450,000 on storage costs
Total one-time hardware cost: $ 453,788.00
Estimation from the back of the envelope
β’ Assume a daily active user base of 5 million (DAU).
β’ On an average day, users watch five videos.
β’ One video is uploaded by 20% of users each day.
β’ Assume a video size of 300 MB on average.
β’ Required total daily storage space: 5 million * 20% * 300 MB = 300000gb or 300tb
STORAGE
Tiered price for: 300000 GB
51200 GB x 0.0230000000 USD = 1177.60 USD
248800 GB x 0.0220000000 USD = 5473.60 USD
Total tier cost: 1177.60 USD + 5473.60 USD = 6651.2000 USD (S3 Standard storage cost)
S3 Standard cost (monthly): 6,651.20 USD
LOAD BALANCER
Incoming requests can be forwarded to resources based on specified criteria with the help of a load balancer. At every layer of the system, a load balancer can be used. If we wish to use the AWS Load Balancer service, we may choose from three distinct types of load balancers:
Network Load Balancer
Classical Load Balancer (Deprecated)
Application Load Balancer
For this service, an application load balancer will be suited to our needs, and it will also be responsible for AZ distribution. Otherwise, you can utilize NGinx, but you'll need to design an algorithm and offer maintenance if you do.
Load balancing can be used;
β Between requests and web servers.
β Between web servers and application servers.
β Between application servers and databases
β Between application servers and image storages.
β Between application servers and cache databases.
For the load balancer, we can utilize the Round Robin approach. Although the Round Robin approach prevents requests from being sent to dead servers, it does not address the issue where any server is experiencing high load. To solve this problem, we can adapt the Round Robin technique to make it more intelligent.
As a best practice, you want at least two load balancers in a clustered pair. If merely one load balancer fails for whatever reason, the entire system fails.
Application Load Balancer
2 load balancers x 0.0225 USD per hour x 730 hours in a month = 32.85 USD
Application Load Balancer fixed hourly charges (monthly): 32.85 USD
Unit conversions
Processed bytes (EC2 Instances and IP addresses as targets): 9000000 GB per month x 0.00136986 months in an hour = 12328.74 GB per hour
Pricing calculations
12,328.74 GB per hour / 1 GB processed bytes per hour per LCU for EC2 instances and IP addresses as targets = 12,328.74 processed bytes LCUs for EC2 instances and IP addresses as targets
Max (0 USD, 0 USD) = 0.00 paid rules per request
Max (12328.74 processed bytes LCUs, 0 new connections LCUs, 0 active connections LCUs, 0 rule evaluation LCUs) = 12,328.74 maximum LCUs
2 load balancers x 12,328.74 LCUs x 0.008 LCU price per hour x 730 hours per month = 143,999.68 USD
Application Load Balancer LCU usage charges (monthly): 143,999.68 USD
Application Load Balancer Estimate
Application Load Balancer fixed hourly charges (monthly)
32.85 USD
Application Load Balancer LCU usage charges (monthly)
143,999.68 USD
Total monthly cost:
144,032.53 USD
CDN
β’ You are charged for data transported out of the CDN when a video is served via a cloud CDN.
β’ For cost estimation, we will use Amazon's CDN CloudFront (Figure 1.1). Assume that all traffic originates in the United States. The average per-gigabyte cost is $0.02. We just calculate the cost of video streaming for the sake of simplicity.
β’ $150,000 per day = 5 million * 5 videos * 0.3GB * $0.02
or $900,000 per month
We know that providing videos from the CDN costs a lot of money based on a rough cost estimate. Even while cloud providers are prepared to considerably reduce CDN rates for large customers, the cost is still significant.
Per Month | United States & Canada | Europe & Israel | South Africa & Middle East | South America | Japan | Australia | Singapore, South Korea, Taiwan, Hong Kong & Philippines | India |
---|---|---|---|---|---|---|---|---|
First 10TB | $0.085 | $0.085 | $0.110 | $0.110 | $0.114 | $0.114 | $0.140 | $0.170 |
Next 40TB | $0.080 | $0.080 | $0.105 | $0.105 | $0.089 | $0.098 | $0.135 | $0.130 |
Next 100TB | $0.060 | $0.060 | $0.090 | $0.090 | $0.086 | $0.094 | $0.120 | $0.110 |
Next 350TB | $0.040 | $0.040 | $0.080 | $0.080 | $0.084 | $0.092 | $0.100 | $0.100 |
Next 524TB | $0.030 | $0.030 | $0.060 | $0.060 | $0.080 | $0.090 | $080 | $0.100 |
Next 4PB | $0.025 | $0.025 | $0.050 | $0.050 | $0.070 | $0.085 | $0.070 | $0.100 |
Over 5PB | $0.020 | $0.020 | $0.040 | $0.040 | $0.060 | $0.080 | $0.060 | $0.100 |
Figure 1.1 Internet data transfer pricing based on demand (per Gb).
Building scalable blob storage or a CDN is difficult and expensive. Even major corporations such as Netflix and Facebook do not construct everything themselves. Netflix employs Amazon's cloud services, whereas Facebook relies on Akamai's content delivery network.
Optimization of costs
The CDN is an important part of our system. It ensures global video transmission in a timely manner. However, we know that CDN is expensive, especially when the data size is huge, based on a back of the envelope calculation. What can we do to cut costs?
According to previous studies, YouTube video streams exhibit a long-tail distribution pattern. It means that while a few popular videos are regularly viewed, many more receive little or no attention. We make the following changes as a result of this observation:
- Only deliver videos from the CDN that are the most popular, as well as videos from our high-capacity storage video servers.
- We may not need to store as many encoded video versions for less popular content. On-demand encoding of short videos is possible.
- Some videos are only popular in certain parts of the world. There's no need to send these videos to other countries.
- Create your own CDN, similar to Netflix, and collaborate with ISPs (ISPs). Building a CDN is a massive undertaking, but it may make sense for huge streaming companies. Comcast, AT&T, Verizon, and other internet service providers are examples of ISPs. ISPs can be found all around the world and are near to their customers. You can improve the viewing experience while lowering bandwidth rates by partnering with ISPs.
All of these adjustments are dependent on the popularity of the material, user access patterns, video size, and other factors. Before making any optimizations, it's critical to examine previous viewing patterns.
Cost Estimate if you handle your own Hardware
One time hardware cost:
High end Workstation: $2,500
Curved Display Monitor: $1000
Router for large business with balance network feature: $260
Best Wireless Mouse and Keyboard Set: $27.99
Hard drives:
2 TB hard drives cost approximately $100 or less.
Storage capacity : 9000 tb / month
Number of hard drives for storage: 4,500
So 9000 tb x $50 = $450,000 on storage costs
Servers for load balancer:
Number of servers: 10
Cost of server: $2000
Total cost of servers for load balancer: $ 20,000
Additional servers for CDN: (4tb servers at $800 each)
Number of servers across the globe:
Number of countries : 80
Number of servers each countries: 28
Total number of servers = 80 * 28 = 2240
Total cost of CDN server: $1,792,000
Additional servers for processing uploaded video, features like recommended videos and much more:
- Number of servers to handle the scale of videos: 2000
- Cost of each 4TB server: $800
- Total cost: 2000 * 800 = $1,600,000
ELECTRICITY
Workstation
Letβs say you have a high-end workstation running 24/7 that uses 500 watts of power.
500 watts multiplied by 24 hours divided by 1000 multiplied by 30 days equals 360 kilowatt-hours (kwh).
In US, the average cost of electricity per kWh is around 13.31 cents, so 360 multiplied by .1331 cents comes to a cost of around $ 47.92 per month.
Hard Disk
If you have a server running 24/7 that uses 9 watts of power, multiply 9 by 24 hours divided by 1000 multiply by 30 days will give you 6.48 kwh.
6.48 * .1331 = $0.86 per month
$0.86 * 4500 hard drives = $ 3,870.00 per month
Servers
Same computation applies for a server. If you have a server running 24/7 that uses 800 watts of power, multiply 800 by 24 hours divided by 1000 multiply by 30 days will give you 576 kwh.
576 * .1331 = $76.67 per month
$ 76.67 * (4250) servers = $325,847.5 per month
For monitors with 100 watts running at 24/7, itβs $9.58 per month.
And for router with 20 watts running at 24/7, itβs $ 1.92 per month.
INTERNET
In choosing an ISP, you have to check first if the provider is available at your location.
Next, think about how many employees you have, how many devices you need to connect to the internet, and how much bandwidth you'll need for the activities you'll be doing, whether it's video conferencing, massive downloads, or just browsing the web. If your firm requires many services from your supplier, such as phone, fax, cable, or web hosting, a bundle may be the most cost-effective option.
Comcast, AT&T, Verizon, and other internet service providers are examples of ISPs. ISPs can be found all around the world and are near to their customers. You can improve the viewing experience while lowering bandwidth rates by partnering with ISPs. Cost then will depend on the deal they could come up with.
Maintenance cost
If we assume 2% of the hardware requires monthly Maintenance and replacement, then the monthly cost will include:
- 0.01 * $4M = $80,000
Summary:
Hosting Company
Total one-time hardware cost: $ 453,788.00 ~$460K
Monthly running cost:
-
Electricity: $ 3,929.42
-
Storage: $ 6,651.20
-
Application Load Balancer: $ 144,032.53
-
CDN: $ 900,000.00
Total monthly running cost: $1,054,613.15 ~ $1.05M
With Dedicated Server
Total one-time hardware cost: $ 3,865,787.99 ~ $4M
Monthly running cost:
-
Electricity: ~ $350K
-
Internet: ~ $60K
-
Maintenance cost: ~80K
Total monthly running cost: $490K
So, if you are hosting YouTube for more than 6 months, the option to buy and manage your own hardware is economical.