The most important difference between TCP and UDP in networking.
||TCP stands for Transmission control protocol
||UDP stands for User datagram protocol
||TCP is connection oriented protocol means before sending data, there is connection establishment happens between two clients
||UDP is connectionless protocol means there is no connection establishment before sending data between two clients
||TCP provides reliable communication
||UDP provides unreliable communiation
||TCP gives gaurantee of transmission of data
||UDP does not give gaurantee of transmission of data.
||TCP header size is 20 bytes
||UDP header size is 8 bytes
||In TCP there is concept of acknowledgment
||In UDP there is no concept of acknowledgment
||TCP has concern of jitter. Means if any packet lost then TCP does not provide subsequent data to the application while it is requesting re-sending of the missing data
||UDP does not have concern of jitter because there is retransmission of missing data.
||TCP is slower as compared to UDP because retransmission of lost packets can take long delay.
||UDP is faster as compared to TCP because there is no retransmission of lost packets