<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[TCP vs UDP]]></title><description><![CDATA[TCP vs UDP]]></description><link>https://tcporudp.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Wed, 25 Nov 2026 08:14:56 GMT</lastBuildDate><atom:link href="https://tcporudp.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[TCP vs UDP: When to Use What, and How TCP Relates to HTTP]]></title><description><![CDATA[TCP vs UDP which is best for which use case]]></description><link>https://tcporudp.hashnode.dev/tcp-vs-udp-when-to-use-what-and-how-tcp-relates-to-http</link><guid isPermaLink="true">https://tcporudp.hashnode.dev/tcp-vs-udp-when-to-use-what-and-how-tcp-relates-to-http</guid><category><![CDATA[@hiteshchoudharylco]]></category><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[TCP]]></category><category><![CDATA[UDP]]></category><category><![CDATA[tcp vs udp]]></category><category><![CDATA[#TCP #UDP #Networking #TechExplained #Protocols #DataTransfer #WebDevelopment #InternetTechnology #Coding #Programming #TechInsights #NetworkProtocols #TechTips #ComputerScience #TechForBeginners]]></category><dc:creator><![CDATA[raquib Farooqui]]></dc:creator><pubDate>Thu, 22 Jan 2026 22:03:24 GMT</pubDate><content:encoded><![CDATA[<h2 id="heading-what-are-tcp-and-udp">What are TCP and UDP??</h2>
<p>actually its nothing but a Protocol for transferring the data from an IP adress to another IP adress.</p>
<p>TCP[<strong>Transmission Control Protocol</strong>] :- It is a protocol or we can call it rools that runs the data sharing in whole world acting as a "careful courier" that guarantees what is sent is exactly what is received.</p>
<p>It transfers the data in mini packets which is called segments and every segment has its own unequi number for tracking and re arranging after receving</p>
<p>For every segment received, the receiver sends an <strong>ACK</strong>. If the sender does not receive an ACK within a set timeout, it assumes the data was lost and tells the sender to resend it.</p>
<p>it is one of the most safest and reliable protocols in market <strong>BUT</strong> by doingn all these checks it take a lot of time comapare to other protocols and hence <strong>UDP</strong> comes in a Picture</p>
<p>UDP[<strong>User Datagram Protocol</strong>]:- it is also a protocol for transferring data but it has its own unique ability, that it acts like a <strong>broadcast signal</strong> or <strong>standard mail</strong> it sends data immediately without checking if the receiver is ready or if the data actually arrived and this makes him fastest of all among</p>
<p>No Handshake, like TCP is doesnt handshake the reciever it just start transfering the data after he got where to transfer</p>
<p>No Acknowledgments, this is one the major downside of this protocol If a packet is lost, the sender never knows and will not resend it</p>
<p>But this makes it the fastest protocol</p>
<h2 id="heading-when-to-use-tcp">When to use TCP</h2>
<p>the tcp is used in places where speed is not the main concern, every piece of data must arrive exactly as sent, and in the correct order and where we need accuracy over the speed like</p>
<ul>
<li><p>Web browsing</p>
</li>
<li><p>file transfering</p>
</li>
<li><p>email</p>
</li>
<li><p>Financial Transactions</p>
</li>
<li><p>databases</p>
</li>
<li><p>ShareMarket</p>
</li>
</ul>
<h2 id="heading-when-to-use-udp">When to use UDP</h2>
<p>Use UDP when missing a few segents of data is less important than receiving the most current information fastly, because it never uses 3 way handshake or any package history or serial number it transfer data fastly. it can used in</p>
<ul>
<li><p>Online Gaming</p>
</li>
<li><p>Zoom like platform (Zoom uses its own made protocol for faster and low package loss transfer)</p>
</li>
<li><p>Live streaming (although the youtube use TCP for streaming but other platform use UDP)</p>
</li>
<li><p>whatsapp calling, instagram calling</p>
</li>
</ul>
<p><strong>IT is totally depend on your usecase when u want speed over quality then use UDP and when u want quality over speed then u can use TCP</strong></p>
<p><strong>BUT Remember</strong> <em>there always a high speed data tranfer medium and that is</em></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769118109574/07c1d3d2-4b5d-4588-8d94-99336e304680.jpeg" alt class="image--center mx-auto" /></p>
<h2 id="heading-what-is-http">What is HTTP</h2>
<p>HTTP[Hypertext Transfer Protocol]:- its is Top level protocol and it works on requist then response model When you enter a url or click a link your browser sends an HTTP request to the server this request contains some type of HTTp method like get,post</p>
<p>once these request are created then it goes on a server called a <strong>daemon</strong> (HTTPD) it handeled these requist and send back an HTTP response containing a status code like <strong>200</strong> or <strong>404</strong> and the data also</p>
<p>it is stateless and thats why website saves cookie cuz http forgot things so cookie is used to remember u for checking are u loged in or u are privius user</p>
<p>It is on 7th layer of network sack which is top of the TCP</p>
<p><img src="https://substackcdn.com/image/fetch/$s_!uBqC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F690cf420-85c0-4a7d-a483-45a05db005e1_1238x714.png" alt class="image--center mx-auto" /></p>
]]></content:encoded></item></channel></rss>