If server use case involves stream mixing, mixer load testing may be necessary before you put server into production. The mixer testing is carried out as follows^
The server behavior can be observed with monitoring tools while testing.
To manage mixel load testing the special REST API queries are used.
A REST-query must be an HTTP/HTTPS POST query in the following form:
Here:
REST method | Example of REST query | Example of response | Response statuses | Description | |
---|---|---|---|---|---|
/mixer/test/start |
| 200 - OK 500 - Internal error | Start the test | ||
/mixer/test/stop |
| 200 - OK 404 - Mixer not found 500 - Internal error | Stop the test | ||
/mixer/test/get_start_example |
| 200 - OK 500 - Internal error | Return JSON object sample to pass to /mixer/test/start method |
Parameter name | Description | Example |
---|---|---|
feedingSteams | Stream published list to participate in test | ["s1","s2","s3","s4"] |
mixerCount | Number of mixers created | 2 |
streamsInMixer | Number of streams fed to each mixer input | 2 |
intervalInSeconds | Interval in seconds to destroy mixers and create them again | 60 |
To test mixer perfomance under high load, asynchronous media session disconnection (which is enabled by default) should be disabled
handler_async_disconnect=false |
WCS should be restarted to apply.
When test is finished, this setting must be removed from configuration file.
1. For test we use:
2. Publish streams named s1, s2, s3, s4
3. Open REST client. Send /mixer/test/start query with the following parameters:
4. Make sure mixers are created sending /mixer/find_all query
Two mixers mixer0 and mixer1 should be found
5. Server resource consumption can be observed while testing with Java Mission Control, load and resource usage information and error information pages, and server logs.
6. Stop the test with /mixer/test/stop query
1. If large CPU load was detected during testing, follow server tuning recommendations.
2. If resource leak was detected during testing, send detailed test description and the following files to support@flashphoner.com: