What is difference between TCP and UDP and what is used in youtube?


The difference between TCP and UDP

TCP is a connection-oriented protocol, whereas UDP is a connectionless protocol.
The speed of TCP is slow while the speed of UDP is fast.
TCP uses handshake protocols like SYN, SYN-ACK, ACK while UDP does not use handshake protocols.
TCP performs error checking and error recovery also, whereas UDP performs error checking, but it discards the wrong packet.

What is used in youtube

Youtube uses TCP to control messages rather than UDP. If we use UDP than we might get better performance than TCP but UDP will lose many chunks of the packet while streaming due to the lossy nature of Internet communications.
Amazon Prime and Netflix use TCP as the transport layer protocol.
YouTube on the other hand use both UDP and TCP protocols.

What is TCP

TCP (Transmission Control Protocol) a communications standard that enables application programs and computing devices to exchange messages over the network. It has been designed to send packets across the internet and ensure the successful delivery of data and messages over networks.

What is UDP

UDP (User Datagram Protocol ) is a protocol used for communication throughout the internet. It is specifically selected for time-sensitive applications like gaming, playing videos or Domain Name System (DNS) lookups.

👈       👉