Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Common WebRTC mistakesand how to avoid them (RTC Expo 2019)

1,032 views

Published on

WebRTC as a VoIP technology is the best thing ever. It “democratizes” this whole domain, taking it from the hands of experts into the hands of the masses of developers out there. While this all seems easy now (and it is a lot easier than it used to be before WebRTC), there are a few mistakes that I see people make repeatedly. In this session, I will share these mistakes and how you can avoid them in your company.

Published in: Technology
  • Be the first to comment

Common WebRTC mistakesand how to avoid them (RTC Expo 2019)

  1. 1. Common WebRTC mistakes and how to avoid them Tsahi Levent-Levi
  2. 2. Tsahi Levent-Levi • Consultant and analyst in digital communications • Focus on WebRTC, CPaaS (and recently also ML/AI) • Co-founder and CEO of testRTC BlogGeek.me
  3. 3. In this session • A bit about WebRTC • A shopping list of common mistakes…
  4. 4. A bit about WebRTC
  5. 5. WebRTC offers real time communication natively from a web browser WebRTC is a media engine with JavaScript APIs
  6. 6. WebRTC is a Technology not a Solution
  7. 7. How are calls made in WebRTC? 1 2 3 4 5
  8. 8. The usual stuff
  9. 9. 15% (?) of sessions The usual stuff
  10. 10. 15% (?) of sessions The usual stuff Concurrency & scaling out
  11. 11. 15% (?) of sessions The usual stuff Concurrency & scaling out Throughput
  12. 12. At an intersection of worlds Our Internet Web Traditional VoIP
  13. 13. 1Mis-configuring NAT traversal
  14. 14. DON’T use STUN servers lists MORE IS LESS
  15. 15. DON’T use public STUN servers
  16. 16. DON’T use “public” TURN servers
  17. 17. [ "turn:<HOSTNAME>:<PORT>?transport=udp", // UDP "turn:<HOSTNAME>:<PORT>?transport=tcp // TCP ];
  18. 18. [ "turn:<HOSTNAME>:<PORT>?transport=udp", // UDP "turn:<HOSTNAME>:<PORT>?transport=tcp", // TCP "turns:<HOSTNAME>:<PORT>?transport=tcp" // TLS ];
  19. 19. [ "turn:<HOSTNAME>:443?transport=udp", // UDP "turn:<HOSTNAME>:443?transport=tcp", // TCP "turns:<HOSTNAME>:443?transport=tcp" // TLS ];
  20. 20. What else? • Globally deploy your TURN servers • Add ephemeral passwords for TURN sessions • Test that the configuration actually works • Monitor behavior over time
  21. 21. 2Selecting the WRONG signaling framework
  22. 22. No really good, popular github signaling project for WebRTC • Lots of projects, but no well maintained ones • Google’s AppRTC is usually unsuitable
  23. 23. peerjs https://peerjs.com/
  24. 24. EasyRTC http://easyrtc.com/
  25. 25. Muaz Khan WebRTC Experiment https://www.webrtc-experiment.com/
  26. 26. 3Testing locally
  27. 27. DON’T test locally 10.0.0.1 10.0.0.2
  28. 28. 80.246.130.243 DON’T test locally 10.0.0.1 10.0.0.1 176.231.82.46
  29. 29. Things to consider • Different regions around the globe • Network conditions • Firewall configurations • Operating systems and browser versions • …
  30. 30. 4Ignoring (or forgetting) security
  31. 31. WebRTC is secure • Media • Only on SRTP • Which is encrypted • Keys exchanged over DTLS • Signaling • Web apps forced to use HTTPS (or WSS)
  32. 32. You have a role to play in security • Application logic and signaling • TURN server access • Media server resources • Keeping up with WebRTC releases • …
  33. 33. 5Not collecting stats and traces
  34. 34. It isn’t always in your control • Access to network (landline, WiFi, cellular, …) • # of devices on local network (and what they are doing) • Automatic browser upgrades
  35. 35. People will still assume you are to blame
  36. 36. Be sure you can analyze issues • Log at the edge (from devices) • Collect whatever you can • Have the means to analyze it. Visually • Look at https://github.com/lifeonairteam/rtcstats
  37. 37. 6Thinking short term
  38. 38. New browser version Every 6-8weeks
  39. 39. WebRTC 1.0
  40. 40. WebRTC NV
  41. 41. Design Implement Maintain
  42. 42. 7Failing to understand WebRTC
  43. 43. webrtccourse.com 20% discount with coupon code RTCEXPO2019 until Oct 31

×