TCP vs UDP


TCP

It is a connection-oriented protocol. It provides reliable, ordered, and error-checked delivery of a packet

Features

  1. Ordered data transfer:

    the destination host rearranges according to sequence number

  2. Retransmission of lost packets

    If the sender does not receive an ACK in a period of time, it transmits that packet again

  3. Error-free data transfer

    Use checksum to verify the segment is correct

  4. Flow control

    Situation: Faster Sender may block the slow receiver Limits the rate a sender transfers data to guarantee reliable delivery. The receiver continually hints the sender on how much data can be received controlled by the sliding window.

  5. Congestion control

    Situation: Faster sender may block the network Congestion Level:

    1. Received an ACK
    2. Received the same ACK three times
    3. Data lose

TCP vs UDP

TCP UDP
Connection Connection-Oriented Protocol Connectionless Protocol
Speed of transfer Slow Fast (because error recovery is not attempted)
Reliability Retransmission and Ordered Data Transfer No Guarantee
Error Checking Error Checking and Retransmission Only Error Checking
Usage High Reliability; Transmission Time is Less Critical Fast, Efficient Transmission; Data Loss is Tolerable

Reference

http://www.diffen.com/difference/TCP_vs_UDP

results matching ""

    No results matching ""