Registry Synced

Multimedia Networking โ€” VoIP, Streaming, CDN

471 words
2 min read

Reading compass

Now ยท ๐ŸŽฏ Learning Objectives

Multimedia Networking โ€” VoIP, Streaming, CDN

๐ŸŽฏ Learning Objectives

  • Explain SIP and RTP protocol operation
  • Describe video streaming and adaptive bitrate
  • Analyze CDN architecture and routing
  • Understand QoS requirements for multimedia

1. VoIP Protocols

1.1 SIP (Session Initiation Protocol)

(Diagram)

1.2 RTP (Real-time Transport Protocol)

  • Header: Version, sequence number, timestamp, SSRC
  • Runs over UDP (ports 16384-32767)
  • RTCP provides feedback (packet loss, jitter)

2. Video Streaming

2.1 Adaptive Bitrate (ABR)

Client switches between quality levels based on bandwidth.
QualityBitrateResolutionBuffer Time
4K25 Mbps3840ร—216010s buffer
1080p5 Mbps1920ร—108010s buffer
720p2.5 Mbps1280ร—72010s buffer
480p1 Mbps854ร—48010s buffer
Protocols: HLS (Apple), DASH (MPEG), Smooth Streaming (Microsoft)

3. CDN (Content Delivery Network)

Architecture:
  • Edge servers cache content near users
  • Origin server holds master content
  • DNS routes users to nearest edge (Diagram)

3.1 CDN Routing

  • DNS-based: User resolves name โ†’ CDN DNS โ†’ returns nearest edge IP
  • Anycast: Same IP advertised from multiple locations โ†’ BGP routes to nearest
  • HTTP redirect: Edge returns 302 to better edge

4. Common Pitfalls

Pitfall: Confusing SIP with RTP

The mistake: Thinking SIP carries media. Correct approach: SIP sets up and tears down sessions (control plane). RTP carries the actual audio/video data (data plane). They use different ports and protocols.

5. Key Concepts Reference

ProtocolPortFunction
SIP5060/5061 (TLS)Session setup/teardown
RTP16384-32767Media transport
RTCPRTP+1Quality feedback
HLS80/443Adaptive streaming
DASH80/443Adaptive streaming

6. ๐Ÿ“ Practice Questions

Q1: How does adaptive bitrate streaming prevent buffering?
Answer: The client monitors download speed and buffer occupancy. If buffer drops below threshold, client requests lower bitrate segment (e.g., 1080pโ†’720p). If bandwidth increases, client upgrades. This prevents buffer underrun at the cost of temporary quality reduction. YouTube uses this: you'll notice quality drops when network degrades. Q2: Why does RTP use UDP instead of TCP?
Answer: Real-time applications prefer timeliness over reliability. TCP retransmissions cause delay and head-of-line blocking โ€” a lost packet retransmitted 100ms later is useless for real-time audio. UDP accepts some packet loss (concealed by codecs) for lower latency. RTP runs over UDP; quality feedback is sent via RTCP. Q3: How does a CDN know which edge server is "nearest" to a user?
Answer: Multiple techniques: (1) DNS geolocation โ€” query resolver's IP to estimate user location. (2) Anycast โ€” BGP routing automatically chooses closest edge. (3) Latency probing โ€” measure RTT to possible edges. (4) Client IP subnet โ€” /24 or /32 granularity. Cloudflare uses anycast; Akamai uses DNS-based routing with detailed maps.

7. ๐Ÿ”— Cross-References

Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.