TCP/UDP Summarized
TCP or Transmission Control Protocol is a standard that describes how to establish and maintain a network conversation by which applications can communicate or exchange data. TCP works with Internet Protocol (IP) which determines how computers sends packets of data to each other
UDP or User Datagram Protocol on the other hand is a communication protocol used across the Internet for especially time-conscious transmissions such as video playback or DNS lookups. It speeds up communications by not formally establishing a connection before data is transferred.
OK, lets start with TCP. TCP is used extensively by many internet applications, including WWW, email, File transfer protocol, SSH and so many other applications, it guarantees the integrity of data sent over the network, regardless of the amount. For this reason, it is used to transmit data from other higher-level protocols that require all transmitted data to arrive. TCP is used in File transfer when we cannot tolerate the loss of data and receiving the data incorrect order is of utmost importance. TCP is used in applications where reliability is more important, such as file transfer, emails, and web browsing.
UDP in other words User Datagram Protocol is a communication protocol used across the Internet for especially time-sensitive transmissions such as video playback or DNS lookups. It speeds up communications by not formally establishing a connection before data is transferred. UDP is commonly used for applications that are “lossy” (can handle some packet loss), such as streaming audio and video. It is also used for query-response applications, such as DNS queries. Also, UDP is used in applications where speed is more important such as video conferencing, live streaming, and online gaming
What are the Difference Between TCP and UDP?
TCP is a connection-oriented protocol wereas UDP is a connectionless protocol. The key difference between these two protocols is SPEED as TCP comparatively slower than UDP. Overall, UDP is a much faster, simpler, and efficient protocol, however, retransmission of lost data packets is only possible with TCP.
TCP does Flow Control. TCP requires three packets to set up a socket connection, before any user data can be sent. TCP handles reliability and congestion control. UDP does not have an option for flow control
QUICK OVERVIEW
- TCP stands for “Transmission Control Protocol” while UDP stands for “User datagram Protocol”.
- TCP is the connection-oriented protocol while UDP is connectionless protocol.
- TCP is more reliable than UDP.
- TCP uses both error detection and error recovery. UDP works on a “best-effort” basis
- UDP is faster for data sending than TCP.
- UDP makes error checking but no reporting but TCP makes checks for errors and reporting.
- TCP gives a guarantee that the order of data at receiving end is the same as on sending end while UDP has no such guarantee.
- Header size of TCP is 20 bytes while that of UDP is 8 bytes.
- TCP is heavyweight as it needs three packets to set up a connection while UDP is lightweight.
- TCP has acknowledgement segments but UDP has no acknowledgement.
- TCP is used for an application that requires high reliability but less time-critical whereas UDP is used for an application that is time-sensitive but requires less reliability.
CHECK OUT THIS AMAZING TOPICS