using jmeter for performance testing live streaming applications
TRANSCRIPT
![Page 1: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/1.jpg)
Using JMeter for Performance Testing Live Streaming Applications
Presented by BlazeMeter a CA Technologies Company
Sep 6, 2017
![Page 2: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/2.jpg)
AGENDA
• Intro• HLS Overview• HLS & JMeter Old Style• HLS & JMeter New Style• Q&A
![Page 3: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/3.jpg)
What a long strange trip it’s been...
Dave Karow { Developer Advocate } @davekarow
Keynote Systems (7 years)- Load Testing- Synthetic Monitoring
dynatrace
SOASTA
BlazeMeter
CA Technologies Continuous Delivery
![Page 4: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/4.jpg)
HLS Overview
HLS = HTTP Live Streaming• Uses only http/https (remember real media?)
– Proxy/firewall friendly– Served from any http server/CDN
• Adaptive Bitrate: Degrades instead of stalling– Multiple stream variants (by bandwidth/resolution)– Client chooses/re-chooses best stream
![Page 5: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/5.jpg)
HLS Components
1. Encoding/Encapsulation: Transcoder
a. The “heavy lifting” (CPU intensive)
b. Outputs:
i. .m3u8 master index (list of variants)
ii. .m3u8 variant index (list of segments)
iii. .ts file containing each segment
![Page 6: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/6.jpg)
HLS Components
1. Encoding/Encapsulation: Transcoder
2. Distribution: Web Server/CDN/Proxy
3. Client: Mobile Device, js in Browser, etc...
Our Focus Today
![Page 7: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/7.jpg)
1. Get master playlist for “about_demo” videoGET http://hls.demoblaze.com/index.m3u8
2. Parse master playlist for list of variants, choose one(let’s assume low bandwidth environment, so lowest resolution to start)
3. Get variant playlist matching bandwidth/resolutionGET http://hls.demoblaze.com/about_demo_hls_600k.m3u8
4. Get and play fragment from variant playlistGET http://hls.demoblaze.com/about_demo_hls_600k00000.ts
5. If live: Go back to #1 to get new master playlist
HLS Playback Flow @ High Level
![Page 8: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/8.jpg)
GET http://hls.demoblaze.com/index.m3u8
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=8674000,RESOLUTION=1024x576,CODECS="avc1.4d001f,mp4a.40.2"
about_demo_hls_2M.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=7633000,RESOLUTION=960x540,CODECS="avc1.4d001f,mp4a.40.2"
about_demo_hls_1-5M.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=3733000,RESOLUTION=640x360,CODECS="avc1.4d001f,mp4a.40.2"
about_demo_hls_1M.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2624000,RESOLUTION=480x270,CODECS="avc1.42001e,mp4a.40.2"
about_demo_hls_600k.m3u8
list of variants by bandwidth/resolution
The Master Playlist
![Page 9: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/9.jpg)
GET http://hls.demoblaze.com/about_demo_hls_600k.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:13
#EXTINF:12.066667,
about_demo_hls_2M00000.ts
#EXTINF:9.000000,
about_demo_hls_2M00001.ts
#EXTINF:9.000000,
about_demo_hls_2M00002.ts
list of fragments for that variant
Variant Playlist
![Page 10: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/10.jpg)
GET http://hls.demoblaze.com/about_demo_hls_600k00000.ts
(ts = transport stream fragment)
Fragment
![Page 11: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/11.jpg)
As Seen By BlazeMeter Chrome Extension
Master Playlist (m3u8)
Variant Playlist (m3u8)
Fragments (.ts)
Faster Variant Playlist
Fragments (.ts)
![Page 12: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/12.jpg)
Let’s Do A Live Demo
![Page 13: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/13.jpg)
Many Pieces...Scripting in JMeter: Old Style
![Page 14: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/14.jpg)
HLS Sampler Plug-InScripting in JMeter: New Style
![Page 15: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/15.jpg)
HLS Sampler Plug-InScripting in JMeter: New Style
![Page 16: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/16.jpg)
Adding Assertions
Assertions can be raised against:• Master Playlist• Variant Playlist
Example Assertions:• Response Assertion• Duration Assertion
![Page 17: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/17.jpg)
Adding Assertions
![Page 18: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/18.jpg)
Wrapping Up
The HLS Sampler plugin is open-source.
Pull requests are welcomed!
1. Go to jmeter-plugins.org2. Search “hls”and click on “HLS Sampler”3. That puts you in Git-Hub: jump right in!
![Page 19: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/19.jpg)
Q&A Time
![Page 20: Using JMeter for Performance Testing Live Streaming Applications](https://reader030.vdocuments.us/reader030/viewer/2022021417/5a6d4acd7f8b9a16428b525b/html5/thumbnails/20.jpg)
Next Steps
● Add the HLS Sampler via Plugins Manager or by
visiting jmeter-plugins.org
● Create your free account at blazemeter.com
● Performance Testing Blog – blazemeter.com/blog
● Learning Resources – blazemeter.com/resources
● Quick Survey @ Webinar Exit – Thanks!