Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Performance Monitoring Options for WebRTC Deplo...

Avatar for Varun Singh Varun Singh
January 06, 2014

Performance Monitoring Options for WebRTC Deployments

Varun Singh, callstats.io
Presented remotely at WebRTC Meetup IsraelL www.meetup.com/WebRTC-IL/events/146894392/

Avatar for Varun Singh

Varun Singh

January 06, 2014
Tweet

More Decks by Varun Singh

Other Decks in Technology

Transcript

  1. 4

  2. Gameplan •  Do nothing à It is someone else’s problem

    – Insufficient Capacity – Misbehaving Browser – Or… NATs/Firewall – Other customer’s ISP 7
  3. Berlin-Helsinki 0 500 1000 1500 2000 2500 3000 0 50

    100 150 200 250 300 Delay Variation [ms] time [s] audio video 9
  4. …but on a bad day 0 500 1000 1500 2000

    2500 3000 3500 4000 0 50 100 150 200 250 300 350 400 450 500 Delay Variation [ms] time [s] … and this is just audio 10
  5. Gameplan •  Do Nothing •  Endpoint Monitoring –  Detect à

    Fix •  Middlebox Monitoring –  Detect à Notify à Fix •  Silver bullet? 12 Ephemeral Fixes
  6. Stats API •  Web app queries underlying RTP stack – 

    Per stream statistics (e.g., Audio and Video) –  In-bound and out-bound statistics •  Identifiers –  RTCP RR –  ICE candidates, … •  Query at application defined intervals –  Typically, 1s http://tools.ietf.org/html/draft-alvestrand-rtcweb-stats-registry http://tools.ietf.org/html/draft-singh-xrblock-webrtc-additional-stats 13
  7. StatsAPI: Example var statCollector = setInterval(function () { if (pc

    && pc.getRemoteStreams() && active == true) { if (pc.getStats) { pc.getStats(onStatsSuccess); } else { log('No stats function. Use Chrome >24.0.1285'); } } }, 1000); onStatsSuccess = function (stats) { // parse the stats.result() // Audio and Video stats // Local and Remote stats } http://dev.w3.org/2011/webrtc/editor/webrtc.html#example 14
  8. Middlebox •  TURN server, Conference Server, Gateway, Media Resource Function…

    •  Detecting WebRTC flows – observe 2 or more categories of packets – STUN messages – DTLS packets – RTP packets •  Audio frames (ptime between 10-30ms) •  Video packets (at least 7 frames per second) 15
  9. RTCP Monitoring •  Send metrics to a performance monitoring server

    •  Needs support in the WebRTC Stack – Implement RTCP Extension Reports http://tools.ietf.org/html/rfc6792 17
  10. Performance Monitoring •  Annoyances – Call setup time, call failures, NAT

    traversal •  Transport quality – Relayed or not – Session throughput, delay and loss •  Per-stream media quality – MoS, User feedback 18
  11. Silver Bullet? •  Correlate performance – Across sessions for the same

    user – Users in the same network location … à[Aggregate and Summarize]à …! 19
  12. 20

  13. PeerConnection Browser Internals (WebRTC Stack) WebRTC API APP Browser Internals

    (WebRTC Stack) WebRTC API APP •  TURN •  Gateway WebRTC Server Monitoring Architecture Monitoring Server HTTP or WebSockets RTCP XR Client Monitoring STATS API HTTP, IPFIX, or NetFlow 21
  14. JS SDK •  callstats.initializeSDK()! –  Authenticate with our backend • 

    callstats.AddNewFabric()! –  For each peer-connection, setup monitoring •  callstats.sendFabricEvent()! –  fabricSetup à start monitoring –  fabricFailed! –  fabricTerminated à stop monitoring –  … 22
  15. 23 Gather Report Analyze FIX Deploy? webrtc-internal? via email? Has

    this been reported before? Did it solve the issue? Until next report? Integrate Deploy Diagnose FIX
  16. 24

  17. Additional Features •  Coupling getUserMedia() constraints and StatsAPI •  better

    initial application settings – reorder optional and mandatory constraints. 25
  18. Call to Action •  Signup today at: – Twitter: @vr000m, @callstatsio

    – Facebook: www.facebook.com/callstats.io 27