Generally, applications such as databases, web access and FTP that need reliability and transmit more data use TCP.
UDP provides non-connection service, which does not guarantee that data can be submitted to application training reliably, and there is no flow control mechanism. The header is 8 bytes.
DNS, SNMP and syslog, which have small data and low reliability requirements (the application itself has a mechanism to ensure reliability), all use UDP, and the advantage of UDP is high efficiency.