<?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 on Tech Blog</title>
    <link>https://yashsachdeva.com/categories/system-design/</link>
    <description>Recent content in System Design on Tech Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <copyright>© 2026 Yash Sachdeva</copyright>
    <lastBuildDate>Sat, 18 Apr 2026 19:55:00 +0530</lastBuildDate><atom:link href="https://yashsachdeva.com/categories/system-design/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Designing a Ride-Hailing System</title>
      <link>https://yashsachdeva.com/posts/designing-a-ride-hailing-system/</link>
      <pubDate>Sat, 18 Apr 2026 19:55:00 +0530</pubDate>
      
      <guid>https://yashsachdeva.com/posts/designing-a-ride-hailing-system/</guid>
      <description>&lt;h2 class=&#34;relative group&#34;&gt;Introduction&#xA;    &lt;div id=&#34;introduction&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#introduction&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h2&gt;&#xA;&lt;p&gt;As part of this post, we will be designing a real-time matching and dispatch system for a ride-hailing platform focusing on geospatial indexing, low-latency matching, streaming data, pricing and consistency trade-offs.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Order Management System</title>
      <link>https://yashsachdeva.com/posts/order-management-system/</link>
      <pubDate>Sat, 11 Apr 2026 10:56:08 +0530</pubDate>
      
      <guid>https://yashsachdeva.com/posts/order-management-system/</guid>
      <description>&lt;p&gt;As part of this post, we&amp;rsquo;ll be covering the design of a modern, production-grade Order Management System (OMS) with a focus on multi-fulfillment, cancellations, refunds, inventory synchronization, and multi-region deployment.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s first start with the requirements.&lt;/p&gt;&#xA;&#xA;&lt;h2 class=&#34;relative group&#34;&gt;Requirements&#xA;    &lt;div id=&#34;requirements&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#requirements&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h2&gt;&#xA;&#xA;&lt;h3 class=&#34;relative group&#34;&gt;Functional Requirements&#xA;    &lt;div id=&#34;functional-requirements&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#functional-requirements&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Core order lifecycle&lt;/strong&gt;: Create order with multiple line items, shipping options, and payment methods.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Order state machine&lt;/strong&gt;: Support states such as PENDING → CONFIRMED → PARTIALLY_FULFILLED → FULFILLED → CANCELLED → REFUNDED.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Split shipments&lt;/strong&gt;: Support split shipments and partial fulfillment when items originate from multiple locations or arrive at different times.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Cancellations&lt;/strong&gt;: Allow customer and system-initiated cancellations in various states (pre-fulfillment, mid-fulfillment) with clear rules.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Refunds&lt;/strong&gt;: Support refunds (full and partial), including multi-payment or mixed-method scenarios (card, wallet, store credit).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Multi-fulfillment&lt;/strong&gt;: Route each line item to an optimal fulfillment node (warehouse, store, 3PL, marketplace drop-shipper).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Multiple shipments&lt;/strong&gt;: Track multiple shipments per order with independent tracking IDs and statuses.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Backorders and preorders&lt;/strong&gt;: Support delayed fulfillment while the order remains active.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Inventory and payments&lt;/strong&gt;: Reserve inventory atomically as part of the order creation saga; release on failure or cancellation.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Inventory sync&lt;/strong&gt;: Prevent overselling across channels with near real-time inventory sync and event-driven updates.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Payment gateways&lt;/strong&gt;: Integrate with one or more payment gateways for authorization, capture, and refund.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Multi-channel and integrations&lt;/strong&gt;: Receive orders from internal checkout, marketplaces, and POS; normalize into a canonical order model.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Fulfillment updates&lt;/strong&gt;: Push fulfillment updates and cancellations back to channels and customer notification systems.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Multi-region deployment&lt;/strong&gt;: Deploy OMS in multiple regions, each with a full stack of services fronted by a global load balancer.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Data synchronization&lt;/strong&gt;: Keep critical data (orders, payments, inventory) synchronized across regions using a mix of strong and eventual consistency depending on domain constraints.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3 class=&#34;relative group&#34;&gt;Non-Functional Requirements&#xA;    &lt;div id=&#34;non-functional-requirements&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#non-functional-requirements&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;High Availability and resilience&lt;/strong&gt;: One failure in a downstream flow should not take down the entire order flow.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Scalability&lt;/strong&gt;: Capable of handling peak events such as flash sales and promotions.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Consistency&lt;/strong&gt;: Clear consistency model for orders and inventory (strong vs eventual consistency).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Observability&lt;/strong&gt;: Comprehensive logging, monitoring, and tracing.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Extensibility&lt;/strong&gt;: Easy to add new fulfillment types, payment methods, or regions without major rewrites.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2 class=&#34;relative group&#34;&gt;High Level Design&#xA;    &lt;div id=&#34;high-level-design&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#high-level-design&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h2&gt;&#xA;&lt;img src=&#34;oms_component_diagram.png&#34; alt=&#34;OMS Component Diagram&#34; max-width=&#34;100%&#34; height=&#34;auto&#34;/&gt;&#xA;&#xA;&lt;h3 class=&#34;relative group&#34;&gt;Order Lifecycle and Domain Model&#xA;    &lt;div id=&#34;order-lifecycle-and-domain-model&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#order-lifecycle-and-domain-model&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h3&gt;&#xA;&#xA;&lt;h4 class=&#34;relative group&#34;&gt;Order Lifecycle Stages&#xA;    &lt;div id=&#34;order-lifecycle-stages&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#order-lifecycle-stages&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h4&gt;&#xA;&lt;p&gt;A typical e-commerce order lifecycle contains the following high-level stages:&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Mobile Wallet Payment System</title>
      <link>https://yashsachdeva.com/posts/mobile-wallet-payment-system/</link>
      <pubDate>Thu, 09 Apr 2026 19:39:08 +0530</pubDate>
      
      <guid>https://yashsachdeva.com/posts/mobile-wallet-payment-system/</guid>
      <description>&lt;p&gt;As part of this post, we&amp;rsquo;ll be covering the design of a mobile wallet payment system that supports -&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Top-ups (add money to wallet from bank/card)&lt;/li&gt;&#xA;&lt;li&gt;P2P transfers (wallet -&amp;gt; wallet)&lt;/li&gt;&#xA;&lt;li&gt;Basic fraud detection&lt;/li&gt;&#xA;&lt;li&gt;Concurrency with clear trade-offs between strong and eventual consistency at scale.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s start with a basic design and then we can scale it up.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Designing Product Search</title>
      <link>https://yashsachdeva.com/posts/designing-product-search/</link>
      <pubDate>Sat, 04 Apr 2026 06:00:20 +0530</pubDate>
      
      <guid>https://yashsachdeva.com/posts/designing-product-search/</guid>
      <description>&lt;h2 class=&#34;relative group&#34;&gt;Introduction&#xA;    &lt;div id=&#34;introduction&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#introduction&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Search is often the primary way users find products on e-commerce platforms. A high-quality search system shouldn&amp;rsquo;t only be fast and resilient but also highly relevant.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>High-Concurrency Flash Sale Systems</title>
      <link>https://yashsachdeva.com/posts/high-concurrency-flash-sale-systems/</link>
      <pubDate>Thu, 02 Apr 2026 10:12:19 +0530</pubDate>
      
      <guid>https://yashsachdeva.com/posts/high-concurrency-flash-sale-systems/</guid>
      <description>&lt;h2 class=&#34;relative group&#34;&gt;Introduction&#xA;    &lt;div id=&#34;introduction&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#introduction&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h2&gt;&#xA;&lt;p&gt;A High Concurrency flash sale system is a system that is designed to handle a large number of concurrent users who are trying to purchase a limited number of items in a short period of time.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Load Balancers and Consistent Hashing</title>
      <link>https://yashsachdeva.com/posts/load-balancers-and-consistent-hashing/</link>
      <pubDate>Sun, 29 Mar 2026 12:57:32 +0530</pubDate>
      
      <guid>https://yashsachdeva.com/posts/load-balancers-and-consistent-hashing/</guid>
      <description>&lt;p&gt;Imagine a small app where each client talks directly to a specific server, say &lt;code&gt;https://10.0.0.1:8080&lt;/code&gt;. As traffic grows, that one server becomes a bottleneck, and if it crashes, the whole app is effectively down for any client pointing at it.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>How to Cache?</title>
      <link>https://yashsachdeva.com/posts/how-to-cache/</link>
      <pubDate>Sat, 28 Mar 2026 08:42:23 +0530</pubDate>
      
      <guid>https://yashsachdeva.com/posts/how-to-cache/</guid>
      <description>&lt;p&gt;Modern APIs frequently access databases, or complex business logic that introduce significant latency and consume CPU and I/O resources. Without caching, every request pays the full cost of database queries, network calls, and computation. This can lead to slow response times and poor scalability as traffic  increases.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>The Anatomy of a Distributed Message Broker</title>
      <link>https://yashsachdeva.com/posts/the-anatomy-of-a-distributed-message-broker/</link>
      <pubDate>Wed, 25 Mar 2026 22:04:33 +0530</pubDate>
      
      <guid>https://yashsachdeva.com/posts/the-anatomy-of-a-distributed-message-broker/</guid>
      <description>&lt;h2 class=&#34;relative group&#34;&gt;Introduction&#xA;    &lt;div id=&#34;introduction&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#introduction&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Distributed message brokers are the backbone of modern microservices architectures, enabling asynchronous communication, decoupling services, and providing a reliable way to handle data streams at scale.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Rate Limiters</title>
      <link>https://yashsachdeva.com/posts/rate-limiters/</link>
      <pubDate>Tue, 24 Mar 2026 20:49:12 +0530</pubDate>
      
      <guid>https://yashsachdeva.com/posts/rate-limiters/</guid>
      <description>&lt;h2 class=&#34;relative group&#34;&gt;Life Without a Rate Limiter&#xA;    &lt;div id=&#34;life-without-a-rate-limiter&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#life-without-a-rate-limiter&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Imagine a public web API that allows clients to fetch user data without any rate limiting. Under normal conditions this might work, but during traffic spikes or abuse (e.g., bots or scrapers) the backend can be overwhelmed, leading to resource exhaustion, cascading failures, and poor availability for legitimate users. Without any form of control, a single noisy neighbor can starve others, increase infrastructure costs, and make it difficult to meet SLAs.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>System Design: The Path to API Gateway</title>
      <link>https://yashsachdeva.com/posts/system-design-the-path-to-api-gateway/</link>
      <pubDate>Sun, 08 Mar 2026 11:34:00 +0530</pubDate>
      
      <guid>https://yashsachdeva.com/posts/system-design-the-path-to-api-gateway/</guid>
      <description>&lt;div class=&#34;lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl&#34;&gt;&#xA;  Every great architecture starts simple. But as we scale from a single monolith to a swarm of microservices, we hit a wall that only one pattern can break: the &lt;strong&gt;API Gateway&lt;/strong&gt;.&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;&lt;h2 class=&#34;relative group&#34;&gt;Phase 1: The Blissful Monolith&#xA;    &lt;div id=&#34;phase-1-the-blissful-monolith&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#phase-1-the-blissful-monolith&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;em&gt;You have one server, one database, and one endpoint. Everything is easy:&lt;/em&gt;&lt;/p&gt;</description>
      
    </item>
    
  </channel>
</rss>
