What is the difference between TCP and UDP?

Source: Internet
Author: User

TCP (Transmission Control Protocol):

1 provide reliable data transmission under the IP environment (the byte stream emitted by a computer will be sent to other computers on the network without error, and when computer A receives the packet, it also sends back the packet to Computer B, which also produces some traffic, effective flow control, full duplex operation (data can be passed in two directions simultaneously) , multiplexing services, are oriented to connect, end-to-end transmission;

2) connection-oriented: must establish a connection with the other before formal communication. Make a connection to the data sent beforehand, and then send the data, like a phone call.

3 Application protocol for TCP support: Telnet (remote login), FTP (File Transfer Protocol), SMTP (Simple Mail Transfer Protocol). TCP is used to transmit large amount of data and high reliability requirements.

UDP (Subscriber datagram Protocol, user data Protocol)

1) for the connectionless (formal communication does not need to establish a connection with the other party, regardless of the other state on the direct transmission, 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 requirements, transmission economy and other applications.

2 The application protocol supported by UDP: NFS (Network File system), SNMP (Simple Network Management System), DNS (primary Domain Name System), TFTP (Universal File Transfer Protocol) and so on.

Summarize:

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

UDP: Non-connectivity, unreliable transmission, for transfer of small amounts of data (packet mode), speed.

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.