As a company designed and built around WebRTC, we understand both VoIP and Web worlds, and the challenges and opportunities that they bring. Our insights, together with inputs received from leading WebRTC solutions providers and developers were translated into WebRTC expertise and testing best practices.
Our testRTC solution was designed and implemented with the goal to help you to test, operate, and optimize your WebRTC applications by following the described testing best practices.
If you decide to use testRTC or not is something you need to decide on your own. That said, here are tests you should conduct on your WebRTC product. It is the baseline that we suggest our customers focus on first with their products.
This best practices guide covers the following test areas:
1. Basic Sizing and Scaling
Here the focus is to test different types of call and situations:
- Peer to Peer, typically 2 participant call running for longer duration – 20 min / 40 min / 60 min / 90 min
- Group calls with a different number of participant
- Group call running for longer duration – 20 min / 40 min / 60 min / 90 min
- Participants joining, ending and rejoining from ongoing call
- New participants joining and old participants ending the call
- Find Max Session Size: the number of participants that can fit into a single session together
- Check metrics (bitrates, packet loss and general stability) versus smaller session sizes
- Find where metrics start to deteriorate and when metrics are unacceptable
2. Media Testing
The Idea is to used different media types and check how the bitrates and other metrics are handled:
- Use 1080p inputs and see how it affects session bitrate and server-side load
- Use 720p and VGA inputs and see if bitrate gets lowered considerably (WebRTC has a tendency of over-using bandwidth in lower resolutions by default)
- Work in different simulated networks and see how it affects metrics
Note that the media files of testRTC come in different resolutions. The browser later scales down this raw input media to the resolutions needed for its own scenario.
3. Network Testing
- Check Calls in different network conditions and combinations: look for how bitrates are maintained and changed to accommodate different bandwidth availability.
- Combine 3-1 and 2
- Simulate mid-call High packet loss or High Latency conditions
- Simulate Call Drops for different users and check how the recovery takes place
- Simulate Bandwidth change in the call and check how the service handles these. E.g. From WiFi to 4G to 3G to 2.5 G
- Above should be done for the different type of users and how the situation is handled need to be reviewed
See rtcSetNetwork() and rtcSetNetworkProfile() on how to make these changes dynamically.
4. Firewall Testing
WebRTC peer to peer mechanism change when firewall comes into play.
The service settings on both client side, signaling and media servers need to be checked for their compatibility with different firewall profiles:
- Check calls when blocking UDP (and later TCP) traffic
- Check when only one participant blocks UDP (and later TCP) traffic
- Check stress on TURN server by forcing TCP and running large scale sessions
5. Stress Testing
-
Find Max Users: Find the maximum number of
users you can fit into your service, a single
machine, a single data center
- Use the smallest session sizes that make sense. We are here to determine theoretical maximum capacity
- Check metrics (bitrates, packet loss and general stability) versus smaller number of total users
- Focus on transition points of scale out and load balancing to see their impact
-
Max Everything: Find the maximum number of
large sessions you can fit into your service
- Use the largest session sizes that make sense, then grow the number of concurrent sessions
- Check metrics (bitrates, packet loss and general stability) versus smaller number of users and sessions
- Focus on transition points of scale out and load balancing to see their impact
-
Max Popular: Find the maximum number of
popular sessions you can fit into your service
- Use the average / popular session sizes that make sense, then grow the number of concurrent sessions
- Check metrics (bitrates, packet loss and general stability) versus smaller number of users and sessions
- Focus on transition points of scale out and load balancing to see their impact
-
Max Mixed: Mix the session sizes to meet
the profile of your service
- Use different session sizes in a single run, to test scenarios closer to the real world
- Check metrics (bitrates, packet loss and general stability) versus smaller number of users and sessions
- Focus on service stability
-
Load Conditions: Load the system and see
what happens to new sessions that are added
- Get the system loaded o 75%-90% of its capacity (you already found that in steps #2-#5)
- Now add another session or two
- Check metrics, including call setup time
-
Concurrency: Have multiple users join
multiple sessions at the same time
- Check for any race conditions and deadlocks, blocking users from joining successfully
- Measure call setup time and success rate
-
Long Session: Run a long 1-2 hour session
- Measure your backend memory for any leaks or other forms of thrashing
- Join manually using your own device every once in awhile to monitor the progress manually
-
Improvisation: Change different conditions
to see how your system fairs
- Change network conditions (drop it 10 seconds), to see the effect it has on quality over time
- Use different video resolutions as inputs to see if they strain your service differently
- Work with different network configurations to validate your robustness
For more details, please also read these checklists:
6. Real world usage simulation using Dev Monitors
You can use upRTC monitoring service to complement your testing with these types of monitor configurations:
- 1 – Max Session Size and 1 Popular Session
Size Group sessions
- Call length 1 hour – Frequency every 1.5 hours
- 3 Popular Session Size group calls
- Call length 10 min – Frequency every 15 min
- These will have different networks like WiFi, DSL, 4G and 3G
- 1 Popular Session Size group call
- Call length 5 min – Frequency every 15 min
- Simulate Call Drop
- 1 Popular Session Size group call
- Call length 5 min – Frequency every 15 min
- Two users in Poor 4g or Poor 3G network for half of the call
- 4 two person call
- Call length 10 min – Frequency every 15 min
- Users in variety of network conditions
- 1 Popular Session Size group call
- Call length 5 min – Frequency every 15 min
- For two users Bandwidth shrinks – WiFi to 4G to 3G to 2.5 G