- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Why does Youtube use TCP not UDP?
In the video on demand platform, YouTube is a popular one in the market. In such a demanding market to increase the audience a focus area should be a better experience and optimum video quality. This quality of the video depends on the streaming protocol it takes.
Video streaming like YouTube prefers both TCP and UDP as per the goals and requirements. A TCP-based protocol known as Real-time Messaging Protocol (RTMP) is responsible for streaming video and audio content which provide low latency. The RTMP was developed by Macromedia. RTMP with a secure extension over a Transport layer security and provide encryption.
TCP Streaming protocol and UDP Streaming protocol
TCP Streaming Protocol
The TCP or Transmission control protocol is a protocol without any boundaries and connection is implemented before data transmission between client and server.
A three-way handshake is used for error detection and error recovery. Also, TCP is reliable and with network congestion avoidance. The large packet of data is into smaller packets with order and transfer the data with integrity during the transmission.
The TCP protocol is connection-oriented i.e here first connection is established and IP packets with data segments send to the receiver.
The retransmission of data and checksum error checking this technique is called ‘TCP streaming protocol’. If the transmission fails in the positive acknowledgment technique, then the duplicate data packet is again transmitted. The mass web is available by dealing with the overhead of IP in TCP. The IP header with degenerating minimum information in an arranged way to deliver error-free.
UDP Streaming Protocol
The UDP or User Datagram Protocol is real-time communication without any verification of data. This protocol does not ensure delivery and security. The overhead is reduced by UDP and this service may be sufficient in many cases.
The UDP encapsulates the data into packets and gives its header information to packets. The acknowledgment of packets that are received is not informed to the sender so it is unreliable.
As UDP transfers the data as a datagram that is not numbered so delivery cannot be guaranteed.
Drawback of UDP
The delivery service is not reliable
Messages can be copied, lost, or not in order.
No acknowledgment or flow control in the communication.
Eg: Streaming media.
As UDP is not ideal for real-time streaming videos on a platform like youtube. Because UDP favors data streaming but with packet loss.
UDP is not suitable as it fails in retransmission resulting in delay hence in online games, Voice over IP, or video streaming UDP is not used. But UDP is used in video conferencing, live streaming, etc. Some services or applications just require a protocol to the top of UDP making it efficient. For instance, RTP with UDP etc.
Why does Youtube use TCP not UDP
Youtube uses TCP due to its reliability, time sensitivity, secure transfer, etc. The TCP ensures the data is intact and the packet sent is received. TCP uses a handshake to detect any issues in the IP packets, load balancing issues, or network congestion in an unreliable network. To send all the packets or frames then TCP is used. Here delay is not an issue and in HTTP or web browsers TCP transfer easily without any additional software or plugins.
The TCP prioritizes the order of the data and takes care of the quality of video streaming. If the TCP detects any issues in the IP packet such as packet loss, copy, or sequence not in order then retransmission occurs of the missing data, out-of-order data are corrected and minimize load balancing.
The issues related to organization blockage. Buffering is reduced and end-to-end byte streaming in real-time is resolved. The TCP ensures optimal video quality while streaming and it is made easy by monitoring the bandwidth of end-to-end communication. The multiple connections at a single time redirect traffic attempting an online clog control. If due to loss of information parcels during retransmission or malware issue arises then TCP gives issue recognizable proof and mistake recuperation. The user stops, changes, or plays the video of their choice TCP handles it without any hassle or conflicts. Additionally, end-to-end encryption is utilized to maintain the copyright of the films and shows. The important aspect of TCP is information security with guaranteed alternatives.
In YouTube, TCP is the winner. But UDP lags in taking assurance of some data packets which is lost during the transmission or out of order. This results in a glitch in the video live streaming. Also waiting for message retransmission results long delay interrupting the user experience.
The TCP protocol is better for streaming videos as it continuously communicates with each other to ensure all data packets are received in order. Also, the error is checked and recovery is done on time if required. For transmission in an unreliable network, the TCP streaming protocol is a better choice than the UDP streaming protocol. In a TCP connection, HTTP communication occurs. Here since the time delay, is not an issue in the handling of packets the TCP easily transfers to HTTP and web browsers to reduce buffer time.
Kickstart Your Career
Get certified by completing the courseGet Started