Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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:

  • WCS server to test
  • WCS server to perform the test
  • a tool to publish a source stream (OBS to publish RTMP,  or Media Devices example to publish WebRTC)

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.

Testing a maximum number of WebRTC publishers

A maximum number of WebRTC publishers test is performed with the following script

/usr/local/FlashphonerWebCallServer/tools/pushStreams.sh

1. The following should be prepared for test:

  • test1.flashphoner.com - WCS server to test
  • test2.flashphoner.com - WCS server to perform the test
  • Media Devices example to publish a source stream

2. 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 test
  • http://test1.flashphoner.com:8081 - HTTP REST API URL of the server to test
  • test - the source stream published to the testing name
  • loadtest - the name prefix used to publish streams to the server to test
  • 10 - publishers count

The 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 URL
  • http://test1.flashphoner.com:8081 - HTTP REST API URL of the tested server
  • test - the source stream name published to the tested server
  • loadtest - the name prefix used to publish streams to the tested server
  • stop - keyword to stop the publishers with the parameters above

The script displays a stopped publishers list when successfully launched

Тестирование максимального количества WebRTC подписчиков

Тестирование максимального количества подписчиков проводится при помощи скрипта

/usr/local/FlashphonerWebCallServer/tools/pullStreams.sh

1. Для теста используются:

  • test1.flashphoner.com - тестируемый WCS сервер
  • test2.flashphoner.com - тестирующий WCS сервер
  • пример Media Devices для публикации исходного потока

2. Публикация исходного потока на сервер test1.flashphoner.com 

3. Запуск скрипта pullStreams на сервере test2.flashphoner.com 

/usr/local/FlashphonerWebCallServer/tools/pullStreams.sh ws://test1.flashphoner.com:8080 http://test1.flashphoner.com:8081 loadtest 10

Здесь:

  • ws://test1.flashphoner.com:8080 - websocket URL тестируемого сервера
  • http://test1.flashphoner.com:8081 - HTTP URL тестируемого сервера для использования REST API
  • loadtest - префикс имени, с которым будут захватываться потоки с тестируемого сервера
  • 10 - количество подписчиков

Обратите внимание: скрипт захватит все опубликованные на тестируемом сервере потоки, каждый заданным количеством подписчиков.

При успешном запуске, скрипт выводит на консоль список подписчиков

4. Контроль подписчиков на странице статистики тестируемого сервера http://test1.flashphoner.com:8081/?action=stat 

5. Запуск скрипта pullStreams на сервере test2.flashphoner.com для остановки теста

/usr/local/FlashphonerWebCallServer/tools/pullStreams.sh ws://test1.flashphoner.com:8080 http://test1.flashphoner.com:8081 loadtest stop

Здесь:

  • ws://test1.flashphoner.com:8080 - websocket URL тестируемого сервера
  • http://test1.flashphoner.com:8081 - HTTP URL тестируемого сервера для использования REST API
  • loadtest - префикс имени, с которым захватываются потоки с тестируемого сервера
  • stop - ключевое слово для остановки подписчиков с указанными параметрами

При успешной остановке подписок, скрипт выводит на консоль сведения об остановке


  • No labels