<?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>Availability on IT Comparison</title><link>https://comparison.metacog.co.kr/tags/availability/</link><description>Recent content in Availability on IT Comparison</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 06 Sep 2026 09:35:36 +0900</lastBuildDate><atom:link href="https://comparison.metacog.co.kr/tags/availability/index.xml" rel="self" type="application/rss+xml"/><item><title>Consistency vs Availability: The CAP Theorem Tradeoff</title><link>https://comparison.metacog.co.kr/posts/2026-09-06-consistency-vs-availability-the-cap-theorem-tradeoff/</link><pubDate>Sun, 06 Sep 2026 09:35:36 +0900</pubDate><guid>https://comparison.metacog.co.kr/posts/2026-09-06-consistency-vs-availability-the-cap-theorem-tradeoff/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;
&lt;p&gt;When a distributed system suffers a network partition, it must choose between &lt;strong class="kw"&gt;consistency&lt;/strong&gt; (every node sees the same data, even if that means rejecting requests) and &lt;strong class="kw"&gt;availability&lt;/strong&gt; (every request gets a response, even if the data might be stale). This CAP theorem tradeoff shapes how databases behave under failure and directly affects correctness guarantees versus uptime.&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;line x1="320" y1="10" x2="320" y2="350" style="stroke:var(--border)" stroke-width="1.5" stroke-dasharray="6,5"/&gt;&lt;text x="160" y="28" text-anchor="middle" style="fill:var(--primary)" font-size="17" font-weight="bold"&gt;Consistency (CP)&lt;/text&gt;&lt;text x="480" y="28" text-anchor="middle" style="fill:var(--primary)" font-size="17" font-weight="bold"&gt;Availability (AP)&lt;/text&gt;&lt;rect x="100" y="44" width="120" height="36" rx="5" style="fill:var(--compare-a-soft);stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;text x="160" y="67" text-anchor="middle" style="fill:var(--content)" font-size="13"&gt;Client&lt;/text&gt;&lt;rect x="420" y="44" width="120" height="36" rx="5" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;text x="480" y="67" text-anchor="middle" style="fill:var(--content)" font-size="13"&gt;Client&lt;/text&gt;&lt;line x1="140" y1="80" x2="105" y2="140" style="stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;polygon points="105,140 112,131 118,138" style="fill:var(--compare-a)"/&gt;&lt;line x1="175" y1="140" x2="185" y2="80" style="stroke:var(--compare-a)" stroke-width="1.5" stroke-dasharray="4,3"/&gt;&lt;polygon points="185,80 178,86 182,90" style="fill:var(--compare-a)"/&gt;&lt;text x="210" y="105" text-anchor="middle" style="fill:var(--compare-a)" font-size="11"&gt;503 blocked&lt;/text&gt;&lt;line x1="460" y1="80" x2="425" y2="140" style="stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;polygon points="425,140 432,131 438,138" style="fill:var(--compare-b)"/&gt;&lt;line x1="495" y1="140" x2="505" y2="80" style="stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;polygon points="505,80 498,86 502,90" style="fill:var(--compare-b)"/&gt;&lt;text x="530" y="105" text-anchor="middle" style="fill:var(--compare-b)" font-size="11"&gt;200 OK (stale)&lt;/text&gt;&lt;rect x="60" y="140" width="100" height="50" rx="5" style="fill:var(--compare-a-soft);stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;text x="110" y="170" text-anchor="middle" style="fill:var(--content)" font-size="13"&gt;Node A&lt;/text&gt;&lt;rect x="200" y="140" width="100" height="50" rx="5" style="fill:var(--compare-a-soft);stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;text x="250" y="170" text-anchor="middle" style="fill:var(--content)" font-size="13"&gt;Node B&lt;/text&gt;&lt;path d="M180 135 L172 150 L188 165 L180 180 L172 195" style="stroke:var(--border);fill:none" stroke-width="2"/&gt;&lt;text x="180" y="122" text-anchor="middle" style="fill:var(--secondary)" font-size="10"&gt;partition&lt;/text&gt;&lt;rect x="380" y="140" width="100" height="50" rx="5" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;text x="430" y="170" text-anchor="middle" style="fill:var(--content)" font-size="13"&gt;Node A&lt;/text&gt;&lt;rect x="520" y="140" width="100" height="50" rx="5" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;text x="570" y="170" text-anchor="middle" style="fill:var(--content)" font-size="13"&gt;Node B&lt;/text&gt;&lt;path d="M500 135 L492 150 L508 165 L500 180 L492 195" style="stroke:var(--border);fill:none" stroke-width="2"/&gt;&lt;text x="500" y="122" text-anchor="middle" style="fill:var(--secondary)" font-size="10"&gt;partition&lt;/text&gt;&lt;text x="160" y="235" text-anchor="middle" style="fill:var(--secondary)" font-size="12"&gt;Waits for quorum, rejects request&lt;/text&gt;&lt;text x="160" y="260" text-anchor="middle" style="fill:var(--content)" font-size="12"&gt;Guarantee: no stale reads&lt;/text&gt;&lt;text x="480" y="235" text-anchor="middle" style="fill:var(--secondary)" font-size="12"&gt;Answers immediately from local data&lt;/text&gt;&lt;text x="480" y="260" text-anchor="middle" style="fill:var(--content)" font-size="12"&gt;Guarantee: no downtime&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;Consistency (CP)&lt;/th&gt;
&lt;th&gt;Availability (AP)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Normal operation (no partition)&lt;/td&gt;
&lt;td&gt;Behaves identically to any healthy cluster; all replicas agree&lt;/td&gt;
&lt;td&gt;Behaves identically to any healthy cluster; all replicas agree&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Behavior when a partition occurs&lt;/td&gt;
&lt;td&gt;Nodes that cannot confirm quorum stop responding&lt;/td&gt;
&lt;td&gt;All nodes keep responding regardless of quorum status&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Write handling during partition&lt;/td&gt;
&lt;td&gt;Writes are rejected or queued until enough replicas are reachable&lt;/td&gt;
&lt;td&gt;Writes are accepted locally and replicated once the partition heals&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Read handling during partition&lt;/td&gt;
&lt;td&gt;Reads are blocked or errored if the latest value can&amp;rsquo;t be confirmed&lt;/td&gt;
&lt;td&gt;Reads are served from whatever local replica is reachable, even if stale&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Client-facing failure mode&lt;/td&gt;
&lt;td&gt;Client sees a timeout or explicit error (e.g. 503)&lt;/td&gt;
&lt;td&gt;Client sees a successful response that may contain outdated data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data guarantee provided&lt;/td&gt;
&lt;td&gt;Linearizability - no two nodes ever disagree on current state&lt;/td&gt;
&lt;td&gt;Liveness - the system always answers, correctness may lag&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Recovery after partition heals&lt;/td&gt;
&lt;td&gt;Resumes cleanly; no conflicting writes existed since they were blocked&lt;/td&gt;
&lt;td&gt;Must reconcile diverging writes via vector clocks, LWW, or CRDTs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Representative systems&lt;/td&gt;
&lt;td&gt;HBase, Zookeeper, MongoDB (default majority writes)&lt;/td&gt;
&lt;td&gt;Cassandra, DynamoDB, Riak&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;The tradeoff only bites during an actual &lt;strong class="kw"&gt;network partition&lt;/strong&gt; - outside of that, both behave the same.&lt;/li&gt;
&lt;li&gt;Consistency requires a &lt;strong class="kw"&gt;quorum&lt;/strong&gt; agreement before answering, which can mean refusing requests.&lt;/li&gt;
&lt;li&gt;Availability guarantees a response but risks returning &lt;strong class="kw"&gt;stale data&lt;/strong&gt; to the client.&lt;/li&gt;
&lt;li&gt;The choice determines whether you need a &lt;strong class="kw"&gt;conflict resolution&lt;/strong&gt; strategy for divergent writes after recovery.&lt;/li&gt;
&lt;li&gt;Many production databases offer &lt;strong class="kw"&gt;tunable consistency&lt;/strong&gt;, letting you pick per-operation rather than a single global stance.&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;Consistency (CP)&lt;/strong&gt;&lt;/p&gt;</description></item></channel></rss>