<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>System Design Building Blocks on Java &amp; Software Architecture Knowledge Hub</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/</link><description>Recent content in System Design Building Blocks on Java &amp; Software Architecture Knowledge Hub</description><generator>Hugo</generator><language>en-US</language><copyright>© 2026 Samir Kumar Sahoo (https://github.com/samirsahoo). All rights reserved.</copyright><atom:link href="https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/index.xml" rel="self" type="application/rss+xml"/><item><title>Scaling from Zero to Millions of Users</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/scaling-from-zero-to-millions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/scaling-from-zero-to-millions/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Large systems are not designed large on day one. They &lt;strong&gt;evolve&lt;/strong&gt;, one bottleneck at a time. This page walks through the standard sequence of steps that take a web application from a single server to millions of users. Each step removes one limit and adds some complexity — and knowing &lt;em&gt;why&lt;/em&gt; each step exists is what system design interviews test.&lt;/p&gt;</description></item><item><title>Load Balancing and Proxies</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/load-balancing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/load-balancing/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;A &lt;strong&gt;load balancer (LB)&lt;/strong&gt; spreads incoming requests across a group of servers so that no single server is overloaded, and stops sending traffic to servers that are unhealthy. It improves &lt;strong&gt;scalability&lt;/strong&gt; (add servers behind it), &lt;strong&gt;availability&lt;/strong&gt; (route around failures) and &lt;strong&gt;responsiveness&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Caching Strategies: Patterns, Invalidation, Eviction and Failure Modes</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/caching-strategies/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/caching-strategies/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;A &lt;strong&gt;cache&lt;/strong&gt; is a small, fast store holding copies of data that is expensive to fetch or compute. It works because of &lt;strong&gt;locality of reference&lt;/strong&gt;: recently requested data is likely to be requested again. Caches exist at almost every layer — hardware, operating system, browser, CDN, application, database — and they are the cheapest way to cut latency and load.&lt;/p&gt;</description></item><item><title>Consistent Hashing</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/consistent-hashing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/consistent-hashing/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;Consistent hashing&lt;/strong&gt; is a way to assign keys to servers so that when a server is &lt;strong&gt;added or removed, only a small fraction of keys move&lt;/strong&gt; — about &lt;em&gt;K / N&lt;/em&gt; of &lt;em&gt;K&lt;/em&gt; keys for &lt;em&gt;N&lt;/em&gt; servers — instead of nearly all of them. It is the standard technique for distributing data across distributed caches and leaderless databases.&lt;/p&gt;</description></item><item><title>CAP Theorem and PACELC</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/cap-theorem-and-pacelc/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/cap-theorem-and-pacelc/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;The &lt;strong&gt;CAP theorem&lt;/strong&gt; (Eric Brewer, 2000; proved by Gilbert and Lynch, 2002) concerns a distributed data store with replicas. It names three properties:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Consistency (C):&lt;/strong&gt; every read receives the most recent write or an error. Here this means &lt;strong&gt;linearizability&lt;/strong&gt;, not the C of ACID.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Availability (A):&lt;/strong&gt; every request to a non-failed node receives a non-error response (without a guarantee that it is the latest write).&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Partition tolerance (P):&lt;/strong&gt; the system keeps operating even when the network drops or delays messages between nodes.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;The theorem says: &lt;strong&gt;when a network partition happens, a system must choose between consistency and availability.&lt;/strong&gt; It cannot provide both.&lt;/p&gt;</description></item><item><title>Choosing a Database: SQL, NoSQL, Indexes and Storage Types</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/choosing-a-database/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/choosing-a-database/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;There is no best database, only the best fit for a &lt;strong&gt;workload&lt;/strong&gt;: the shape of the data, how it is queried, how much there is, how fast it changes, and which guarantees it needs. Choosing well means asking those questions first and naming the technology last.&lt;/p&gt;</description></item><item><title>Unique ID Generation in Distributed Systems</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/unique-id-generation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/unique-id-generation/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Every order, message and post needs a unique ID. On one database, &lt;code&gt;AUTO_INCREMENT&lt;/code&gt; does it. Across many servers and databases, generating IDs that are unique &lt;strong&gt;without coordinating on every request&lt;/strong&gt; is a design problem in its own right — and a common interview question.&lt;/p&gt;</description></item><item><title>Message Queues and Delivery Semantics</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/message-queues-and-delivery-semantics/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/message-queues-and-delivery-semantics/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;A &lt;strong&gt;message queue&lt;/strong&gt; is a durable buffer between components: a &lt;strong&gt;producer&lt;/strong&gt; puts a message on it and continues; a &lt;strong&gt;consumer&lt;/strong&gt; takes it off and processes it later. The queue makes communication &lt;strong&gt;asynchronous&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;p&gt;The handwritten notes summarise why this matters: in small systems writes are fast, but in large systems a request may take a long time, and with many clients the server cannot keep up. With a queue, the client gets an acknowledgement (a receipt) immediately, the task is processed when a worker is free, and the client can check the result later.&lt;/p&gt;</description></item><item><title>Long Polling, WebSockets and Server-Sent Events</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/real-time-communication/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/real-time-communication/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;HTTP was designed for &lt;strong&gt;request and response&lt;/strong&gt;: the client asks, the server answers. Chat, live scores, notifications, collaborative editing and dashboards need the &lt;strong&gt;server to send data when something happens&lt;/strong&gt;. There are four ways to achieve this on the web, from the oldest to the most capable.&lt;/p&gt;</description></item><item><title>Deployment Strategies: Rolling, Blue-Green, Canary and Feature Flags</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/deployment-strategies/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/deployment-strategies/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Deploying or upgrading services is risky: most outages are caused by changes. A &lt;strong&gt;deployment strategy&lt;/strong&gt; decides how a new version replaces the old one, aiming for &lt;strong&gt;no downtime&lt;/strong&gt;, &lt;strong&gt;limited blast radius&lt;/strong&gt; if the new version is bad, and &lt;strong&gt;fast rollback&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>HTTPS, Password Storage and API Request Signing</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/security-fundamentals/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/security-fundamentals/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Security is a requirement of every design, not an add-on. Three mechanisms appear in nearly every system design discussion:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;HTTPS (HTTP over TLS)&lt;/strong&gt; protects data in transit: confidentiality, integrity and server authentication.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Password hashing&lt;/strong&gt; protects credentials at rest, even if the database leaks.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Authenticated API access&lt;/strong&gt; — tokens or signed requests — proves who is calling an API and that the request was not tampered with.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="how-https-works"&gt;How HTTPS works&lt;a class="heading-anchor" href="#how-https-works" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;HTTPS is HTTP sent through a &lt;strong&gt;TLS&lt;/strong&gt; connection. TLS uses both kinds of cryptography:&lt;/p&gt;</description></item><item><title>DNS and What Happens When You Type a URL</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/dns-and-web-request-lifecycle/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/dns-and-web-request-lifecycle/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;When you type &lt;code&gt;https://www.example.com/products&lt;/code&gt; and press Enter, the browser must: find the server&amp;rsquo;s IP address (&lt;strong&gt;DNS&lt;/strong&gt;), open a connection (&lt;strong&gt;TCP&lt;/strong&gt;), secure it (&lt;strong&gt;TLS&lt;/strong&gt;), send an &lt;strong&gt;HTTP&lt;/strong&gt; request, receive the response, and &lt;strong&gt;render&lt;/strong&gt; the page. Each step adds latency and each is a lever in system design. ByteByteGo covers this as &amp;ldquo;what happens when you type a URL into your browser?&amp;rdquo; and &amp;ldquo;how does DNS work&amp;rdquo;.&lt;/p&gt;</description></item><item><title>Probabilistic Data Structures: Bloom Filters, HyperLogLog and Count-Min Sketch</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/probabilistic-data-structures/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/probabilistic-data-structures/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;Probabilistic data structures&lt;/strong&gt; answer questions about very large data sets using a small, fixed amount of memory, in exchange for a small, &lt;strong&gt;quantifiable error&lt;/strong&gt;. Exact answers would need memory proportional to the data; these need kilobytes or megabytes regardless of size.&lt;/p&gt;</description></item></channel></rss>