Software QA FYI - SQAFYI

Easy and realistic Load Testing of HTTP Live Stream (HLS) with Apache JMeter

By:

The most efficient way to serve video from website and even more for Mobile devices is to stream it as users don’t need to download the full video to start playing it.

Another motivation for streaming is performance and network bandwidth use. As a phone user for example, you don’t want to have to restart your full download because it was interrupted by a phone call or any other simultaneous activity. On the server side, having your users download “progressively” is a big performance benefit.

One of the most popular format for streaming was RTMP (by Adobe), but for iOS this format is not supported. Apple created HLS (HTTP Live Stream) which is becoming increasingly popular even outside of Apple world thanks to new services based on HTML5 Video.

Ensuring you serve videos correctly is a critical matter to ensure infrastructure performance and stability.

HLS (HTTP Live Stream):

HLS has become a standard nowadays for Apple devices, IOS devices but also Desktop. Solutions for playback of HLS on other platforms mostly rely on third-party plug-ins such as Flash or QuickTime. However, the recent development of THEOplayer by OpenTelly now also allows playback of HLS directly on HTML5 platforms without the need of any third-party plug-ins.

Apple initially created HTTP Live Streaming (HLS) to easily deliver audio and video content without server software. As an HTTP-based media streaming protocol, HLS uses regular web servers to send both live and pre-recorded content through a variety of streams at different bit rates, adapting to different network bandwidths. To do so, it breaks the media stream up into shorter sequential downloadable file components of their overall streams.

trasnsport_stream
Being HTTP based, HLS can bypass firewalls or proxy servers and can easily be hosted by Content Delivery Networks.

You can read this overview for more in-depth understanding of protocol. Load testing HLS with Apache JMeter:

Load testing HLS realistically is a challenge whatever the tool you use.

For Apache JMeter, whenever you want to load test a video infrastructure serving videos, you can easily find (by googling a bit :-) ) 2 interesting blogs by Cloud Players showing how to combine Regexp Extractor and HTTP Request to simulate load on servers.

Unfortunately, these methods have the following drawbacks or limits which will will be at the same time the opportunity to show the features of our plugin: Unrealistic simulation

Players have a complex behavior in order to reduce pause times (Lag) during the play.

Few examples:
They select the playlist depending on the bandwidth
They initially buffer few seconds before starting to play
They download data while video is being played


Another problem is that your test won’t be able to limit the bandwidth for some of your users based on their network type.

Full article...


Other Resource

... to read more articles, visit http://sqa.fyicenter.com/art/

Easy and realistic Load Testing of HTTP Live Stream (HLS) with Apache JMeter