On the TCP vs UDP.
Netflix uses TCP—not UDP—for video streaming because TCP provides reliable, ordered, and error-checked delivery, which aligns with Netflix’s strategy of pre-buffering and adaptive bitrate streaming.
🔍 Why Netflix Chooses TCP Over UDP
While UDP is faster and often used for real-time applications like gaming or video conferencing, Netflix’s streaming model prioritizes reliability and quality over low latency. Here’s why TCP is a better fit:
✅ Reliability and Error Correction
• TCP guarantees delivery of all data packets in the correct order.
• If a packet is lost or corrupted, TCP retransmits it automatically.
• This ensures high video quality and prevents glitches or missing frames.
📦 Pre-buffering and Adaptive Streaming
• Netflix pre-buffers content, meaning it downloads chunks ahead of playback.
• TCP’s congestion control and flow management help optimize bandwidth and adjust video quality based on network conditions.
• This reduces buffering and ensures a smoother experience, even on fluctuating connections.
🔐 Security and Monitoring
• TCP supports HTTPS, which Netflix uses to encrypt and secure video streams.
• It also allows Netflix to monitor bandwidth and adapt streaming rates dynamically.
🚫 Why Not UDP?
• UDP is connectionless and doesn’t guarantee delivery or order.
On AppleTV:
📦 TCP – for Reliable Streaming
Apple TV uses TCP for most of its core streaming and communication functions:
• Port 80 (HTTP) and 443 (HTTPS): For secure streaming from Apple TV+, iTunes, and other services.
• Port 3689 (TCP): For iTunes Library Sharing.
• Port 123 (TCP): For time synchronization with Apple’s time servers.
• Port 7000 (TCP): For AirPlay streaming data (especially screen mirroring).
• Ports 5000–5001 (TCP): AirPlay control channels.
TCP ensures reliable, ordered delivery of video and metadata, which is critical for high-quality streaming and DRM-protected content.
📡 UDP (User Datagram Protocol) – for Discovery and Low-Latency Tasks
Apple TV also uses UDP for tasks that benefit from speed over reliability:
• Port 5353 (UDP): For Bonjour/mDNS service discovery (e.g., finding AirPlay devices).
• Port 123 (UDP): For NTP (Network Time Protocol) sync.
• Port 554 (UDP/TCP): For RTSP (Real-Time Streaming Protocol), used in some AirPlay scenarios.
Like I said, most technical people believe UDP is what is being used by netflix and apple, but it’s actually TCP.

