# Comparing TCP & UDP

TCP provides more features than UDP, but at the cost of additional **overhead**.

For applications that require reliable communications (for example downloading a file), TCP is preferred.

For applications like real-time voice and video, UDP is preferred.

There are some applications that use UDP, but provide reliability etc within the application itself.

Some applications use both TCP & UDP, depending on the situation.

| TCP                                  | UDP                            |
| ------------------------------------ | ------------------------------ |
| Connection-oriented                  | Connectionless                 |
| Reliable                             | Unreliable                     |
| Sequencing                           | No sequencing                  |
| Flow control                         | No flow control                |
| Use for downloads, file sharing, etc | Used for VoIP, live video, etc |
