UDP vs TCP

UDP - User Datagram Protocol - Data পাঠাইতেই থাকবে গেলো কিনা গেলো চেক করবে না, এজন্য এটা ফাস্ট। বেটার ফর স্ট্রিমিং, গেমিং. Use Datagram(ডাটাগ্রাম হচ্ছে সেগমেন্টেরই মতো, জাস্ট it is the term used for UDP)

TCP - Transmission Control Protocol → Data ঠিকমতো গেলো নাকি চেক করবে, corrupt হইছে কিনা বা সিকুয়েন্স ঠিক আছে কিনা সবকিছু চেক করবে। এজন্য এটা স্লো। বেটার ফর ইমেইল, ব্রাউজিং। Use segments.

Network layer vs Transport Layer -

Network layer → Logical communication between hosts → manage the routing of data packets from the source to the destination across multiple networks. Fragmentation.

Transport Layer → logical communication between processes. →provide end-to-end communication services for applications, ensuring complete data transfer. Segmentation.

For more : network layes VS transportation layers

Function of transport layer →

Screenshot_20240709-125501~2.png

5,6,7 only available in TCP

Features of UDP -

  1. Doesn't need to establish or terminate connection
  2. Small header size (8 bytes), TCP has (20 to 60 bytes)
  3. Does not provide any acknowledgement.
  4. No flow control and error correction
  5. It is unreliable as it does not do any error correction. So data can go missing, duplicated, out of order and not arrive at all.
  6. It supports broadcast(sending data to all the device of a network) and multicast ( sending data to multiple specific device)