The difference between tcp and udp protocols.
TCP and UDP protocols support data transmission in different ways. Though, they both are found in the fourth layer in the transport layer, just above the IP layer in OSI model. The data transmission in TCP is connection oriented whereas connection less in UDP.
While the data packets are transported, the major technical constraints are faced- reliability and latency due to network delays. Reliability ensures that data indeed is delivered and no latency means timely delivery. A utopian network is dream of many, but can never be achieved yet only maximized and optimized to the point that there are less latency and reliability issues.
For data communication between two nodes, one should know the IP address and port number of the receiver. Sending data is very much like sending a courier to someone. IP address here denotes the route and port number is the address of the person. For instance, if you have to visit a shop 60 in a Golden Crown mall, No 21 Park Avenue, you need not only to know shop number 60 but also the 21 Park Avenue. Here, 21 Avenue is IP address and 60 is the port number.
Similarly, TCP applications cater to port numbers. In data communications, they accept TCP connections whereas to deliver UDP services, UDP applications serve port numbers. The stereotypical examples of TCP applications are FTP data (20), POP3 (110), FTP Control (21), SSH (222), Telnet (23), Mail (25), DNS (53), HTTP (80), SNMP (161) and HTTPS (443).
TCPs are very reliable to deliver data packets even in the peak hours and in times of congestion. It is a connection oriented and offers reliable and guaranteed data transmission. TCP has three-way handshake and features like error detection, slow start, congestion and flow control.
UDP or User Datagram Protocol is used where latency causes more problem than the issue of reliability. It delivers the data but there are no control mechanism to ensure reliability in congestion and packet loss while data transmission. This protocol is very simple and mostly used by real time application such as VoIP where data drop is preferable over data delays.