Content Delivery Network (CDN)
Problems that led to designing CDNs
If millions of users worldwide use our data-intensive application, and we have our service deployed at a datacenter to serve the users’ requests, what possible problems can arise?
The data between the client and the server travels over a network that introduces network delays due to the distance between the client and the server and the size of the data to be transferred. That implies that increasing distance of our application’s user from the physical server will increase the latency. User-perceived latency has many components such as transmission delays (a function of available bandwidth), propagation delays (a function of distance), queuing delays (a function of network congestion), and end-node delays.
Transmitting the data over a large distance results in the propagation delay(a component of latency) that indirectly affects available bandwidth. This is because data might pass through many networks, and some of them might be congested so this thing leads to the blockage of data. Therefore, we can bring data near to the user by placing a small data center near to the user and storing copies of the data there. CDN primarily targets propagation delay by bringing the data closer to its users. CDN providers go an extra mile to have sufficient bandwidth available through the path, and by bringing data closer to the users (possibly within their ISP). They also try to reduce transmission and queueing delays because presumably, ISP will have more bandwidth available within the autonomous system.
According to one of the readings (AWS latency monitoring) on 2021-12-21, the average latency from US East (N. Virginia) to US West (N. California) was 62.9 milliseconds, and across continents, for example, from the US East (N. Virginia) to Africa (Cape Town) was 225.63 milliseconds. Here, we are discussing a two-way latency known as round-trip latency.
Many applications can not afford considerable network delays, and they want to keep the latency low to give the best services to their users. The VoIP and video (for live events without buffering) have stringent latency requirements. For VoIP, latency should not be more than 150 ms. When It crosses 150 ms, the quality of voice starts falling off. A latency of 300 ms or higher is unacceptable. Latency should not be more than 4 to 5 seconds for video streaming. For interactive video, one-way latency should not be more than 150 milliseconds. A solution to meet the low latency requirements of such applications is to reduce the distance between the clients and the data center. The various CDN providers use many streaming protocols to provide dynamic content. For example, cdnsun uses the RTMP (Real-Time Messaging Protocol), HTS (HTTP live streaming), RTSP (Real-Time Streaming Protocol), etc., to deliver dynamic content.
An application can’t serve millions of users simultaneously due to the limitation of computational resources. Popular applications have huge numbers of users that increase with time, so we need a scalable solution to accommodate increasing users. Although modern datacenters have substantial bandwidth, it’s not viable for users and their ISP’s. ISPs might need to pay fees to use international bandwidth, and such bandwidth might be congested, giving ISP’s customers a poor service due to less bandwidth and longer delays. So it is a win-win situation for the ISP, their customers, and the service provider to serve the data as near to the client as possible.
Video streaming applications want to provide the best quality with the varying bandwidth between user and server connection. They need to store each frame of video with different qualities. Research shows that many contents have long-tail distribution. That means at some point, only a handful of content is very popular, and then we have a long tail of not-so-popular content.
Different geographic regions can have different popular content. We can distribute content to different regions based on the ...
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy