Video streaming is a very resource-hungry process, because the stream should pass via several networks to ensure high quality of video, higher bitrates and resolution. This is why many specialists do not recommend broadcasting with the help of your own server. Otherwise, you may create bottlenecks and have unnecessary expenses for server infrastructure scaling. There is one effective solution for video streaming. It is called CDN (content delivery network).
Before discussing the point and principle of work of CDN, let’s dig into the details of delivery process. Video streams and other assets of different size are first transferred from a computer or a server to a receiving device. To achieve better efficiency, this content is divided into packets that are later assembled. Thus, a video stream is an asset that consists of many packets. The speed of their transfer depends partially on the distance between the server and end-user, and it is also impacted by routing decisions and conversions.
What makes video streaming difficult?
Latency is the time required for a packet to travel from one location to another. It can be one-way latency (travelling of packet in one direction) and round-trip latency (packet travelling to one destination and back). In some cases, latency can become an issue, causing slow loading and sometimes loss of packets during transmission.
To ensure smooth delivery of video stream, constant flow of information should be established between all participants. To facilitate connection, packets are divided into chunks that are encrypted independently. That makes video streaming more flexible. To ease the process even more, buffering is used (pre-loading before playback). This technology helps to minimize playback disruptions.
There are many other Internet services made for dealing with latency one way or another. The lower latency is, the better and faster is communication. Besides, better communication reduces the risk of network glitches: recovery from random packet loss becomes faster.
How content delivery networks help?
To solve the problem of latency, CDN was created. In substance, it aims at reducing physical distance between a user who tries to access the content, and the server that sends packets. Besides, it helps providers and ISPs to handle traffic.
What is a CDN?
is a vast network of edge servers that have copies of data cached from the origin server. They are located in different places. Users or organization then pull the required content from the closest servers.
The edge server is selected according to different algorithms. For instance, anycast method decides basing on geography of the end-user. Another method is designed to handle the request routing at DNS request level. According to the most advanced method, IP address of end user is passed along DNS resolver, and the closest edge server is found basing on the IP of the client.
CDN and Video Delivery
To facilitate video delivery, edge servers may also apply proxy caching. This technique stores content on the server to share this data with incoming requests. When a request is sent, the server first checks whether the requested content was cached on the server recently. If the content is absent, or the cached data had expired, it will be requested from the origin server.
Going beyond the edges of CDN
Use of CDN has a lot of advantages for delivery of different types of content. Video streaming is very resource-hungry, and is considerably improved by this technique. But sometimes it is not enough to ensure smooth delivery, and companies start offers additional services.
One of such services is called SD-CDN (Software Defined Content Delivery Network) that applies many CDNs for better performance. It allows reaching even better control for traffic and load balancing. While this technology is used for global streaming, there is another approach that addresses the unique challenges put by companies. Called eCDN, it caches a single version of a video asset that may be scaled to meet the demands of users requiring it.
CDN is essential technology for video delivery, and many companies can afford it, making data transfer much quicker and safer around the world.