Networking & ProtocolsStreaming Protocols (HLS, DASH, RTMP)Medium⏱️ ~3 min

How Do You Choose the Right Streaming Protocol for Your Use Case?

Broadcast at Scale (10-30 Second Latency)

For public live streams reaching millions of viewers across all device types with acceptable latency, the default architecture is RTMP ingest with HLS/DASH delivery over CDN. This maximizes cache efficiency (95%+ hit rates), minimizes cost per viewer, and provides universal device coverage. HLS is mandatory for Apple devices (iOS, tvOS, Safari), while DASH provides an open standard with wide support on Android, smart TVs, and browsers via MSE (Media Source Extensions, a JavaScript API enabling media playback from JavaScript). Using CMAF fMP4 packaging allows single storage to serve both protocols. This is the right choice for sports broadcasts, concerts, news, and any content where 10-30 second latency is acceptable.

Interactive Streams (2-5 Second Latency)

For interactive streams where viewers need to react in near real-time (live auctions, gaming with chat, Q&A sessions), 2-5 second latency is required. LL-HLS and LL-DASH using partial chunks (200-500ms) with HTTP chunked transfer maintain CDN compatibility while reducing latency by an order of magnitude. The trade-off is higher infrastructure load: more requests per viewer (8x or more), reduced cache efficiency (60-80% vs 95%+), and the need to validate that the entire delivery path supports chunked delivery without buffering. Every proxy, load balancer, and CDN node must be configured to pass through chunks immediately rather than buffering complete responses.

Real-Time Interaction (Sub-Second Latency)

For sub-second latency where every millisecond matters (video conferencing, real-time collaboration, live auctions with millisecond bidding), WebRTC is the only viable choice. WebRTC uses UDP-based RTP for 100-500ms latency but eliminates CDN caching entirely, requiring direct viewer connections to media servers. This limits scale to hundreds or low thousands of participants per server and dramatically increases infrastructure costs. Each additional viewer requires proportional server capacity, unlike HLS/DASH where CDN absorbs scale. Use WebRTC only when sub-second latency is mandatory and the audience size justifies the infrastructure investment.

Ingest Protocol Selection

For contribution (broadcaster to ingest point), RTMP remains dominant due to universal encoder support. However, SRT (Secure Reliable Transport) and RIST (Reliable Internet Stream Transport) are increasingly preferred for long-haul or unreliable networks because they use UDP with ARQ (Automatic Repeat Request, retransmitting lost packets) for superior loss recovery compared to TCP, which suffers from head-of-line blocking when packets are lost. A resilient production setup uses dual-path ingest (e.g., primary RTMP plus backup SRT to different PoPs) with automatic failover on packet loss or latency threshold violations, ensuring critical events continue even if one path fails.

Key Trade-off: Latency, scale, and cost form a triangle. Traditional HLS/DASH optimizes for scale and cost. LL-HLS/LL-DASH trades some cost efficiency for lower latency. WebRTC optimizes purely for latency at the expense of scale and cost. Choose based on your primary constraint.
💡 Key Takeaways
Broadcast at scale: RTMP ingest + HLS/DASH delivery, 10-30s latency, 95%+ cache hit rates, universal device coverage
Interactive streams: LL-HLS/LL-DASH with 200-500ms chunks, 2-5s latency, 8x request rate, 60-80% cache efficiency
Real-time: WebRTC with UDP-based RTP, sub-second latency, no CDN caching, limited to hundreds/thousands per server
Ingest: RTMP for universal support; SRT/RIST for unreliable networks; dual-path ingest for critical events
📌 Interview Tips
1Present decision framework: broadcast (HLS/DASH), interactive (LL-HLS), real-time (WebRTC) based on latency needs
2Explain that LL-HLS requires validating entire path (proxies, CDN) supports chunked transfer without buffering
3Mention dual-path ingest (RTMP + SRT to different PoPs) with automatic failover for critical events
← Back to Streaming Protocols (HLS, DASH, RTMP) Overview