<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Udp on IT Comparison</title><link>https://comparison.metacog.co.kr/tags/udp/</link><description>Recent content in Udp on IT Comparison</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 01 Aug 2026 20:00:00 +0900</lastBuildDate><atom:link href="https://comparison.metacog.co.kr/tags/udp/index.xml" rel="self" type="application/rss+xml"/><item><title>TCP vs UDP: Reliable Streams vs Fast Datagrams</title><link>https://comparison.metacog.co.kr/posts/2026-08-03-tcp-vs-udp-reliable-streams-vs-fast-datagrams/</link><pubDate>Sat, 01 Aug 2026 20:00:00 +0900</pubDate><guid>https://comparison.metacog.co.kr/posts/2026-08-03-tcp-vs-udp-reliable-streams-vs-fast-datagrams/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;
&lt;p&gt;TCP and UDP are the two core transport-layer protocols used to move data between hosts, but they trade reliability for speed in opposite directions. TCP prioritizes &lt;strong class="kw"&gt;reliable delivery&lt;/strong&gt; through handshakes, acknowledgments, and retransmission, while UDP prioritizes &lt;strong class="kw"&gt;low-latency delivery&lt;/strong&gt; by sending datagrams with no setup or delivery guarantees. Choosing between them shapes how an application handles packet loss, ordering, and throughput.&lt;/p&gt;
&lt;h2 id="comparison-diagram"&gt;Comparison Diagram&lt;/h2&gt;
&lt;div class="compare-diagram"&gt;
&lt;svg viewBox="0 0 640 360" xmlns="http://www.w3.org/2000/svg"&gt;&lt;defs&gt;&lt;marker id="arrowA" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"&gt;&lt;path d="M0,0 L10,5 L0,10 z" style="fill:var(--compare-a)"/&gt;&lt;/marker&gt;&lt;marker id="arrowB" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"&gt;&lt;path d="M0,0 L10,5 L0,10 z" style="fill:var(--compare-b)"/&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;text x="180" y="28" text-anchor="middle" font-size="16" font-weight="bold" style="fill:var(--primary)"&gt;TCP&lt;/text&gt;&lt;text x="490" y="28" text-anchor="middle" font-size="16" font-weight="bold" style="fill:var(--primary)"&gt;UDP&lt;/text&gt;&lt;line x1="340" y1="45" x2="340" y2="330" stroke-dasharray="4 4" style="stroke:var(--border)"/&gt;&lt;line x1="100" y1="50" x2="100" y2="330" style="stroke:var(--border)"/&gt;&lt;line x1="260" y1="50" x2="260" y2="330" style="stroke:var(--border)"/&gt;&lt;line x1="400" y1="50" x2="400" y2="330" style="stroke:var(--border)"/&gt;&lt;line x1="580" y1="50" x2="580" y2="330" style="stroke:var(--border)"/&gt;&lt;circle cx="100" cy="50" r="5" style="fill:var(--compare-a-soft);stroke:var(--compare-a)"/&gt;&lt;circle cx="260" cy="50" r="5" style="fill:var(--compare-a-soft);stroke:var(--compare-a)"/&gt;&lt;circle cx="400" cy="50" r="5" style="fill:var(--compare-b-soft);stroke:var(--compare-b)"/&gt;&lt;circle cx="580" cy="50" r="5" style="fill:var(--compare-b-soft);stroke:var(--compare-b)"/&gt;&lt;text x="100" y="42" text-anchor="middle" font-size="10" style="fill:var(--content)"&gt;Client&lt;/text&gt;&lt;text x="260" y="42" text-anchor="middle" font-size="10" style="fill:var(--content)"&gt;Server&lt;/text&gt;&lt;text x="400" y="42" text-anchor="middle" font-size="10" style="fill:var(--content)"&gt;Sender&lt;/text&gt;&lt;text x="580" y="42" text-anchor="middle" font-size="10" style="fill:var(--content)"&gt;Receiver&lt;/text&gt;&lt;line x1="100" y1="65" x2="260" y2="65" stroke-width="1.5" marker-end="url(#arrowA)" style="stroke:var(--compare-a)"/&gt;&lt;text x="180" y="60" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;SYN&lt;/text&gt;&lt;line x1="260" y1="90" x2="100" y2="90" stroke-width="1.5" marker-end="url(#arrowA)" style="stroke:var(--compare-a)"/&gt;&lt;text x="180" y="85" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;SYN-ACK&lt;/text&gt;&lt;line x1="100" y1="115" x2="260" y2="115" stroke-width="1.5" marker-end="url(#arrowA)" style="stroke:var(--compare-a)"/&gt;&lt;text x="180" y="110" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;ACK&lt;/text&gt;&lt;text x="180" y="138" text-anchor="middle" font-size="10" font-style="italic" style="fill:var(--secondary)"&gt;connection established&lt;/text&gt;&lt;line x1="100" y1="163" x2="260" y2="163" stroke-width="1.5" marker-end="url(#arrowA)" style="stroke:var(--compare-a)"/&gt;&lt;text x="180" y="158" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;Data&lt;/text&gt;&lt;line x1="260" y1="188" x2="100" y2="188" stroke-width="1.5" marker-end="url(#arrowA)" style="stroke:var(--compare-a)"/&gt;&lt;text x="180" y="183" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;ACK&lt;/text&gt;&lt;line x1="100" y1="213" x2="260" y2="213" stroke-width="1.5" marker-end="url(#arrowA)" style="stroke:var(--compare-a)"/&gt;&lt;text x="180" y="208" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;Data&lt;/text&gt;&lt;line x1="260" y1="238" x2="100" y2="238" stroke-width="1.5" marker-end="url(#arrowA)" style="stroke:var(--compare-a)"/&gt;&lt;text x="180" y="233" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;ACK&lt;/text&gt;&lt;text x="180" y="265" text-anchor="middle" font-size="10" style="fill:var(--secondary)"&gt;FIN / ACK teardown&lt;/text&gt;&lt;line x1="400" y1="65" x2="580" y2="65" stroke-width="1.5" marker-end="url(#arrowB)" style="stroke:var(--compare-b)"/&gt;&lt;text x="490" y="60" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;Datagram&lt;/text&gt;&lt;line x1="400" y1="90" x2="580" y2="90" stroke-width="1.5" marker-end="url(#arrowB)" style="stroke:var(--compare-b)"/&gt;&lt;text x="490" y="85" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;Datagram&lt;/text&gt;&lt;line x1="400" y1="115" x2="500" y2="115" stroke-dasharray="4 3" style="stroke:var(--border)"/&gt;&lt;line x1="496" y1="111" x2="504" y2="119" style="stroke:var(--secondary)"/&gt;&lt;line x1="504" y1="111" x2="496" y2="119" style="stroke:var(--secondary)"/&gt;&lt;text x="490" y="131" text-anchor="middle" font-size="10" style="fill:var(--secondary)"&gt;lost, no retry&lt;/text&gt;&lt;line x1="400" y1="153" x2="580" y2="153" stroke-width="1.5" marker-end="url(#arrowB)" style="stroke:var(--compare-b)"/&gt;&lt;text x="490" y="148" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;Datagram&lt;/text&gt;&lt;line x1="400" y1="178" x2="580" y2="178" stroke-width="1.5" marker-end="url(#arrowB)" style="stroke:var(--compare-b)"/&gt;&lt;text x="490" y="173" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;Datagram&lt;/text&gt;&lt;text x="490" y="205" text-anchor="middle" font-size="10" style="fill:var(--secondary)"&gt;no ACKs, no ordering&lt;/text&gt;&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id="comparison-table"&gt;Comparison Table&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;TCP&lt;/th&gt;
&lt;th&gt;UDP&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Connection setup&lt;/td&gt;
&lt;td&gt;Three-way handshake (SYN, SYN-ACK, ACK) establishes a stateful connection before any data moves&lt;/td&gt;
&lt;td&gt;No handshake — sender transmits datagrams immediately with no prior negotiation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Delivery guarantee&lt;/td&gt;
&lt;td&gt;Guaranteed via sequence numbers and acknowledgments; lost segments are detected and resent&lt;/td&gt;
&lt;td&gt;Best-effort only; lost packets vanish silently with no notification to either side&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ordering&lt;/td&gt;
&lt;td&gt;Segments are reassembled in the original order regardless of arrival sequence&lt;/td&gt;
&lt;td&gt;No ordering guarantee; packets are delivered to the application in whatever order they arrive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Flow &amp;amp; congestion control&lt;/td&gt;
&lt;td&gt;Dynamic window sizing and congestion-avoidance algorithms throttle the sender to match network capacity&lt;/td&gt;
&lt;td&gt;None; the application sends at whatever rate it chooses, independent of network conditions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Error handling&lt;/td&gt;
&lt;td&gt;Checksum plus automatic retransmission recovers corrupted or missing segments&lt;/td&gt;
&lt;td&gt;Checksum only; corrupted or missing packets are simply dropped, not recovered&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Overhead &amp;amp; latency&lt;/td&gt;
&lt;td&gt;Larger 20+ byte header and handshake/ACK round trips add processing and latency&lt;/td&gt;
&lt;td&gt;Minimal 8-byte header and no round trips keep per-packet overhead and latency low&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Connection teardown&lt;/td&gt;
&lt;td&gt;Explicit four-way FIN/ACK exchange formally closes the connection on both sides&lt;/td&gt;
&lt;td&gt;No connection state exists, so transmission simply stops with nothing to tear down&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="key-differences"&gt;Key Differences&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TCP is &lt;strong class="kw"&gt;connection-oriented&lt;/strong&gt;, requiring a handshake before data flows, while UDP is connectionless&lt;/li&gt;
&lt;li&gt;TCP guarantees &lt;strong class="kw"&gt;reliable delivery&lt;/strong&gt; through acknowledgments and retransmission; UDP offers none&lt;/li&gt;
&lt;li&gt;TCP performs &lt;strong class="kw"&gt;congestion control&lt;/strong&gt; to avoid overwhelming the network; UDP has no such mechanism&lt;/li&gt;
&lt;li&gt;UDP&amp;rsquo;s minimal &lt;strong class="kw"&gt;header overhead&lt;/strong&gt; gives it consistently lower latency than TCP&lt;/li&gt;
&lt;li&gt;TCP preserves &lt;strong class="kw"&gt;packet ordering&lt;/strong&gt; end-to-end; UDP delivers packets in whatever order they arrive&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="when-to-use-each"&gt;When to Use Each&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;TCP&lt;/strong&gt;&lt;/p&gt;</description></item></channel></rss>