HTTP Streaming: Load Balancing

This post is also available in: Russian

balancing-http-streaming

In most cases, modern video content delivery systems are based on HTTP Streaming. This technology delivers video in a series of fragments (chunks), several seconds each. The most popular video delivery formats are Apple HTTP Live Streaming and Adobe HTTP Dynamic Streaming. In the near future, MPEG DASH will also probably become popular. The benefits offered by this type of delivery consist in a more stable video platform operation over a heterogeneous public network (Internet) and use of existing mechanisms of traditional CDN networks (HTTP chunk caching). But often traditional media is not sufficient, and large-scale online video services usually require a more flexible management of video content delivery. In our projects, we use our Video Load Balancer. In this post, we are going to outline the basics of its operation that might be helpful to your projects regardless of the load balancing technology you use.

In the popular video services, the load is usually snowballing in prime time, i.e., when people come home from work in the evening to watch favorite movies, programs, series, shows and sports broadcasts. This effect is multiplied during popular sports events or premiere screenings. In this context, to enable efficient load distribution and ensure the maximum performance, we developed a C++ server. In a typical situation, tens of thousands of users connect over a short period of time. So a critical feature of the load distribution server is to handle several thousand requests per second. Given that the load balancing server determines the source and the way of video delivery to the user, response time (processing speed) is also extremely critical: in fact, this directly determines delay at video start. In such a situation, running the balancer independently is critical, as the balancer has to factor-in all the data from video content sites and make a routing decision based on the data in the process memory.

Video load balancer consists of two main parts: the core load balancing module and the statistics modules that collect the data to enable routing. For instance, having the list of video servers that have cached the content requested by the user, you can ensure content delivery from the closest server cache, thus saving considerable time.

While creating a statistics module, it is important to factor-in the following aspects:

  • The statistics module collects data on cache availability for different types of content chunks, i.e, VoD, Live, DVR
  • Different types of devices can consume different formats of content chunks (HTTP LS / DS / PD)
  • Cache size can be infinite, but it has to be monitored fast: as the disk size grows, delivery servers may contain terabytes or even dozens of terabytes of video
  • Different servers may have different throughput, and for each type of content it may vary: for instance, for HD video
  • Content availability in the cache is determined by a certain number of chunks: however, the video server should not necessarily contain absolutely all chunks

When you create a load balancing module, please keep in mind the following aspects:

  • Collection and aggregation of video server statistics in the background mode
  • Support of various video server locations: they may be hosted different Data Centers, cities or even countries
  • Excluding or including particular content servers, for instance, to enable maintenance or troubleshooting
  • Forced collection of statistics from the edge servers at peak loads: this is essential when the situation changes rapidly and the server may be overloaded for dozens of seconds
  • Traffic sharing with external CDNs in case of peak or high load on all home servers: this could enable significant savings on CDN services
  • Load balancing based on user reports on unavailability of certain video servers: if some servers are unavailable, the users should be able to report and get alternative URLs
  • API Access Control

Moreover, we have faced a need for a convenient API to collect real-time balancing and connection statistics and adapt load balancer configuration on the fly. That’s why we have created a small AIR application called CDN Admin.

Wishing you a great load on your video services and a high quality of content delivered to your users!

P.S. If you wish to try our video load balancer in your HTTP streaming projects, we are happy to configure it for you. Particularly, if the load is very high 🙂

Leave a Reply