When sending data over the Internet, we want to be sure that data has arrived safely and is delivered in a reliable manner. Assuming that our hardware and operating systems do the job well, we can use transport protocol on the application level to achieve that goal. In the OSI model the two most popular transport protocols are TCP and UDP.
For most people today, reliability is critical and TCP is a natural choice for most applications where data is important; for example, everything from web page, to mail, to SSH are TCP -based protocols.
TCP can perform well but there are still overheads such as creating and keeping a connection (the state); making sure that data integrity is saved; making sure that data is sent in a reliable way by resending packages if needed; making sure that packets are delivered in correct order and also not duplicated; the list goes on…More