<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anandita Dhasmana on Medium]]></title>
        <description><![CDATA[Stories by Anandita Dhasmana on Medium]]></description>
        <link>https://medium.com/@ranandita.dhasmana?source=rss-349711690d85------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*cyUeyWnk58huuCpG.</url>
            <title>Stories by Anandita Dhasmana on Medium</title>
            <link>https://medium.com/@ranandita.dhasmana?source=rss-349711690d85------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 01:30:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ranandita.dhasmana/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[System Design Through Axes: A First- Principles Approach]]></title>
            <link>https://medium.com/@ranandita.dhasmana/system-design-through-axes-a-first-principles-approach-e0e590fe2a41?source=rss-349711690d85------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0e590fe2a41</guid>
            <dc:creator><![CDATA[Anandita Dhasmana]]></dc:creator>
            <pubDate>Mon, 23 Mar 2026 07:02:55 GMT</pubDate>
            <atom:updated>2026-03-23T07:02:55.045Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>“Design a scalable system.”</em></strong></p><p>It sounds simple — until you actually have to do it.</p><p>Early in my career, I worked on systems handling high traffic, asynchronous workflows, and distributed data pipelines. I could write production-ready code, optimize jobs, and ship features fast.</p><p><strong><em>But when asked to design a system from scratch — I realized something uncomfortable:</em></strong></p><p>I didn’t have a clear framework in my head.</p><p>Most of my decisions were instinctive, not structured.</p><p>After going through multiple job switches, interviews, and a phase that tested my confidence, I decided to rebuild my understanding from <strong><em>first principles.</em></strong></p><p>Not by memorizing designs.</p><p>But by breaking them down to the core problems and trade-offs.</p><p>This is an attempt to capture that approach — a set of simple, practical mental models that help me approach any new system design problem in much better way.</p><h3>What This Article Covers?</h3><p>Instead of jumping straight into tools or architectures, this article breaks system design down into a few fundamental dimensions that shape every real-world system.</p><p><strong>We’ll look at:</strong></p><ul><li><strong>Workload patterns</strong> — Understanding whether your system is read-heavy or write-heavy, and how that impacts storage and caching decisions</li><li><strong>Traffic behavior</strong> — Designing for bursty and unpredictable traffic without overloading your system</li><li><strong>Scale (QPS)</strong> — How systems evolve as they grow from thousands to millions of requests</li><li><strong>Consistency trade-offs</strong> — When to prioritize strong consistency vs eventual consistency</li><li><strong>Latency requirements</strong> — Identifying what needs to be real-time and what can be asynchronous</li><li><strong>Concurrency challenges</strong> — Handling race conditions, duplicate requests, and parallel conflicts safely</li></ul><p><strong>Each section focuses on:</strong></p><ul><li>The core problem</li><li>The trade-offs involved</li><li>And the practical patterns used in real systems</li></ul><p><strong>The goal is simple:</strong></p><p>To document a handly mental framework that helps you break down any system design problem — instead of guessing your way through it.</p><h3>🧠 The Core Axes (Think Before You Design)</h3><p>Every system can be broken down across these dimensions:</p><h3>1. Workload Axis</h3><ul><li>Read-heavy</li><li>Write-heavy</li><li>Balanced</li></ul><h3>2. Traffic Pattern Axis</h3><ul><li>Continuous</li><li>Spiky</li><li>Burst</li><li>Balanced</li></ul><h3>3. Scale Axis (QPS)</h3><p>Level QPS</p><p>🟢 Low&lt;1K</p><p>🟡 Medium1K–100K</p><p>🔴 High100K–1M</p><p>⚫ Very High&gt;1M</p><h3>4. Consistency Axis (CAP)</h3><ul><li>AP → Availability + Scale</li><li>CP → Correctness</li></ul><h3>5. Latency Sensitivity Axis</h3><ul><li>Ultra-low (real-time)</li><li>Medium (APIs)</li><li>High tolerance (batch/analytics)</li></ul><h3>6. Concurrency / Race Condition Axis</h3><ul><li>Low contention</li><li>Moderate contention</li><li>High contention (flash sale, payments)</li></ul><h3>⚡ Mapping Axes → Design Decisions</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2_ln99jgF-ezWMoolQLgeg.png" /></figure><h3>🧠 Requirement Types (How Changes Actually Come)</h3><p>In real-world systems, architecture evolves due to <strong>4 major types of requirements</strong>:</p><h3>1. 🧩 Business Logic Additions</h3><p><strong>Example:</strong> Add payments, inventory locking, refunds</p><p><strong>Impact:</strong></p><ul><li>Consistency ↑ → Transactions</li><li>Concurrency ↑ → Idempotency + locks</li></ul><p>👉 Leads to: <strong>DB + correctness-heavy design (CP)</strong></p><h3>2. 🔌 New Integrations</h3><p><strong>Example:</strong> Payment gateway, email service, third-party APIs</p><p><strong>Impact:</strong></p><ul><li>Writes ↑</li><li>Async processing required</li></ul><p>👉 Leads to: <strong>Queue + event-driven architecture</strong></p><h3>3. 🔄 New Workflows / Features</h3><p><strong>Example:</strong> Feed generation, notifications, recommendations</p><p><strong>Impact:</strong></p><ul><li>Read-heavy OR write-heavy depending on feature</li><li>Often async</li></ul><p>👉 Leads to:</p><ul><li><strong>Cache (for read-heavy)</strong></li><li><strong>Queue (for async workflows)</strong></li></ul><h3>4. ⚡ Performance Optimization</h3><p><strong>Example:</strong> Reduce latency, improve API response time, handle increased load</p><p><strong>Impact:</strong></p><ul><li>Latency ↓ → CDN + Cache</li><li>Scale ↑ → Sharding / NoSQL</li><li>Concurrency ↑ → Better thread handling, batching</li><li>Hot paths optimized</li></ul><p>👉 Leads to:</p><ul><li><strong>Caching (Redis/CDN)</strong></li><li><strong>Query optimization / indexing</strong></li><li><strong>Read replicas</strong></li><li><strong>Async offloading (queues)</strong></li></ul><h3>🎯 Key Insight</h3><blockquote><em>Most architecture changes are triggered either by </em><strong><em>new functionality</em></strong><em> or by </em><strong><em>performance pain at scale</em></strong><em>.</em></blockquote><h3>🧩 The Layered Mental Model</h3><p>Once you classify axes, you map them to layers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TiuVPmNwg3hk7gKAlcsy-g.png" /></figure><h3>⚡ Layer-by-Layer (Mapped to Axes)</h3><h3>🌍 CDN / Edge Layer</h3><p><strong>Activated when:</strong></p><ul><li>Read-heavy</li><li>High scale</li><li>Low latency requirement</li></ul><p><strong>Handles</strong></p><ul><li>Latency</li><li>Global traffic</li></ul><p><strong>Axis mapping</strong></p><ul><li>Latency ↓ → CDN</li><li>Scale ↑ → CDN</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/1*itXdHdzge5E9DoMPyMxanw.png" /></figure><h3>🚪 API Gateway</h3><p><strong>Activated when:</strong></p><ul><li>Burst / spiky traffic</li><li>High concurrency</li></ul><p><strong>Handles</strong></p><ul><li>Throttling</li><li>Rate limiting</li></ul><p><strong>Axis mapping</strong></p><ul><li>Spikes ↑ → Throttle</li><li>Concurrency ↑ → Limit</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/383/1*3RdT9XVeeQV16yOI4LT4ZA.png" /></figure><h3>🧠 Application Layer</h3><p><strong>Activated when:</strong></p><ul><li>Always (core logic)</li></ul><p><strong>Handles</strong></p><ul><li>Concurrency</li><li>Business logic</li></ul><p><strong>Mechanisms</strong></p><ul><li>Idempotency keys</li><li>Optimistic locking</li><li>Async processing</li></ul><p><strong>Axis mapping</strong></p><ul><li>Concurrency ↑ → Idempotency</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*2htoePLU7bBAYJanyxGZ1Q.png" /></figure><h3>⚡ Cache Layer</h3><p><strong>Activated when:</strong></p><ul><li>Read-heavy</li><li>Medium+ scale</li></ul><p><strong>Handles</strong></p><ul><li>Latency</li><li>Read scaling</li></ul><p><strong>Mechanisms</strong></p><ul><li>TTL</li><li>Request coalescing</li><li>Distributed locks</li></ul><p><strong>Axis mapping</strong></p><ul><li>Reads ↑ → Cache</li><li>Latency ↓ → Cache</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*CwN3IJwLxKNArY42MALUTw.png" /></figure><h3>🔄 Queue / Stream Layer</h3><p><strong>Activated when:</strong></p><ul><li>Write-heavy</li><li>Burst traffic</li><li>High scale</li></ul><p><strong>Handles</strong></p><ul><li>Write buffering</li><li>Resilience</li></ul><p><strong>Mechanisms</strong></p><ul><li>Partitioning</li><li>Retry + DLQ</li><li>Ordering</li></ul><p><strong>Axis mapping</strong></p><ul><li>Writes ↑ → Queue</li><li>Spikes ↑ → Buffer</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*LeNp2NvsgcXd9iSnlhQf6A.png" /></figure><h3>🗄️ Database Layer</h3><p><strong>Activated when:</strong></p><ul><li>Always</li></ul><p><strong>Handles</strong></p><ul><li>Consistency</li><li>Persistence</li></ul><p><strong>Mechanisms</strong></p><ul><li>Transactions</li><li>Locks</li><li>Constraints</li></ul><p><strong>Axis mapping</strong></p><ul><li>Consistency ↑ → DB</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*PHo9zrCjuP-aXu2YeaOfrA.png" /></figure><h3>🔥 Concurrency &amp; Race Conditions (Axis View)</h3><p>When <strong>Concurrency Axis is high</strong>, you must introduce:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5ds1MybVTQsSd6ctbEtjMg.png" /></figure><p>👉 Key idea:</p><blockquote><em>Concurrency is handled across layers, but correctness is enforced at the database.</em></blockquote><h3>📈 Evolution Across Scale Axis</h3><pre>Low       → App + DB<br>Medium    → + Cache<br>High      → + Queue + Sharding<br>Very High → + CDN + Geo + Event-driven</pre><h3>⚖️ CAP Axis Applied</h3><ul><li>Upper layers → AP (fast, scalable)</li><li>Database → CP (correctness)</li></ul><p>👉 Real systems:</p><ul><li>Feeds → AP</li><li>Payments → CP</li></ul><h3>🧩 End-to-End Example (Putting Axes Together)</h3><h3>Flash Sale System</h3><h3>Axes</h3><ul><li>Write-heavy</li><li>Burst traffic</li><li>High scale</li><li>High concurrency</li><li>Strong consistency</li></ul><h3>Design mapping</h3><ul><li>API Gateway → throttling</li><li>Queue → buffer</li><li>App → idempotency</li><li>DB → transaction</li></ul><p>👉 Result:</p><ul><li>No crash</li><li>No oversell</li></ul><h3>🚀 Closing Thought</h3><p>System design becomes more approachable when you stop thinking in tools and start thinking in <strong>axes</strong>.</p><blockquote><strong><em>Axes define the problem. Layers implement the solution.</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0e590fe2a41" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>