Understand your needs
Improve our services
Deliver personalised content
Save your preferences
Analyse visitor interactions
Your consent is voluntary – you can always change you cookie settings here.
Whether your data is transferred quickly and in full depends on which network protocols you use, UDP or TCP. They both do the same job but in different ways. One is more reliable and the other one is faster. Find out which one you need below.
Mar 12, 2022 · 4 min read
TCP (Transmission Control Protocol) is a network protocol that transfers your data over the internet from your device to a web server. You use the TCP protocol whenever you chat to your friends on Skype, send emails, watch online videos, or simply browse the web.
TCP is connection-based, so it establishes a connection between the receiver and sender and maintains it while transferring data. It guarantees that the data arrives completely intact. Because of its reliability, TCP is the most popular network protocol.
UDP (User Datagram Protocol) is another widely used network protocol. It is less reliable, but faster and more straightforward. It’s often used in situations where higher speeds are crucial, like in streaming or gaming.
UDP is connectionless, so it doesn’t establish a prior connection between two parties. So, some data might be lost along the way, but in return you’ll have much higher speeds.
TCP is more reliable than UDP. It transfers your data packets from your device to a web server. UDP is faster and simpler, but it doesn’t guarantee the delivery of packets.
Here’s what it does to send your data:
Because the data is sent in sequence, it helps with data congestion and flow control, and makes it easier to spot and fix any errors. This also means that data sent over TCP is more likely to reach its destination in full. However, it has a downside. There’s a lot of back and forth communication between the two parties so it takes longer to establish a connection and exchange data.
UDP completes the same job without the need of unique identifiers or sequence numbers. It sends data in a stream and only has a checksum to ensure that the data arrived uncorrupted. UDP has almost no error correction, nor does it care about lost packets. It’s more error prone, but it sends data much faster than TCP.
Is UDP secure? It’s almost impossible to set up a firewall allowing only some UDP communications and blocking the rest. However, while it is much easier to secure TCP, UDP connections are not left entirely unprotected. Users can employ proxies for particular applications or establish a tunnel connection between the remote user and the company’s inside network.
UDP is faster than TCP, because the user doesn't have to allow or acknowledge receipt of the data to be resent. This lets UDP establish connections faster and transfer data faster. However, this also causes some concerns over how safe UDP actually is. In terms of the UDP vs TCP VPN debate, OpenVPN works best on a UDP port, although it can be configured to run on any port.
Here’s how they compare side by side:
|Transfer method||Packets are delivered in a sequence||Packets are delivered in a stream|
|Error detection and correction||Yes||No|
|Acknowledgement||Yes||Only the checksum|
Both UDP and TCP divide your data into smaller units called data packets. These include the sender’s and receiver’s IPs, various configurations, the actual data you are sending, and the trailer — the data that indicates the end of the packet.
So, which is better — UDP or TCP? Like in all such cases, it all depends on what you use them for. If you need a fast and constant data transmission for an application to work properly, you will have to use UDP. Otherwise, TCP is a stable and reliable protocol for transferring data and not losing any of it along the way.
UDP is faster than TCP but is also more error-prone. The reason is that UDP doesn’t use such an acute checking of packets as TCP and employs a more continuous data flow. TCP sends its data in sequence, so it uses more flow control. It makes the connection safer and smoother but reduces speed due to a lot of back-and-forth communication between the sender and receiver.
Are the UDP and TCP protocols compatible with VPN services? Yes. They both work with OpenVPN, an open-source VPN protocol used by many leading VPN providers, including NordVPN. OpenVPN runs on both network protocols and they both provide privacy and security. Which one to choose depends on what you’re using your VPN for. TCP is more reliable, so you may think that TCP is the best option, but there are times when UDP might be preferred.
UDP is a great option if you are gaming, streaming or using VoIP services. It may lose a packet or two but it won’t have a huge impact on your overall connection. Using TCP for such services might cause lag (especially if you’re connected to servers on the other side of the world), which can completely ruin your experience. Therefore, OpenVPN via TCP is recommended for static uses such as emailing, web browsing and file transfer.
NordVPN wants to provide the best browsing experience without compromising on speed, so we use the UDP protocol by default. We recommend trying the UDP protocol first and only switching to TCP if you experience any issues.
To change UDP to TCP on NordVPN (for Windows users):
To change UDP to TCP on NordVPN (for MacOS users):
If your speed has dropped, you can also try a few tricks to boost your VPN speed.
Want to read more like this?
Get the latest news and tips from NordVPN.