Compare the difference between TCP and UDP

Source: Internet
Author: User
Tags file transfer protocol
TCP (Transmission Control Protocol):

1) to provide reliable transmission of data in the IP environment (a computer sends a stream of bytes will be sent to other computers on the network without error, and when computer A receives packets, it will also send back packets to Computer B, which will also generate some traffic), effective flow control, full-duplex operation (data in two directions can be transmitted simultaneously) , multiplexing services, is the connection-oriented, end-to-end transmission;

2) connection-oriented: must establish a connection with the other party before formal communication. In advance for the data sent to open up a connected channel, and then send data, like a phone call.

3) TCP Supported Application protocol: Telnet (telnet), FTP (File Transfer Protocol), SMTP (Simple Mail Transfer Protocol). TCP is used for applications that transmit large amounts of data and require high reliability.

UDP (Subscriber datagram Protocol, user data Protocol)

1) for non-connected (formal communication does not have to establish a connection with the other party, regardless of the status of the other party directly sent, such as SMS, QQ), can not provide reliability, flow control, error recovery function. UDP is used to transmit only a small amount of data at a time, low reliability, transmission economy and other applications.

2) UDP supported Application protocol: NFS (Network File system), SNMP (Simple Network Management System), DNS (primary Domain Name System), TFTP (Universal File Transfer Protocol), etc.

Summarize:

TCP: For connection-oriented, reliable transmission (guaranteed data correctness, guaranteed data order), for transmitting large amounts of data (stream mode), slow, to establish a connection requires more overhead (time, system resources).

UDP: For non-connected, unreliable transmission, for transmitting small amounts of data (packet mode), fast.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.