Back to the Catalog
networking
real-time
websockets

WebRTC Data Channels vs WebSockets: P2P, SCTP & Configurable Reliability

12 questions

When real-time delivery goes peer-to-peer: how WebRTC data channels differ from WebSockets — SCTP-over-DTLS-over-UDP transport, configurable reliability and ordering, signaling (often carried over a WebSocket), NAT traversal with STUN/TURN, and mandatory encryption. The reliability modes are verified in Node.

Questions

  1. Not answered. How does a WebRTC data channel's topology fundamentally differ from a WebSocket's?
  2. Not answered. WebRTC peers must first exchange SDP offers/answers and ICE candidates. What does the spec say about transporting this "signaling"?
  3. Not answered. WebRTC data channels carry application data over which message-oriented transport protocol (itself layered on DTLS/UDP)?
  4. Not answered. Which statements about RTCDataChannel reliability and ordering are correct?
  5. Not answered. A fast multiplayer game sends 60 position updates per second. Why might you choose an unreliable, unordered data channel?
  6. Not answered. Two browsers behind home routers want a direct peer-to-peer data channel. What do STUN and TURN each do?
  7. Not answered. WebRTC data channels are protected with DTLS. Is encryption optional or mandatory in WebRTC? (one word)
  8. Not answered. Like WebSocket, a data channel hands you whole messages, not a raw byte stream. Which SCTP property provides that?
  9. Not answered. You need server-authoritative real-time messaging — the server must validate and broadcast every message. WebSocket or WebRTC data channel, and why?
  10. Not answered. Which statements correctly contrast WebRTC data channels with WebSockets?
  11. Not answered. What is the correct protocol stack beneath a WebRTC data channel message?
  12. Not answered. What value of maxRetransmits configures a fully unreliable (fire-and-forget) data channel that never retransmits a lost message?