diff --git a/docs/guides/configuration-and-testing/webrtc-load-testing.md b/docs/guides/configuration-and-testing/webrtc-load-testing.md index a55135d9..f397fa7b 100644 --- a/docs/guides/configuration-and-testing/webrtc-load-testing.md +++ b/docs/guides/configuration-and-testing/webrtc-load-testing.md @@ -1,13 +1,13 @@ --- title: Load Testing -description: Simple guide to make a load testing on your Ant Media Server. +description: A simple guide to make a load test on your Ant Media Server. keywords: [Ant Media Load Testing, WebRTC test tool, Ant Media Server Documentation, Ant Media Server Tutorials] sidebar_position: 4 --- # Load testing -In this tutorial, we'll explain how to make a load testing on your Ant Media Server. The test environment has two parts: test server and SUT (system under test). We have two different setups for two different SUTs. +In this tutorial, we'll explain how to do WebRTC load testing on your Ant Media Server. The test environment has two parts: the test server and the SUT (system under test). We have two different setups for two different SUTs. Preparation of SUT ------------------ @@ -69,7 +69,7 @@ To deploy an Ant Media Server cluster, please see [here](https://github.com/ant- Ant Media WebRTC test tool -------------------------- -You can download the WebRTC load test tool from your account at [antmedia.io](https://antmedia.io/). The test tool is listed with Enterprise Edition under Download section of your Subscription. +You can download the WebRTC load test tool from your account at [antmedia.io](https://antmedia.io/). The test tool is listed for Enterprise Edition under the Download section of your account. Ant Media WebRTC Test Tool is a Java project for testing Ant Media Server WebRTC capabilities and has the following features. @@ -84,33 +84,49 @@ Running Ant Media WebRTC Test Tool #### Installation - apt-get install openjdk-11-jre -y - unzip webrtctest-release-*.zip - cd webrtctest/ +```bash +apt-get install openjdk-11-jre -y +unzip webrtctest-release-*.zip +cd webrtctest/ +``` + +This tool can be run from the terminal with the following commands:. - This tool can be run from the terminal with the following options. +```bash +#publishes output.mp4 to the server with default name myStream +./run.sh -f output.mp4 -m publisher -s 10.10.175.53 -p 5080 -n 1 -u false - ./run.sh -f output.mp4 -m publisher -n 1 #publishes output.mp4 to the server with default name myStream +#plays 100 viewers for default stream, myStream +./run.sh -m player -n 100 -s 10.10.175.53 -p 5080 -u false +``` - ./run.sh -m player -n 100 -s 10.10.175.53 -u false #plays 100 viewers for default stream myStream +If you are doing load testing on a cluster via a load balancer, and if your origin server is running behind port 443 and your Edge server behind port 5443, then the command should be as follows:. + +```bash +./run.sh -f test.mp4 -m publisher -s server-domain-name -n 1 -p 443 -q true -u false + +./run.sh -m player -i streamId -n 100 -s server-domain-name -p 5443 -q true -u false +``` #### Parameters - Flag Name Default Description - ---- ---- ------- ----------- - f File Name test.mp4 Source file* for publisher output file for player - s Server IP localhost server ip - q Security false true(wss) or false(ws) - l Log Level 3 0:VERBOSE,1:INFO,2:WARNING,3:ERROR,4:NONE - i Stream Id myStream id for stream - m Mode player publisher or player - u Show GUI true true or false - p Port 5080 websocket port number - v Verbose false true or false - n Count 1 Number of player/publisher connctions - k Kafka Broker null Kafka broker address with port - r Publish Loop false true or false - c Codec h264 h264 or VP8 - d Data Channel false true or false - -Note that the file in mp4 format should have h264 encoded video and Opus encoded audio. +``` +Flag Name Default Description +---- ---- ------- ----------- +f File Name test.mp4 Source file* for publisher output file for player +s Server IP localhost server ip +q Security false true(wss) or false(ws) +l Log Level 3 0:VERBOSE,1:INFO,2:WARNING,3:ERROR,4:NONE +i Stream Id myStream id for stream +m Mode player publisher or player +u Show GUI true true or false +p Port 5080 websocket port number +v Verbose false true or false +n Count 1 Number of player/publisher connctions +k Kafka Broker. null Kafka broker address with port +r Publish Loop. false true or false +c Codec h264 h264 or VP8 +d Data Channel. false true or false +``` + +**Note:-** The file in mp4 format should have h264 encoded video and Opus encoded audio.