You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WebRTC Server that generates usage reports, Web/CLI Clients included!
webrtc-bench is a WebRTC server that plays a video file from disk, and then re-distributes via WebRTC. It generates performance metrics including CPU usage, peer connection counts, and detailed latency measurements for connection setup phases.
This repo contains a CLI WebRTC Client that will connect and perform the load test. This is done via a REST API hosted on :8080/doSignaling. You can also watch the video/load test via the web UI at :8080/,
it connects via the same REST API as the CLI.
You can then access the Web UI at https://localhost:8080. This requires a browser that supports H264, this repo doesn't do any error handling around signaling failures.
You can also use the provided WebRTC CLI
cd webrtc-bench/client
go run main.go localhost:8080
Output Files
The benchmark generates three CSV files with performance data:
signaling_rtt: Round-trip time for signaling exchange
ice_connection: Total time to ICE connected
dtls_handshake: DTLS handshake completion time
media_ready: Total connection setup time
All latency measurements are recorded with sub-millisecond precision.
Results
The following graph was generated from the results.csv that was generated by the server. The client was run from another EC2 instance in the same VPC.
The Y Axis is the CPU Usage, and the X Axis is the count of PeerConnections. This was run on a m4.2xlarge (Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz)
FAQ
What codec/bitrate was being distributed
This is controlled by what video you use. You can go as high (or low) as you want.
What SRTP Cipher was used
SRTP_AEAD_AES_128_GCM
What Congestion Control/Feedback is used
None, on purpose.
Pion by design allows the user to specify what they want. We are distributing a video feed that is already encoded, and has a very small keyframe-interval so these things don't help us.
When setting up the PeerConnection you have full control of the RTP/RTCP pipelines, so users can add TWCC/NACK/FEC in a way that works for them.