Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Overview

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^

  1. The required number of streams are published on server (at least one stream per mixer)
  2. The specified number of audiomixers are created, and streams are fed to mixers input. One stream can be fed to one mixer input only/
  3. Mixers work for desired time then they will be destroyed and created again until the test is finished.

The server behavior can be observed with monitoring tools while testing. 

To manage mixel load testing the special REST API queries are used.

REST queries

A REST-query must be an HTTP/HTTPS POST query in the following form:

  • HTTP: http://streaming.flashphoner.com:8081/rest-api/mixer/test/start
  • HTTPS: https://streaming.flashphoner.com:8444/rest-api/mixer/test/start

Here:

  • streaming.flashphoner.com - is the address of the WCS server
  • 8081 - the standard REST / HTTP port of the WCS server
  • 8444 - the standard HTTPS port
  • rest-api - the required prefix
  • mixer/test/start - the REST-method used

REST methods and response statuses

...

REST method

...

Example of REST query

...

Example of response

...

Response statuses

...

Description

...

/mixer/test/start

...

Code Block
languagejs
themeRDark
{
    "feedingStreams": [
        "s1",
        "s2",
        "s3",
        "s4"
    ],
    "mixerCount": 2,
    "streamsInMixer": 2,
    "intervalInSeconds": 60
}

...

200 - OK

500 - Internal error

...

Start the test

...

/mixer/test/stop

...

Code Block
languagejs
themeRDark
{
}

...

200 - OK

404 - Mixer not found

500 - Internal error

...

Stop the test

...

/mixer/test/get_start_example

...

Code Block
languagejs
themeRDark
{
    "feedingStreams": [
        "stream1",
        "stream2",
        "stream3"
    ],
    "mixerCount": 3,
    "streamsInMixer": 1,
    "intervalInSeconds": 60
}

...

200 - OK

500 - Internal error

...

Return JSON object sample to pass to /mixer/test/start method

Parameters

...

Parameter name

...

Description

...

Example

...

feedingSteams

...

["s1","s2","s3","s4"]

...

Testing

1. For test we use:

  • WCS server
  • Chrome browser and REST-клиент to send queries
  • Two Way Streaming web application to publish streams

2. Publish streams named s1, s2, s3, s4

Image Removed

3. Open REST client. Send /mixer/test/start query with the following parameters:

  • streams published list: s1, s2, s3, s4
  • number of mixers: 2
  • number of streams per mixer: 2
  • mixer work interval: 120 seconds

Image Removed

4. Make sure mixers are created sending /mixer/find_all query

Image Removed

Two mixers mixer0 and mixer1 should be found

Image Removed

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

Image Removed

Tuning recommendations

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:

...

Include Page
WCS5EN:Mixer load testing
WCS5EN:Mixer load testing