{"id":1438,"date":"2020-12-08T17:09:01","date_gmt":"2020-12-08T17:09:01","guid":{"rendered":"https:\/\/sectigostore.com\/blog\/?p=1438"},"modified":"2020-12-10T11:36:02","modified_gmt":"2020-12-10T11:36:02","slug":"tcp-vs-udp-whats-the-difference","status":"publish","type":"post","link":"https:\/\/sectigostore.com\/blog\/tcp-vs-udp-whats-the-difference\/","title":{"rendered":"TCP vs UDP \u2014 What\u2019s the Difference Between Them?"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"tcp-and-udp-are-both-ways-that-you-transmit-data-across-networks-\u2014-but-as-much-as-they\u2019re-the-same-they\u2019re-also-different-here\u2019s-what-to-know-about-these-different-internet-protocols-and-how-they-work\u2026\">TCP and UDP are both ways that you transmit data across networks \u2014 but as much as they\u2019re the same, they\u2019re also different. Here\u2019s what to know about these different internet protocols and how they work\u2026.<\/h2>\n\n\n\n<p>TCP vs UDP \u2014 what is the difference between TCP and UDP?<\/p>\n\n\n\n<p>When it comes to understanding <strong>TCP vs UDP<\/strong> \u2014 or what&#8217;s known as the <strong>transmission control protocol<\/strong> and the<strong> user datagram protocol<\/strong> \u2014 there\u2019s quite a bit to know. In the most basic sense, it comes down to understanding that they\u2019re variations of the same thing and that they operate in different ways.<\/p>\n\n\n\n<p>In a nutshell, they&#8217;re similar (yet different) internet protocols that transfer data. More specifically, <strong>TCP and UDP are both communication protocols.<\/strong> But there\u2019s more to them than just that. To help you better understand, we\u2019ll cover what TCP and UDP are individually \u2014 their similarities, their individual purposes, and how they work. After that, we\u2019ll highlight the difference between TCP and UDP in a handy table.<\/p>\n\n\n\n<p>But first, let\u2019s better get a handle on what an internet protocol is to set the foundation for the topic.<\/p>\n\n\n\n<div class=\"wp-block-advanced-gutenberg-blocks-summary\"><p class=\"wp-block-advanced-gutenberg-blocks-summary__title\">Table of contents<\/p><div class=\"wp-block-advanced-gutenberg-blocks-summary__fold\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-chevron-up\"><polyline points=\"18 15 12 9 6 15\"><\/polyline><\/svg><\/div><ol role=\"directory\" class=\"wp-block-advanced-gutenberg-blocks-summary__list\"><li><a href=\"#tcp-and-udp-are-both-ways-that-you-transmit-data-across-networks-\u2014-but-as-much-as-they\u2019re-the-same-they\u2019re-also-different-here\u2019s-what-to-know-about-these-different-internet-protocols-and-how-they-work\u2026\">TCP and UDP are both ways that you transmit data across networks \u2014 but as much as they\u2019re the same, they\u2019re also different. Here\u2019s what to know about these different internet protocols and how they work\u2026.<\/a><ol><\/ol><\/li><li><a href=\"#what-is-the-internet-protocol\">What Is the Internet Protocol?<\/a><ol><li><a href=\"#ip-tcp-and-udp-are-all-protocols-within-the-layers-of-the-osi-model\">IP, TCP, and UDP Are All Protocols Within the Layers of the OSI Model<\/a><ol><\/ol><\/li><li><a href=\"#how-the-ip-works-to-transfer-data\">How the IP Works to Transfer Data<\/a><ol><\/ol><\/li><li><a href=\"#the-internet-protocol-is-the-delivery-service-of-the-internet\">The Internet Protocol is the Delivery Service of the Internet<\/a><ol><\/ol><\/li><\/ol><\/li><li><a href=\"#tcp-vs-udp-everything-you-need-to-know-about-these-protocols\">TCP vs UDP: Everything You Need to Know About These Protocols<\/a><ol><li><a href=\"#what-is-tcp\">What Is TCP?<\/a><ol><li><a href=\"#how-tcp-works-in-exchanging-data\">How TCP Works in Exchanging Data<\/a><ol><\/ol><\/li><\/ol><\/li><li><a href=\"#what-is-udp\">What Is UDP?<\/a><ol><li><a href=\"#how-udp-works-in-exchanging-data\">How UDP Works in Exchanging Data<\/a><ol><\/ol><\/li><\/ol><\/li><li><a href=\"#a-summary-of-the-differences-between-tcp-and-udp\">A Summary of the Differences Between TCP and UDP<\/a><ol><li><a href=\"#tcp-vs-udp-differences-in-terms-of-data-delivery-an-example\">TCP vs UDP: Differences in Terms of Data Delivery (an Example)<\/a><ol><\/ol><\/li><\/ol><\/li><li><a href=\"#tcp-vs-udp-applications-when-is-one-method-better-than-the-other\">TCP vs UDP Applications: When Is One Method Better Than the Other?<\/a><ol><\/ol><\/li><\/ol><\/li><li><a href=\"#td;dr-\u2014-the-key-differences-between-tcp-vs-udp\">TD;DR \u2014 The Key Differences Between TCP vs UDP<\/a><ol><\/ol><\/li><\/ol><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-the-internet-protocol\">What Is the Internet Protocol?<\/h2>\n\n\n\n<p>The internet protocol (IP), a type of network protocol, is a set of rules that dictate how data sends or transmits to an intended recipient via the local network, across subnets or even the Internet. So, for example, whenever you send data from your web browser to a website \u2014 like when you order dog treats in bulk from your favorite pet supply website \u2014 you do so via the internet protocol.<\/p>\n\n\n\n<p>In a roundabout way, internet protocol data transmissions allow you to do everything you do online \u2014 from tweeting on social media and researching recipes to sending emails with images or your favorite cat videos. Essentially, it\u2019s the foundation of the internet.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ip-tcp-and-udp-are-all-protocols-within-the-layers-of-the-osi-model\">IP, TCP, and UDP Are All Protocols Within the Layers of the OSI Model<\/h3>\n\n\n\n<p>I mentioned that IP is a network protocol. The network is just one of seven layers of the ISO\u2019s <a href=\"https:\/\/www.iso.org\/ics\/35.100\/x\/\" target=\"_blank\" rel=\"noreferrer noopener\">open systems interconnection (OSI) model<\/a>. The model serves as the vertical framework and standards that guide how information exchanges among computing systems. The seven layers of the OSI model are:<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Physical layer<\/li><li>Data link layer<\/li><li>Network layer<\/li><li>Transport layer<\/li><li>Session layer<\/li><li>Presentation layer<\/li><li>Application layer<\/li><\/ol>\n\n\n\n<p>Typically, this is visualized vertically in descending order with the physical layer being the lowest layer. As such, it traditionally looks something like this:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"503\" height=\"489\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/09\/osi-model-7-layers.png\" alt=\"A graphic that breaks down the 7 layers of the OSI model\" class=\"wp-image-1440 addshadow\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/09\/osi-model-7-layers.png 503w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/09\/osi-model-7-layers-300x292.png 300w\" sizes=\"auto, (max-width: 503px) 100vw, 503px\" \/><figcaption>An illustration that outlines the 7 layers of the ISO&#8217;s open systems interconnection model.<\/figcaption><\/figure><\/div>\n\n\n\n<p>TCP and UDP, on the other hand, are two of the protocols that fall within the transport layer of the OSI model. Now, there are actually a variety of protocols out there that fall within the seven layers and serve different functions \u2014 and many are built upon one another. We\u2019re not going to get into all of those today since the purpose of this article is to help you understand TCP vs UDP.<\/p>\n\n\n\n<p>Before we can get into the nitty-gritty of discussing the difference between TCP and UDP, you first need to understand how the internet protocol works. I say this because TCP and UDP both rely on IP. This will serve as a foundation for helping to explain the other two concepts.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"how-the-ip-works-to-transfer-data\">How the IP Works to Transfer Data<\/h3>\n\n\n\n<p>Regardless of what you\u2019re sending, the data travels back and forth across the internet through a process known as <strong>routing<\/strong>. As you can probably guess, this process involves the use of routers or gateways to regulate traffic. According to a <a href=\"https:\/\/www.techrepublic.com\/article\/understanding-the-differences-between-gateways-and-routers\/\" target=\"_blank\" rel=\"noreferrer noopener\">TechRepublic article<\/a> by network engineer and tech writer Brien Posey, routers are typically for similar networks, whereas gateways help to bridge dissimilar networks. &nbsp;<\/p>\n\n\n\n<p>Now, to ensure that the data reaches the intended recipient, every individual device has its own assigned <strong>IP address<\/strong> \u2014 much like you have a specific address for your house or apartment. But instead of 123 Main Street, your IP address on the internet might look something like 250.250.250.250 (if you\u2019re using a standard IPv4 address). This 32-bit number consists of a series of <a href=\"https:\/\/www.thesslstore.com\/blog\/subnetting-and-masks\/\" target=\"_blank\" rel=\"noreferrer noopener\">subnets<\/a> (segments of numbers that are divided by periods) \u2014 each of which contains up to three digits (for up to a total of 12 digits or 15 characters, including the periods).<\/p>\n\n\n\n<p>Of course, this looks different for IPv6 IP addresses, which are 128-bit numbers and look akin to this: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 (this is an example IPv6 address from <a href=\"https:\/\/en.wikipedia.org\/wiki\/IPv6_address\" target=\"_blank\" rel=\"noreferrer noopener\">Wikipedia<\/a>). &nbsp;<\/p>\n\n\n\n<p>Before transferring your data, the IP breaks it down into smaller PDUs \u2014 these are known as <strong>packets<\/strong> (for TCP) or <strong>datagrams<\/strong> (for UDP). Packets is the most commonly used term for data units in networking. This breakdown of data happens with all IP data transfers \u2014 TCP and UDP alike. Each of these individual little bundles of data is slapped with a label (<strong>header<\/strong>) that tells the delivery person where it needs to go and where it was sent from.<\/p>\n\n\n\n<p>The data is transferred <strong>routers<\/strong> or <strong>gateways<\/strong> that have lists information for different IP addresses (and their corresponding domains) across the internet. The info transfers from one gateway to the next until one of them recognizes the package or datagram\u2019s destination.<\/p>\n\n\n\n<p>Now, just keep in mind that this is a (highly) simplified breakdown of how IP works. Just keep this illustration in mind because I&#8217;m going to come back to it later and apply TCP and UDP as the delivery methods. <\/p>\n\n\n\n<p>If you\u2019re wondering where the domain name system (DNS) fits into all this (since it\u2019s essentially what connects domains with their corresponding IP addresses), just know that it\u2019s related but separate. For example, the domain name system can use UDP for DNS requests. However, we\u2019re not going to get into all of that here because that\u2019s just a whole separate process and the focus of this article is honing in on the differences between TCP vs UDP. So, we\u2019ll have to cover the DNS system more in depth in a future article.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"the-internet-protocol-is-the-delivery-service-of-the-internet\">The Internet Protocol is the Delivery Service of the Internet<\/h3>\n\n\n\n<p>Okay, let\u2019s put all of this into a little context. Think of the internet protocol like the FedEx, DHS, or USPS of the internet \u2014 but with a bit of a twist (I\u2019ll explain more shortly). With these types of mail delivery services, you can choose to send packages via basic delivery, or you can choose to have someone sign for the packages upon arrival to ensure they\u2019ve reached the right person. The internet protocol works much the same way but for digital data transmissions.<\/p>\n\n\n\n<p>Now, continuing with the delivery service analogy, imagine that your mom wants to send you a BUNCH of home baked items: cookies, breads, dehydrated fruits \u2014 you name it. (You lucky devil.) To do this, she\u2019d need to have your address to ensure the oversized package get delivered to your doorstep successfully. Otherwise, those delicious treats could end up in the hands of your least favorite neighbors, Greg and Jill (and nobody wants that).<\/p>\n\n\n\n<p>So, in this case, your mom would package everything up, label the package with your address (<strong>header<\/strong>), and request for her favorite delivery company to come get \u2018em. (Again, I\u2019m <em>really<\/em> simplifying things here \u2014 cut me some slack.) However, she winds up having to break down the box into a series of smaller labeled boxes (<strong>packets<\/strong> or <strong>datagrams<\/strong>) because it\u2019s just too much to handle.<\/p>\n\n\n\n<p>Once the packages leave her house, they wind up at the transfer station (<strong>gateway<\/strong>) to make their way to the next delivery point closest to the destination. There, the packages make their way from station to station (<strong>gateway to gateway<\/strong>) until they get to the one that knows your exact address.<\/p>\n\n\n\n<p>Now, imagine that delicious package is instead data that\u2019s transmitting across the internet. Now, what happens to those packages at this point will vary depending on whether the delivery occurs via TCP or UDP. I\u2019ll explain what I mean by that momentarily \u2014 but first, let\u2019s get a primer on what TCP and UDP are and what each data transmission method entails.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"tcp-vs-udp-everything-you-need-to-know-about-these-protocols\">TCP vs UDP: Everything You Need to Know About These Protocols<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"what-is-tcp\">What Is TCP?<\/h3>\n\n\n\n<p>TCP stands for <strong>transmission control protocol<\/strong>, which is a type of <strong>connection-oriented data communication method<\/strong>. It was designed to help establish reliable connections on virtually any network \u2014 even those that are unreliable. TCP, which is dependent upon IP, is part of the transport layer of the ISO\u2019s <a href=\"https:\/\/www.iso.org\/ics\/35.100\/x\/\" target=\"_blank\" rel=\"noreferrer noopener\">open system interconnection (OSI) model<\/a>. This means it\u2019s a transport layer communication protocol.<\/p>\n\n\n\n<p>But how do you know if you\u2019re using TCP? You know that buffering symbol that pops up sometimes when you\u2019re trying to load a high-quality video on your favorite video website? That\u2019s frequently a sign that the data you\u2019re receiving is being transmitted via TCP.<\/p>\n\n\n\n<p>Basically, the goal of TCP is to be an error-free method of data transmission. The transmission control protocol helps to:<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Ensure the recipient receives <em>all<\/em> of the data that\u2019s sent (via a delivery receipt), and<\/li><li>Keep the data transmissions organized by ensuring that packets are received by the recipient in their intended order.<\/li><\/ol>\n\n\n\n<p>TCP does this by establishing a reliable connection that helps it to verify that packets are received successfully. Basically, if the data arrives as intended, in the order it\u2019s supposed to, then it receives a confirmation from the recipient. If not, then the TCP will have the sender re-send the data again.&nbsp; &nbsp;<\/p>\n\n\n\n<p>The TCP protocol was first defined in 1980 by the Internet Engineering Task Force (IETF) in its <a href=\"https:\/\/tools.ietf.org\/html\/rfc761\" target=\"_blank\" rel=\"noreferrer noopener\">RFC 761<\/a>. It was later obsoleted by <a href=\"https:\/\/tools.ietf.org\/html\/rfc793\" target=\"_blank\" rel=\"noreferrer noopener\">RFC 793<\/a> in 1981. Historically, it\u2019s been a very common method of data transmission \u2014 one that you likely use on a daily basis as you go about your day on the internet.<\/p>\n\n\n\n<p>However, it\u2019s not perfect and may not be the most suitable protocol to use in all cases. This is where UDP (or other communication protocols) comes into play. (More on UDP momentarily.)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"how-tcp-works-in-exchanging-data\">How TCP Works in Exchanging Data<\/h4>\n\n\n\n<p>The transmission control protocol requires establishing a connection via a <strong>three-way handshake<\/strong> before transferring data packets from the server to the client. The <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Glossary\/TCP_handshake\" target=\"_blank\" rel=\"noreferrer noopener\">three-way handshake process<\/a>, which starts with the exchange of SYN, SYN-ACK, and ACK messages (known as flags) between these entities, helps to ensure that a reliable connection is made between them. It looks something like this:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"738\" height=\"302\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/09\/tcp-3-way-handshake.png\" alt=\"TCP vs UDP graphic: An illustration of the three-way handshake as part of the TCP connection process\" class=\"wp-image-1441 addshadow\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/09\/tcp-3-way-handshake.png 738w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/09\/tcp-3-way-handshake-300x123.png 300w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/09\/tcp-3-way-handshake-560x229.png 560w\" sizes=\"auto, (max-width: 738px) 100vw, 738px\" \/><figcaption>An illustration of the three-way handshake<\/figcaption><\/figure><\/div>\n\n\n\n<p>The three messages are the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>SYN<\/strong> \u2014 synchronize<\/li><li><strong>SYN-ACK<\/strong> \u2014 synchronize-acknowledgement<\/li><li><strong>ACK<\/strong> \u2014 acknowledge<\/li><\/ul>\n\n\n\n<p>Of course, there\u2019s <a href=\"https:\/\/www.keycdn.com\/support\/tcp-flags\" target=\"_blank\" rel=\"noreferrer noopener\">a number of other flags<\/a> that can be exchanged after that point \u2014 but we won\u2019t get into all of that now. Let\u2019s just continue with the purpose of the process. Once that connection is established, each segment of data that\u2019s sent from the client to the server is followed by an ACK flag to confirm receipt of the data packet.<\/p>\n\n\n\n<p>This all sounds great in theory. But what\u2019s a real-world example of TCP in action that you can see? As of June 2016, <a href=\"https:\/\/netflixtechblog.com\/toward-a-practical-perceptual-video-quality-metric-653f208b9652\" target=\"_blank\" rel=\"noreferrer noopener\">TCP was being used<\/a> by the internet video streaming service Netflix. (However, I\u2019m not sure if they still do or if they use another protocol now as they never responded to my press request.)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"what-is-udp\">What Is UDP?<\/h3>\n\n\n\n<p>As we mentioned earlier, UDP stands for <strong>user datagram protocol<\/strong>. While it\u2019s like TCP in that it\u2019s a type of transport layer communication protocol, it\u2019s different because it\u2019s a <strong><em>connectionless<\/em> communication protocol<\/strong> \u2014 meaning that no connection has to be established prior to sending your data packets (or, more specifically, datagrams).<\/p>\n\n\n\n<p>With UDP, no three-way handshake is necessary before transmitting data to the intended recipient. So, all or some of the data <em>might<\/em> arrive \u2014 and it <em>may<\/em> (or may not) arrive in the order as intended. As such, it\u2019s often described as a \u201cbest effort.\u201d<\/p>\n\n\n\n<p>There\u2019s a great analogy that a <a href=\"https:\/\/softwareengineering.stackexchange.com\/questions\/406542\/chat-part-of-application-using-udp-or-tcp\" target=\"_blank\" rel=\"noreferrer noopener\">stackexchange.com forum user<\/a> named Mike Robinson used to describe the user datagram protocol:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><em>UDP puts a message into a bottle and tosses it into the sea. It might never arrive. It might arrive before or after some other bottle. You will never know if it arrived. You don&#8217;t even know if the intended recipient is alive at all, much less pulling bottles out of the water. The only way you&#8217;ll know if your message was heard is if another bottle washes up on&nbsp;your&nbsp;shoreline, and you manage to grab it before it sinks.\u201d<\/em><\/p><\/blockquote>\n\n\n\n<p>UDP, much like TCP, has been around for a while. The concept of user datagram protocol was first defined in <a href=\"https:\/\/tools.ietf.org\/html\/rfc768\" target=\"_blank\" rel=\"noreferrer noopener\">IETF RFC 768<\/a> in 1980. While TCP has long ruled as being the go-to protocol, UDP is gaining traction as speed and network performance become a priority.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"how-udp-works-in-exchanging-data\">How UDP Works in Exchanging Data<\/h4>\n\n\n\n<p>The benefit of UDP over TCP is that it offers lower latency, but the catch is that it also can result in the loss of some data and data integrity. And unlike with TCP, if some of that data is missing, the sender won\u2019t re-send it because they have no way to follow up to make sure that you received everything.<\/p>\n\n\n\n<p>All of this is to say that UDP isn\u2019t an error-free way to exchange data. So while it\u2019s a faster data transfer process than TCP, the caveat is that you don\u2019t receive the data exactly how it was sent originally, and there could be data missing (and you\u2019d never know it).<\/p>\n\n\n\n<p>UDP is ideal for \u201clive\u201d situations in which data transfers need to occur in real time without delay. Some possible examples of UDP use cases include online video game play and audio or video calls.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"a-summary-of-the-differences-between-tcp-and-udp\">A Summary of the Differences Between TCP and UDP<\/h3>\n\n\n\n<p>Basically, both TCP and UDP are protocols that help determine how data is exchanged between two entities. The biggest difference between the TCP vs UDP delivery methods boils down to:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>If and how they connect.<\/strong> TCP is all about the connection. It\u2019s a protocol that establishes reliable connections \u2014 even on unreliable networks \u2014 before transmitting data. UDP is a connectionless protocol, meaning that it\u2019ll send data regardless of whether it can confirm the recipient is there to receive it.<\/li><li><strong>Data completeness and reliability.<\/strong> TCP prioritizes data integrity and guaranteed delivery, whereas UDP prioritizes speed at the expense of data loss.<\/li><li><strong>Data transmission speeds. <\/strong>TCP is the heavy-weight contender whereas UDP is the light-weight division champ. The first has a series of processes that it follows to ensure the job is done well, whereas the latter is all about getting the job done quickly.<\/li><li><strong>Applications for each protocol.<\/strong> TCP is best for delivering higher quality data streams that can buffer (like video streaming services), whereas UDP is best for live data transfer applications like audio and video chats, online gaming, DNS requests, etc.<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"tcp-vs-udp-differences-in-terms-of-data-delivery-an-example\">TCP vs UDP: Differences in Terms of Data Delivery (an Example)<\/h4>\n\n\n\n<p>Let\u2019s think back to the analogy of your mom\u2019s home-baked goodies and apply TCP and UDP as the delivery methods. When the delivery company is moving the packages of baked goods, the packages will get delivered via different delivery routes to their destinations. They may or may not arrive in the intended order or condition that they were sent, and they may just be dropped off without verifying that you\u2019re there to receive them.<\/p>\n\n\n\n<p>With TCP, the smaller packets of data (baked items) arrive and it\u2019s like there\u2019s a personal delivery assistant who assembles them back into exactly the precise order they were sent to you by your mom. So, nothing from the original package is changed or missing \u2014 and you have to sign for the package upon arrival. This way, your mom can guarantee that you will receive your goodies. If one gets lost, she\u2019ll then know and can try to resend it.<\/p>\n\n\n\n<p>With UDP, on the other hand, the datagrams (baked items) can get modified or rearranged a bit in terms of order. And when they reach their destination, they\u2019re just left on your doorstep \u2014 no one signs for them, and no service reassembles everything for you. This means that if you only receive some of the packages of baked goods, that\u2019s too bad because your mom doesn\u2019t know and isn\u2019t going to resend the missing ones. Also, because you got a whole bunch of packages, you won\u2019t necessarily even realize that one or two might be missing.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"tcp-vs-udp-applications-when-is-one-method-better-than-the-other\">TCP vs UDP Applications: When Is One Method Better Than the Other?<\/h3>\n\n\n\n<p>If you want to reliable data transmission stream, TCP is for you. TCP ensures that you receive everything <em>exactly<\/em> as it was sent, and you don\u2019t care if there might be a delay or a connection refusal and have to try again, then you\u2019d want to go with TCP. But if you care more about speed and want to receive info more quickly, regardless of whether it\u2019s received exactly as it was sent \u2014 or if packets of data be missing \u2014 then UDP works just fine.<\/p>\n\n\n\n<p>Basically, choosing between the two protocols boils down to what you&#8217;re trying to accomplish. Some examples of when UDP would be preferable to TCP includes using real-time video and audio chats online or playing multi-player or battlegrounds in live online games.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"td;dr-\u2014-the-key-differences-between-tcp-vs-udp\">TD;DR \u2014 The Key Differences Between TCP vs UDP<\/h2>\n\n\n\n<p>Look, I get it. You\u2019re busy and there\u2019s a lot to know about TCP and UDP. Both of these protocols have their advantages and serve specific uses in our digital world. So, to quickly summarize for those of you who are in a hurry, here\u2019s a table that breaks down the differences between TCP and UDP.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>TCP (Transmission Control Protocol)<\/strong><\/td><td><strong>UDP (User Datagram Protocol)<\/strong><\/td><\/tr><tr><td>TCP is a connection-oriented communication protocol.<\/td><td>UDP is a connectionless communication protocol.<\/td><\/tr><tr><td>TCP data units are known as packets.<\/td><td>UDP data units are commonly referred to as datagrams (although they\u2019re sometimes called packets as well).<\/td><\/tr><tr><td>TCP rearranges data packets to be received in their intended order.<\/td><td>UDP sends datagrams independently, meaning that they may arrive in a different order.<\/td><\/tr><tr><td>Uses a three-way handshake to establish reliable connections.<\/td><td>UDP doesn\u2019t use a handshake process.<\/td><\/tr><tr><td>TCP confirms data delivery receipts.<\/td><td>UDP doesn\u2019t use delivery receipts.<\/td><\/tr><tr><td>TCP results in higher latency.<\/td><td>UDP is designed for faster data transmission.<\/td><\/tr><tr><td>TCP guarantees data delivery by prioritizing data integrity, completeness, and reliability.<\/td><td>UDP prioritizes speed and often results in data loss.<\/td><\/tr><tr><td>TCP is ideal for reliable data transmissions.<\/td><td>UDP is ideal for real-time data transfers and streaming to avoid delay.<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>TCP and UDP are both ways that you transmit data across networks \u2014 but as much as they\u2019re the same, they\u2019re also different. Here\u2019s what to know about these different&#8230;<\/p>\n","protected":false},"author":8,"featured_media":1444,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[120,119,117,118],"class_list":["post-1438","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cyber-security","tag-osi","tag-protocols","tag-tcp","tag-udp","post-with-tags"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>TCP vs UDP \u2014 What\u2019s the Difference Between Them? - InfoSec Insights<\/title>\n<meta name=\"description\" content=\"TCP vs UDP is discussion about similar yet different communication protocols for data transmissions. Discover what they are &amp; how they work...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sectigostore.com\/blog\/tcp-vs-udp-whats-the-difference\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"TCP vs UDP \u2014 What\u2019s the Difference Between Them? - InfoSec Insights\" \/>\n<meta property=\"og:description\" content=\"TCP vs UDP is discussion about similar yet different communication protocols for data transmissions. Discover what they are &amp; how they work...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sectigostore.com\/blog\/tcp-vs-udp-whats-the-difference\/\" \/>\n<meta property=\"og:site_name\" content=\"InfoSec Insights\" \/>\n<meta property=\"article:published_time\" content=\"2020-12-08T17:09:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-10T11:36:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/09\/tcp-vs-udp-protocols.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1600\" \/>\n\t<meta property=\"og:image:height\" content=\"1000\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Casey Crane\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Casey Crane\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"16 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/tcp-vs-udp-whats-the-difference\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/tcp-vs-udp-whats-the-difference\\\/\"},\"author\":{\"name\":\"Casey Crane\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/#\\\/schema\\\/person\\\/559abd5fa4d9d651eaf18d9b9e91a64c\"},\"headline\":\"TCP vs UDP \u2014 What\u2019s the Difference Between Them?\",\"datePublished\":\"2020-12-08T17:09:01+00:00\",\"dateModified\":\"2020-12-10T11:36:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/tcp-vs-udp-whats-the-difference\\\/\"},\"wordCount\":3272,\"image\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/tcp-vs-udp-whats-the-difference\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/tcp-vs-udp-protocols.jpg\",\"keywords\":[\"OSI\",\"protocols\",\"TCP\",\"UDP\"],\"articleSection\":[\"Cyber Security\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/tcp-vs-udp-whats-the-difference\\\/\",\"url\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/tcp-vs-udp-whats-the-difference\\\/\",\"name\":\"TCP vs UDP \u2014 What\u2019s the Difference Between Them? - InfoSec Insights\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/tcp-vs-udp-whats-the-difference\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/tcp-vs-udp-whats-the-difference\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/tcp-vs-udp-protocols.jpg\",\"datePublished\":\"2020-12-08T17:09:01+00:00\",\"dateModified\":\"2020-12-10T11:36:02+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/#\\\/schema\\\/person\\\/559abd5fa4d9d651eaf18d9b9e91a64c\"},\"description\":\"TCP vs UDP is discussion about similar yet different communication protocols for data transmissions. Discover what they are & how they work...\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/tcp-vs-udp-whats-the-difference\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/sectigostore.com\\\/blog\\\/tcp-vs-udp-whats-the-difference\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/tcp-vs-udp-whats-the-difference\\\/#primaryimage\",\"url\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/tcp-vs-udp-protocols.jpg\",\"contentUrl\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/tcp-vs-udp-protocols.jpg\",\"width\":1600,\"height\":1000,\"caption\":\"binary code data flowing through optical wires\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/tcp-vs-udp-whats-the-difference\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"TCP vs UDP \u2014 What\u2019s the Difference Between Them?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/\",\"name\":\"InfoSec Insights\",\"description\":\"SectigoStore.com Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/#\\\/schema\\\/person\\\/559abd5fa4d9d651eaf18d9b9e91a64c\",\"name\":\"Casey Crane\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c18d819d34a1995e91a4aa7518e9048df7856f336a1ede2262a572db7b1c2506?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c18d819d34a1995e91a4aa7518e9048df7856f336a1ede2262a572db7b1c2506?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c18d819d34a1995e91a4aa7518e9048df7856f336a1ede2262a572db7b1c2506?s=96&d=mm&r=g\",\"caption\":\"Casey Crane\"},\"description\":\"Casey is a writer and editor with a background in journalism, marketing, PR and communications. She has written about cyber security and information technology for several industry publications, including InfoSec Insights, Hashed Out, Experfy, HackerNoon, and Cybercrime Magazine.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"TCP vs UDP \u2014 What\u2019s the Difference Between Them? - InfoSec Insights","description":"TCP vs UDP is discussion about similar yet different communication protocols for data transmissions. Discover what they are & how they work...","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/sectigostore.com\/blog\/tcp-vs-udp-whats-the-difference\/","og_locale":"en_US","og_type":"article","og_title":"TCP vs UDP \u2014 What\u2019s the Difference Between Them? - InfoSec Insights","og_description":"TCP vs UDP is discussion about similar yet different communication protocols for data transmissions. Discover what they are & how they work...","og_url":"https:\/\/sectigostore.com\/blog\/tcp-vs-udp-whats-the-difference\/","og_site_name":"InfoSec Insights","article_published_time":"2020-12-08T17:09:01+00:00","article_modified_time":"2020-12-10T11:36:02+00:00","og_image":[{"width":1600,"height":1000,"url":"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/09\/tcp-vs-udp-protocols.jpg","type":"image\/jpeg"}],"author":"Casey Crane","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Casey Crane","Est. reading time":"16 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/sectigostore.com\/blog\/tcp-vs-udp-whats-the-difference\/#article","isPartOf":{"@id":"https:\/\/sectigostore.com\/blog\/tcp-vs-udp-whats-the-difference\/"},"author":{"name":"Casey Crane","@id":"https:\/\/sectigostore.com\/blog\/#\/schema\/person\/559abd5fa4d9d651eaf18d9b9e91a64c"},"headline":"TCP vs UDP \u2014 What\u2019s the Difference Between Them?","datePublished":"2020-12-08T17:09:01+00:00","dateModified":"2020-12-10T11:36:02+00:00","mainEntityOfPage":{"@id":"https:\/\/sectigostore.com\/blog\/tcp-vs-udp-whats-the-difference\/"},"wordCount":3272,"image":{"@id":"https:\/\/sectigostore.com\/blog\/tcp-vs-udp-whats-the-difference\/#primaryimage"},"thumbnailUrl":"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/09\/tcp-vs-udp-protocols.jpg","keywords":["OSI","protocols","TCP","UDP"],"articleSection":["Cyber Security"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/sectigostore.com\/blog\/tcp-vs-udp-whats-the-difference\/","url":"https:\/\/sectigostore.com\/blog\/tcp-vs-udp-whats-the-difference\/","name":"TCP vs UDP \u2014 What\u2019s the Difference Between Them? - InfoSec Insights","isPartOf":{"@id":"https:\/\/sectigostore.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/sectigostore.com\/blog\/tcp-vs-udp-whats-the-difference\/#primaryimage"},"image":{"@id":"https:\/\/sectigostore.com\/blog\/tcp-vs-udp-whats-the-difference\/#primaryimage"},"thumbnailUrl":"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/09\/tcp-vs-udp-protocols.jpg","datePublished":"2020-12-08T17:09:01+00:00","dateModified":"2020-12-10T11:36:02+00:00","author":{"@id":"https:\/\/sectigostore.com\/blog\/#\/schema\/person\/559abd5fa4d9d651eaf18d9b9e91a64c"},"description":"TCP vs UDP is discussion about similar yet different communication protocols for data transmissions. Discover what they are & how they work...","breadcrumb":{"@id":"https:\/\/sectigostore.com\/blog\/tcp-vs-udp-whats-the-difference\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sectigostore.com\/blog\/tcp-vs-udp-whats-the-difference\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sectigostore.com\/blog\/tcp-vs-udp-whats-the-difference\/#primaryimage","url":"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/09\/tcp-vs-udp-protocols.jpg","contentUrl":"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/09\/tcp-vs-udp-protocols.jpg","width":1600,"height":1000,"caption":"binary code data flowing through optical wires"},{"@type":"BreadcrumbList","@id":"https:\/\/sectigostore.com\/blog\/tcp-vs-udp-whats-the-difference\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/sectigostore.com\/blog\/"},{"@type":"ListItem","position":2,"name":"TCP vs UDP \u2014 What\u2019s the Difference Between Them?"}]},{"@type":"WebSite","@id":"https:\/\/sectigostore.com\/blog\/#website","url":"https:\/\/sectigostore.com\/blog\/","name":"InfoSec Insights","description":"SectigoStore.com Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sectigostore.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/sectigostore.com\/blog\/#\/schema\/person\/559abd5fa4d9d651eaf18d9b9e91a64c","name":"Casey Crane","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c18d819d34a1995e91a4aa7518e9048df7856f336a1ede2262a572db7b1c2506?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c18d819d34a1995e91a4aa7518e9048df7856f336a1ede2262a572db7b1c2506?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c18d819d34a1995e91a4aa7518e9048df7856f336a1ede2262a572db7b1c2506?s=96&d=mm&r=g","caption":"Casey Crane"},"description":"Casey is a writer and editor with a background in journalism, marketing, PR and communications. She has written about cyber security and information technology for several industry publications, including InfoSec Insights, Hashed Out, Experfy, HackerNoon, and Cybercrime Magazine."}]}},"_links":{"self":[{"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/posts\/1438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/comments?post=1438"}],"version-history":[{"count":7,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/posts\/1438\/revisions"}],"predecessor-version":[{"id":1893,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/posts\/1438\/revisions\/1893"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/media\/1444"}],"wp:attachment":[{"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/media?parent=1438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/categories?post=1438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/tags?post=1438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}