Hi All,
I am very new to load testing. Is it possible to use k6 for load testing streaming protocols like HLS, RTSP and MPEG-DASH.
If not supported any WA to achieve the same ?
Thanks in advance, any help is appreciated.
Regards
Bibin Mathews
Hi All,
I am very new to load testing. Is it possible to use k6 for load testing streaming protocols like HLS, RTSP and MPEG-DASH.
If not supported any WA to achieve the same ?
Thanks in advance, any help is appreciated.
Regards
Bibin Mathews
Unfortunately, k6 doesn’t support any of the protocols you mentioned yet, sorry. I don’t think it would even be possible to use the k6/http
API with some JavaScript HLS parser to implement that, because we don’t support long-lived HTTP requests with streaming bodies, which I think are required to get the playlist entries…
That said, if you know Go, it should be relatively easy to add an xk6 extension for any of these protocols, see GitHub - grafana/xk6: Build k6 with extensions and Testing without limits: xk6 and k6 extensions
While RTSP is truly a streaming protocol with … varying amount of very specific not at all HTTP related functionality, at least in my experience with both HLS and MPEG-DASH they are primarily consisting of a playlist(s) file(s) in some format that may or may not get updated each time you GET it. And that playlist files just list (small) video files that are 5-15 seconds or so of the content. And a player just knows that it needs to keep getting the playlist before it runs out of video files and then plays the video files seamlessly one after the other(oversimplified but in general true ;)).
There is probably some variant where there is actual streaming but that would be very not CDN friendly it will only be reserved for cases where it is actually needed.
So I would argue depending on your needs it might be perfectly possible to just using k6 and the k6/http
module, but you may need to be able to parse HLS and MPEG-DASH playlists, which (from personal experience) is definitely possible and not exactly hard. Although I would argue you should try to just use some ready-to-go parser, possibly what is used in the frontend of w/e you are testing.
xk6 is still your best bet if you need RTSP or if there is actual real streaming of data.