Both protocols are transport layer protocols that provide information carriers for the application layer. TCP protocol is a reliable connection-based protocol, with flow control and error control, but also because of the reliability of the guarantee and control means, so the transmission efficiency is lower than UDP, UDP protocol is based on non-connected unreliable protocol, there is no control means, only the data sent to the other side, so the efficiency is higher than TCP. Based on the above features, it is not difficult to conclude that the TCP protocol is suitable for scenarios where the efficiency requirements are relatively low, but the accuracy requirements are relatively high, or there is a connection concept, whereas the UDP protocol is suitable for scenarios where the efficiency requirements are relatively high and the accuracy requirements are relatively low. Well, now go back to your question and cite a few examples of applications. TCP is generally used for file transfer (FTP HTTP high data accuracy requirements, speed can be relatively slow), send or receive mail (POP IMAP SMTP for data accuracy requirements, non-emergency applications), remote login (telnet SSH has certain requirements for data accuracy, there is a connection concept) and so on UDP is generally used for instant communication (QQ chat on the data accuracy and packet loss requirements are relatively low, but the speed must be fast), online video (RTSP speed should be fast, to ensure that video continuous, but occasionally spent an image frame, people are still acceptable), VoIP voice telephone (voicemail packet is generally relatively small, Requires high-speed transmission, occasional staccato or crosstalk is not a problem) and so on. As an extension of knowledge, you can say some other applications. For example, TCP can be used for network database, distributed high-precision computing system data transmission, UDP can be used to service the internal data transmission, because the data may be more, internal system LAN packet loss packet rate is very low, even if the packet loss, at most, the operation is invalid, in this case, UDP is often used.
Common scenarios for TCP and UDP