Upload
blazemeter
View
313
Download
0
Embed Size (px)
Citation preview
Using JMeter for Performance Testing Live Streaming Applications
Presented by BlazeMeter a CA Technologies Company
Sep 6, 2017
AGENDA
• Intro• HLS Overview• HLS & JMeter Old Style• HLS & JMeter New Style• Q&A
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
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
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
HLS Components
1. Encoding/Encapsulation: Transcoder
2. Distribution: Web Server/CDN/Proxy
3. Client: Mobile Device, js in Browser, etc...
Our Focus Today
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
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
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
GET http://hls.demoblaze.com/about_demo_hls_600k00000.ts
(ts = transport stream fragment)
Fragment
As Seen By BlazeMeter Chrome Extension
Master Playlist (m3u8)
Variant Playlist (m3u8)
Fragments (.ts)
Faster Variant Playlist
Fragments (.ts)
Let’s Do A Live Demo
Many Pieces...Scripting in JMeter: Old Style
HLS Sampler Plug-InScripting in JMeter: New Style
HLS Sampler Plug-InScripting in JMeter: New Style
Adding Assertions
Assertions can be raised against:• Master Playlist• Variant Playlist
Example Assertions:• Response Assertion• Duration Assertion
Adding Assertions
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!
Q&A Time
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!