Since build 5.2.1766 a scripts are available to test a maximum number of WebRTC publisher or subscribers per WCS server. The scripts are implemented in bash and use REST API to publish and pull WebRTC streams from a WCS server under test. The scripts are in /usr/local/FlashphonerWebCallServer/tools
folder.
To perform a load test, the following should be prepared:
Note that the server perfomance to perform the test should be at least twice as the server under test, otherwise the testing server may be a bottleneck.
A maximum number of WebRTC publishers test is performed with the following script
/usr/local/FlashphonerWebCallServer/tools/pushStreams.sh |
1. The following should be used for test:
test1.flashphoner.com
- WCS server to testtest2.flashphoner.com
- WCS server to perform the test2. Publish the source stream to the server test2.flashphoner.com
3. Launch pushStreams
script on test2.flashphoner.com
/usr/local/FlashphonerWebCallServer/tools/pushStreams.sh ws://test1.flashphoner.com:8080 http://test1.flashphoner.com:8081 test loadtest 10 |
Where:
ws://test1.flashphoner.com:8080
- websocket URL of the server to testhttp://test1.flashphoner.com:8081
- HTTP REST API URL of the server to testtest
- the source stream published to the testing nameloadtest
- the name prefix used to publish streams to the server to test10
- publishers countThe script displays a publishers list when successfully launched
4. Check stream publishers at the tested server statistics page http://test1.flashphoner.com:8081/?action=stat
5. Launch pushStreams
script on test2.flashphoner.com
to stop the test
/usr/local/FlashphonerWebCallServer/tools/pushStreams.sh ws://test1.flashphoner.com:8080 http://test1.flashphoner.com:8081 test loadtest stop |
Where:
ws://test1.flashphoner.com:8080
- tested server websocket URLhttp://test1.flashphoner.com:8081
- HTTP REST API URL of the tested servertest
- the source stream name published to the tested serverloadtest
- the name prefix used to publish streams to the tested serverstop
- keyword to stop the publishers with the parameters aboveThe script displays a stopped publishers list when successfully launched
A maximum number of WebRTC publishers test is performed with the following script
/usr/local/FlashphonerWebCallServer/tools/pullStreams.sh |
The following should be used for test:
test1.flashphoner.com
- WCS server to testtest2.flashphoner.com
- WCS server to perform the test2. Publish the source stream to the server test1.flashphoner.com
3. Launch pullStreams
script on test2.flashphoner.com
/usr/local/FlashphonerWebCallServer/tools/pullStreams.sh ws://test1.flashphoner.com:8080 http://test1.flashphoner.com:8081 loadtest 10 |
Where:
ws://test1.flashphoner.com:8080
- tested server websocket URLhttp://test1.flashphoner.com:8081
- HTTP REST API URL of the tested serverloadtest
- the name prefix used to pull streams from the tested server10
- subscribers countNote that script will pull all the streams published on the tested server with a specified number of subscribers per each.
The script displays a subscribers list when successfully launched
4. Check stream subscribers at the tested server statistics page http://test1.flashphoner.com:8081/?action=stat
5. Launch pullStreams
script on test2.flashphoner.com
to stop the test
/usr/local/FlashphonerWebCallServer/tools/pullStreams.sh ws://test1.flashphoner.com:8080 http://test1.flashphoner.com:8081 loadtest stop |
Where:
ws://test1.flashphoner.com:8080
- tested server websocket URLhttp://test1.flashphoner.com:8081
- HTTP REST API URL of the tested serverloadtest
- the name prefix used to pull streams from the tested serverstop
- keyword to stop the subscribers with the parameters aboveThe script displays a stopped subscribers list when successfully launched