HTTP Live Streaming Performance Test

HTTP Live Streaming Performance Test

Why should you test HTTP Live Streaming Performance?

HTTP Live Streaming Performance Test

Why should you test HTTP Live Streaming Performance?

HTTP Live Streaming protocol is designed by Apple. It can send live and on‐demand audio or video to any device with HTTP Live Streaming (HLS) technology. By using this technology, Content Delivery Networks are used to host these types of contents by separating ordinary web servers from CPU consuming transactions. HTTP live streaming performance test is essential for its quality.

HLS is an adaptive bitrate technology for different bandwidths and resolutions. HLS files are divided into small files encoded using the mpg2_ts codec. The streams are mapped to the client in real time using a .m3u8 index file based on screen size and available bandwidth.

Let’s see how to do a load test on an HLS platform. HLS files have a .m3u8 extension and it’s important for you to understand its structure and responses.

  • Make an HTTP call to m3u8 files. The response is not something you see every day. It’s not an HTML, XML or JSON It’s different. You receive the small HTTP chucks split by the CDN server.

Example:

#EXTM3U

#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=688301

http://url/1010qwoeiuryfg/0640_vod.m3u8

  • Capture m3u8 chucks by adding a Regular Expression Extractor to HTTP Sampler.

By using this specific regular expression, we capture the numeric expression located in the responses like “0640_vod.m3u8”.

  • Make a request to these captures m3u8 file.

You may receive thousands of chucks, so you need to make a request to each one of them.

  • Add a ForEach Controller to make a request to all these chucks by setting the Input variable prefix to our Regular Expression Extractor’s ReferenceForEach controller it will work as a loop and iterate through all the received chucks.
  • Create a new HTTP sampler. Pass the chuck name captured in the previous request into the path of the new URL.

We are ready to make a request to the captured chunks but one step is missing. That is; keeping the streaming alive.

  • Run your test once and see the output. You have another different response coming from the chunks.

#EXTM3U

#EXT-X-TARGETDURATION:10

#EXT-X-MEDIA-SEQUENCE:0

#EXTINF:10,

0640/06400.ts

#EXTINF:10,

0640/06401.ts

#EXTINF:10,

0640/06402.ts

  • Capture the “*.ts” keywords. So we create another Regular Expression Extractor and extract ts files.
  • ForEach controller, pass Streams variable as an input to it so you iterate in it.

HTTP Live Streaming Performance

  • Create an HTTP Sampler to make a request for these ts links.
  • Now upload your JMX files into Loadium and conduct your HTTP Live Streaming Performance test.

Please feel free to ask questions if you have any.

Happy load testing!