Overview
The Eyevinn Chaos Stream Proxy is a versatile open-source tool designed to simulate various network conditions and streaming errors, enabling developers and QA engineers to test the resilience and performance of video streaming services. By acting as an intermediary between the client and the streaming server, it enables the introduction of controlled impairments, such as latency, timeouts, and HTTP errors.
Key Use Cases of Eyevinn Chaos Stream Proxy
- Simulating Network Impairments: Introduce artificial delays, throttling, or timeouts to mimic poor network conditions. This helps in assessing the robustness of streaming applications under varying network environments.
- Continuous Integration and Deployment (CI/CD) Testing: Incorporate the Chaos Stream Proxy into CI/CD pipelines to automatically test streaming applications against predefined error scenarios, ensuring consistent quality and reliability before deployment.
- Live Stream Resilience Assessment: Evaluate how live streaming setups respond to real-time issues by simulating segment failures or network disruptions, ensuring minimal impact on the viewer experience.
- Analytics and Monitoring Validation: Test the accuracy and responsiveness of analytics systems by generating specific errors and verifying that these incidents are correctly logged and reported.
Getting Started with Chaos Stream Proxy in Open Source Cloud
Prerequisites
- If you have not already done so, sign up for an OSC account or sign in
Create a Chaos Stream Proxy instance
Navigate to the Chaos Stream Proxy service in Eyevinn Open Source Cloud and activate the service if you have not already.
Enter a name for your chaos stream proxy instance.
Decide if you wish to enable stateful mode (disabled by default). Stateful mode is a configuration option in the Chaos Stream Proxy that allows the system to store and track state information about streaming media requests. When enabled, the proxy maintains an in-memory cache to track information such as the initial sequence number of media segments.
When ready, press "Create". You will then shortly have an instance of the Chaos Stream Proxy running.
Simulate errors
To simulate different errors, append a stringified JSON as a query parameter to the proxy URL. Each corruption type uses its own format and targets specific segments:
https://<chaos-proxy>/api/v2/manifests/hls/proxy-master.m3u8?url=<some_url>&some_corruption=[{i:0},{i:1},...]
Each {i:N} targets the Nth segment for corruption.
Available query parameters:
PARAMETER | DESCRIPTION |
---|---|
url |
Url path to the original HLS/MPEG-DASH stream (REQUIRED) |
delay |
Delay the response, in milliseconds, for a specific segment request |
statusCode |
Replace the response for a specific segment request with a specified status code response |
timeout |
Force a timeout for the response of a specific segment request |
throttle |
Send back the segment at a specified speed of bytes per second |
To see what corruptions are available, see the list of supported corruptions.
Some examples corruptions:
Segment delay of 3000ms on first and second segment of a HLS VOD stream:
https://eyevinnlab-sandra.eyevinn-chaos-stream-proxy.auto.prod.osaas.io/api/v2/manifests/hls/proxy-master.m3u8?url=https://maitv-vod.lab.eyevinn.technology/VINN.mp4/master.m3u8&delay=[{i:0,ms:3000},{i:1,ms:3000}]
MPEG-DASH live stream with a segment download speed limited to 10kB/s on all segments:
https://eyevinnlab-sandra.eyevinn-chaos-stream-proxy.auto.prod.osaas.io/api/v2/manifests/dash/proxy-master.mpd?url=https://f53accc45b7aded64ed8085068f31881.egress.mediapackage-vod.eu-north-1.amazonaws.com/out/v1/1c63bf88e2664639a6c293b4d055e6bb/64651f16da554640930b7ce2cd9f758b/66d211307b7d43d3bd515a3bfb654e1c/manifest.mpd&throttle=[{i:*,rate:10000}]
Additional documentation
See the GitHub repository for the Eyevinn Chaos Stream Proxy.