TCP: It stands for Transmission Control Protocol ,which is a data delivery protocol operate on transport layer of OSI model. It is the most reliable protocol to send our data because it implements 3 way handshake method. Due to this 3 way hand shake it ensure that our data get properly delivery without losing of data packet and maintaining the correct order.
UDP: It stands for User Datagram Protocol, this is also data delivery model operate on transport layer . It is less reliable than TCS model but it is very fast in transferring the data. unlike TCP here packet loss can occur, and it does not maintain correct order of packet always.
Key differences between TCP and UDP
TCP is connection oriented and UDP is connectionless TCP is highly reliable best fit for the critical task and on the other hand UDP is less reliable but it got super speed and speed is very important. TCP send all the data packet in correct order and UDP has no inheritance order. Press enter or click to view image in full size
When to use TCP
TCP is needed where we need data accuracy and reliability are the main priority, like: online banming
Press enter or click to view image in full size
When to use UDP
UDP use in where we speed is top priority Like: streaming services
Press enter or click to view image in full size
Common real-world examples of TCP vs UDP
we can say that TCP is Toyota ; powerful and reliable gets the job done at any cost. On the other hand UDP is like Range Rover ; flashy and sporty , it got the super speed but less reliable breaking down chance are high.
What is HTTP and where it fits and relation between TCP and HTTP
HTTP stands for hyper text transfer protocol, it's act as bridge between client and server. HTTP is just a standard how data will get transfer, but TCP is the connection between them . Think as TCP is like pipe line and density of liquid act as http and the liquid is the actual data.


