Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create WebRTC load tester #327

Merged
merged 11 commits into from
Nov 6, 2023
Merged

Create WebRTC load tester #327

merged 11 commits into from
Nov 6, 2023

Conversation

victorges
Copy link
Member

@victorges victorges commented Oct 20, 2023

This creates a new command to run a load test on the WebRTC livestreaming. The focus is
on testing scalability of WebRTC playback for now, and so ingest is simplified to still be in RTMP.

There is a single binary and container which can be run as different roles: orchestrator, streamer and player. Explaining each of these roles:

  • orchestrator can run on user machine (later we can set it up on CI) since it just calls APIs, doesn’t run any heavy load. It creates a stream and then starts 1 streamer and N players on Google Cloud Run
    • Orchestrator keeps track of all jobs running on Cloud Run and deletes them when the test is done (including cancelling with a simple ctrl+c)
    • If the process crashes and the jobs don’t get deleted, one can also pass a -test-id CLI argument (or in config file) so it picks up on a running test (and deletes resources on exit)
    • It can be configured with the number of viewers to emulate on which Google Cloud regions, to simulate any global distribution. Should be configured with a map of GCP region name to number of viewers.
  • streamer gets an RTMP URL and stream key and ingests to that endpoint. There are a couple files embedded in the docker image and it can also download files if a URL is provided, but by default it uses a nice 1080p@30fps Big Buck Bunny on loop.
  • player receives a player URL, playback ID (TODO: or playback URL) and opens a headless browser on the lvpr.tv player for that stream. It uses the lowLatency=force option to make sure to play only WebRTC.
    • The player opens multiple tabs on the headless browser, so it behaves as multiple simultaneous viewers at once. This is on order to share and save Cloud Run resources with some parallelism.

@victorges victorges requested a review from a team as a code owner October 20, 2023 19:51
@victorges victorges force-pushed the vg/feat/webrtc-load-tester branch from 594b568 to e850c56 Compare October 21, 2023 19:25
@victorges victorges force-pushed the vg/feat/webrtc-load-tester branch from e850c56 to 42f3925 Compare October 21, 2023 19:31
@victorges victorges merged commit e52cdbd into master Nov 6, 2023
@victorges victorges deleted the vg/feat/webrtc-load-tester branch November 6, 2023 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants