<?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 Shailesh Mishra on Medium]]></title>
        <description><![CDATA[Stories by Shailesh Mishra on Medium]]></description>
        <link>https://medium.com/@ishaileshmishra?source=rss-e005b50ab875------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ync_35VNLE4yiZZNsf4eiQ.png</url>
            <title>Stories by Shailesh Mishra on Medium</title>
            <link>https://medium.com/@ishaileshmishra?source=rss-e005b50ab875------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 09:36:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ishaileshmishra/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[Latency, Throughput, and Why p99 Is the Only Number That Matters]]></title>
            <link>https://ishaileshmishra.medium.com/latency-throughput-and-why-p99-is-the-only-number-that-matters-b05865e84cb8?source=rss-e005b50ab875------2</link>
            <guid isPermaLink="false">https://medium.com/p/b05865e84cb8</guid>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[performance]]></category>
            <dc:creator><![CDATA[Shailesh Mishra]]></dc:creator>
            <pubDate>Thu, 13 Aug 2026 12:18:03 GMT</pubDate>
            <atom:updated>2026-08-13T12:18:03.196Z</atom:updated>
            <content:encoded><![CDATA[<h3>Your dashboard says 100 ms. Three customers in every hundred are waiting 1.4 seconds. Both numbers are true at the same time.</h3><p>Nine support tickets say the app is slow.</p><p>You open the dashboard. Average response time: 100 ms. Requests per second: normal. Error rate: zero. Every graph is flat and green.</p><p>So you ask the reporters for steps to reproduce. Nobody replies with anything useful, and you close the tickets.</p><p>Three weeks later the same complaint arrives from your largest customer, with a screen recording attached. The recording shows a page taking four seconds to load. Your dashboard, for that same minute, still says 100 ms.</p><p>The dashboard was not lying. It was answering a question you did not ask. You asked <em>“is this system fast?”</em> It answered <em>“what is the arithmetic mean of every response in the last hour?”</em> Those are different questions, and the distance between them is where slow systems hide.</p><p>This is the first post in the series, so it assumes nothing. Everything later leans on it, because every claim in system design eventually reduces to a number measured in milliseconds.</p><h3>One counter, three questions</h3><figure><img alt="A queue of customers at a single coffee counter. Callout 1 marks one waiting customer as latency. Callout 2 marks the drinks leaving the counter as throughput. Callout 3 marks the last customer in the queue as p99, the unluckiest customer in a hundred." src="https://cdn-images-1.medium.com/max/1024/1*quHrmMdE_TVSX-39vacIJw.png" /><figcaption>One counter. Three different questions you can ask about it.</figcaption></figure><p>A coffee counter with one barista. A hundred customers arrive. There are three separate things you might want to know, and people routinely mix up the first two.</p><p><strong>① Latency</strong> is how long <strong>one</strong> customer waits, from joining the queue to holding a cup. It is a property of a single request, measured in milliseconds.</p><p><strong>② Throughput</strong> is how many drinks leave the counter per hour. It is a property of the whole system, measured in requests per second.</p><p><strong>③ p99</strong> is the wait time of the unluckiest customer in a hundred. Sort all hundred waits from shortest to longest and read the 99th. One customer in every hundred waits at least that long.</p><p>Here is the part worth holding onto: <strong>hiring a second barista raises throughput and does nothing for the customer already standing in the queue.</strong> Their wait was set the moment they joined. Latency and throughput move independently. That is exactly why one can look healthy while the other is not.</p><p>They are not unrelated, though. Little’s Law ties them together:</p><pre>concurrency = throughput x latency</pre><p>If you serve 500 requests per second and each takes 200 ms, then 100 requests are in flight at any moment. That number is what your thread pools, connection limits, and memory have to accommodate. Change either input and the requirement changes with it.</p><h3>The average is the wrong tool for this job</h3><figure><img alt="Chart of latency for 100 requests sorted fastest to slowest, for two services. Service A rises smoothly to a p99 of 160 milliseconds. Service B stays flat at 60 milliseconds until the 97th percentile, then jumps to 1,400 milliseconds. A dashed line marks the shared average of 100 milliseconds." src="https://cdn-images-1.medium.com/max/1024/1*Z1ypq_LLFJ1U0urYZJTiHg.png" /><figcaption>Both services average exactly 100 ms. One of them is fine and one of them is broken.</figcaption></figure><p>Two services. Both average 100 ms. Watch what the average cannot see.</p><p><strong>Service A</strong> is well behaved. Its slowest requests take 160 ms. Nobody notices.</p><p><strong>Service B</strong> answers 97 requests out of 100 in 60 ms — faster than A — and then takes <strong>1.4 seconds</strong> for the other three. That is nearly nine times A’s worst case, and roughly twenty times B’s own median.</p><p>Both average 100 ms. The mean is arithmetically correct and practically useless.</p><p>The reason is structural, not bad luck. Latency distributions are <strong>right-skewed</strong>: there is a hard floor near zero and no ceiling at all. A request cannot take negative time, but it can take thirty seconds. So a handful of very slow requests drag the mean upward a little while hiding completely inside it. The mean has no way to report the shape it came from.</p><p>This is why the median is not enough either. B’s median is 60 ms, which looks <em>better</em> than A’s. Both summary numbers describe B as the faster service. Its users disagree.</p><p>Percentiles fix this because they describe position rather than magnitude. <strong>p99 = 1,400 ms</strong> means one request in a hundred took at least 1.4 seconds. That statement survives contact with the distribution.</p><h3>What these numbers are actually worth</h3><figure><img alt="A logarithmic scale from 1 nanosecond to 100 milliseconds with six markers: L1 cache about 1 nanosecond, main memory about 100 nanoseconds, NVMe SSD read about 50 microseconds, same datacentre about 0.5 milliseconds, US East to US East 2 at 8 milliseconds, and US East to London at 78 milliseconds, noting the 55 millisecond floor set by the speed of light in fibre." src="https://cdn-images-1.medium.com/max/1024/1*jWeIjdPIjrohDN1682dICg.png" /><figcaption>A logarithmic scale. Every step to the right is ten times slower.</figcaption></figure><p>Percentiles only mean something if you know what a millisecond buys. The scale above spans eight orders of magnitude, so the gaps are larger than intuition suggests.</p><p>Main memory sits about <strong>800,000 times closer</strong> than London. Not eight times. Not eight hundred.</p><p>Two of those figures are measured rather than approximate. Microsoft publishes round-trip times across its own backbone. <strong>East US to UK South is 78 ms.</strong> <strong>East US to East US 2 is 8 ms.</strong> Both are median values over the 30 days ending 30 July 2026.</p><p>The last one is worth sitting with. It is the only number here that no engineering decision can change. London to New York is roughly 5,600 km. Light in fibre travels at about 204,000 km/s — around two thirds of its speed in vacuum, because glass slows it down. So the round trip cannot beat <strong>55 ms</strong>, ever. The measured 78 ms is that floor plus real routing.</p><p>Your framework did not cause that. Your database did not cause it. Put a transatlantic round trip inside a user-facing request and you have bought 78 ms. No amount of profiling will refund it.</p><h3>The part that catches people out: p99 stops being rare</h3><figure><img alt="Chart of the probability that a user request is slow, plotted against the number of services the request touches. At 1 service the chance is 1 percent. At 10 services it is 10 percent. At 50 it is 39 percent. At 100 it is 63 percent." src="https://cdn-images-1.medium.com/max/1024/1*12WofaN9yqHYmvjMPqx8Fw.png" /><figcaption>One user request that calls N services, where each service is slow for 1 request in 100.</figcaption></figure><p>“One request in a hundred” sounds tolerable. It stops being tolerable the moment a single user action touches more than one service.</p><p>Say each service is slow for 1 request in 100, and a user’s request has to wait for all of them. The chance that <strong>at least one</strong> is slow is 1 - 0.99^N:</p><pre>1 service    -&gt;   1%<br>10 services  -&gt;  10%<br>50 services  -&gt;  39%<br>100 services -&gt;  63%</pre><p>At a fan-out of 100, <strong>the 1-in-100 case is what most of your users get.</strong> The rare event has become the common one, and no individual service got slower.</p><p>Jeff Dean and Luiz André Barroso reported this same figure in <em>The Tail at Scale</em>. Give each server a 99th-percentile latency of one second. A request touching 100 servers then leaves 63% of users waiting longer than a second.</p><p>This is the number that turns tail latency from a monitoring preference into an architectural constraint. Every service you add to a request path multiplies your exposure to every other service’s worst day.</p><h3>What chasing the tail costs you</h3><p>Tail latency is not free to fix, and three of the bills surprise people.</p><p><strong>You cannot average percentiles.</strong> Ten servers each report a p99. The mean of those ten numbers is not the fleet p99. It is not any real quantity at all, because percentiles are not additive. A correct fleet-wide p99 needs a latency <strong>histogram</strong> from each host — a count of requests per latency bucket — merged centrally. Store pre-computed averages per host instead and the tail is gone before you ever query it.</p><p><strong>You have to buy headroom.</strong> Queues grow non-linearly as a server approaches saturation, and the tail feels it long before throughput does. A box at 85% CPU can hold steady average latency while its p99 doubles. Protecting the tail means running at lower utilisation. In practice that means paying for machines that look idle.</p><p><strong>Redundant work is a real remedy with a real price.</strong> Dean and Barroso’s own mitigation is a second copy of the request, sent to a different server. It goes out only once the first copy misses a short deadline. You take whichever answer arrives first. It cuts the tail meaningfully. It also raises total load, so you are trading capacity for predictability — not getting predictability free.</p><h3>What to do about it on Monday</h3><ul><li><strong>Write your latency target on p99, never on the average.</strong> “p99 under 300 ms” is a commitment. “Average under 300 ms” permits Service B.</li><li><strong>Track p50, p99 and p99.9 together.</strong> p50 tells you the normal experience, p99 tells you the bad one, p99.9 tells you whether the bad one has a cliff behind it.</li><li><strong>Store histograms, not averages.</strong> This is a decision you can only make before the data is collected.</li><li><strong>Count your fan-out.</strong> If a request touches N services, your user-visible tail is roughly 1 - (1 - p)^N. Write that number down; it is usually worse than the team expects.</li><li><strong>Alert on p99 rising while throughput stays flat.</strong> That combination means queueing, and it is the earliest honest signal you get.</li></ul><p>If you take one sentence: <strong>the average tells you about your servers, and p99 tells you about your users.</strong></p><h3>What this post deliberately leaves out</h3><p>I have not explained <em>why</em> tails happen — garbage collection pauses, noisy neighbours, lock contention, disk queues. That needs a picture of what a single machine actually runs out of. Post 03 covers it.</p><p><strong>Next:</strong> <em>Everything Fails — What Actually Breaks, and How Often.</em> Before we scale anything, it is worth being precise about what we are defending against.</p><h3>Sources</h3><p>Round-trip latency figures: <a href="https://learn.microsoft.com/en-us/azure/networking/azure-network-latency">Azure network round-trip latency statistics</a>, median values for the 30 days ending 30 July 2026.</p><p>Fan-out and tail amplification: Jeff Dean and Luiz André Barroso, <a href="https://cacm.acm.org/research/the-tail-at-scale/">The Tail at Scale</a>, Communications of the ACM, 2013.</p><p>The 55 ms transatlantic floor is computed from a 5,600 km great-circle distance and a fibre propagation speed of roughly 204,000 km/s. Cache, memory and SSD figures are order-of-magnitude approximations and are marked with a tilde.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b05865e84cb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pin or Caret? A Mental Model for package.json Versions]]></title>
            <link>https://ishaileshmishra.medium.com/pin-or-caret-a-mental-model-for-package-json-versions-6f43e5b36713?source=rss-e005b50ab875------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f43e5b36713</guid>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[dependency-management]]></category>
            <dc:creator><![CDATA[Shailesh Mishra]]></dc:creator>
            <pubDate>Thu, 13 Aug 2026 07:22:22 GMT</pubDate>
            <atom:updated>2026-08-13T07:22:22.972Z</atom:updated>
            <content:encoded><![CDATA[<h3>&quot;husky&quot;: &quot;9.0.11&quot; and &quot;husky&quot;: &quot;^9.1.7&quot; install the same thing today. They fail differently next Tuesday.</h3><p>Every code review I’ve been in eventually produces this comment: <em>“why is this pinned?”</em> Or its twin: <em>“shouldn’t we pin this?”</em> And the discussion that follows is almost always people talking past each other, because they’re using the same two symbols to argue about three different problems.</p><p>So let’s fix the mental model first. Once the model is right, the answer for any given dependency takes about four seconds.</p><h3>The one idea: a contract and a receipt</h3><p><strong>package.json is a contract. The lockfile is a receipt.</strong></p><p>The contract states what versions you are <em>willing to accept</em>. The receipt records what you <em>actually got</em>, down to the last transitive dependency, with an integrity hash.</p><p>Almost every confusion about pinning comes from mistaking the contract for the receipt. When you write &quot;husky&quot;: &quot;9.0.11&quot;, it feels like you&#39;re saying &quot;install exactly this.&quot; You&#39;re not. You&#39;re saying &quot;I will accept exactly this.&quot; The thing that determines what actually lands in node_modules is the lockfile.</p><p>Hold onto that. The rest follows from it.</p><h3>The contract, drawn as a number line</h3><p>Three range operators cover 95% of real package.json files. Read the middle column as the set of versions each one will accept:</p><pre>pin    &quot;9.0.11&quot;  ●                = 9.0.11 exactly<br>tilde  &quot;~9.1.7&quot;  [●━━)            &gt;=9.1.7  &lt;9.2.0<br>caret  &quot;^9.1.7&quot;  [●━━━━━━━━━━━━)  &gt;=9.1.7  &lt;10.0.0</pre><p>That’s the whole syntax argument. The interesting part is what each one <em>means</em>:</p><p><strong>Caret says:</strong> “I trust this maintainer’s promise that a minor bump won’t break me.”</p><p><strong>Pin says:</strong> “I trust nobody. Give me the exact bytes I tested against.”</p><p>Semantic versioning is a <em>social contract</em>, not a technical guarantee. MAJOR.MINOR.PATCH promises that breaking changes only arrive in MAJOR. Nothing in npm enforces that. Caret is you betting on the maintainer&#39;s discipline. Pin is you declining the bet.</p><h3>When does the choice actually matter?</h3><p>This is the part most engineers get wrong, and it’s the reason those code review threads go nowhere.</p><p><strong>If your lockfile is committed, pin and caret install identically.</strong> Same bytes, same tree, for every teammate and every CI run. The width of your range is invisible.</p><p>The width only becomes visible at four moments:</p><p><strong>1. A fresh resolution.</strong> Someone runs npm install &lt;pkg&gt;, or the lock entry is missing, or a new machine installs from an incomplete lockfile. Now the range is consulted and caret drifts forward.</p><p><strong>2. </strong><strong>npm update.</strong> Caret moves. Pin doesn&#39;t. This is the operator working exactly as designed.</p><p><strong>3. Lockfile regeneration.</strong> Merge conflict in package-lock.json, someone deletes it and reinstalls, a migration between package managers. The contract is re-read from scratch.</p><p><strong>4. Your package is consumed as a library.</strong> This is the big one. When someone installs <em>your</em> package from npm, <strong>your lockfile is completely ignored.</strong> Only your declared ranges are honoured. Your receipt is yours alone; your contract is what the world sees.</p><p>If you can’t name which of those four moments you’re worried about, you’re not actually having a versioning argument — you’re having an aesthetics argument.</p><h3>The axis that decides it: library or application?</h3><p>Forget “pinning is safer.” That’s not the axis. The axis is <em>who resolves your dependencies</em>.</p><p><strong>If you’re publishing a library to npm, use caret.</strong> Your consumer’s package manager needs room to deduplicate. If you pin react@18.2.0 and another library pins react@18.3.1, the resolver either installs two copies of React into one app or hands your user a conflict they cannot resolve without overrides. Pinning in a published library isn&#39;t cautious — it&#39;s antisocial. You&#39;re exporting your paranoia into every downstream tree.</p><p><strong>If you’re building an application or service, the lockfile is already doing the reproducibility work.</strong> Pin vs caret here only controls <em>how fast you drift when the lockfile is regenerated</em>. Both are defensible. What isn’t defensible is pinning everything and then feeling safe, which brings us to the traps.</p><h3>Trap 1: pinning gives an illusion of safety</h3><p>You pin husky to 9.0.11. Husky&#39;s own dependencies are still declared as ranges. So are their dependencies. Your tree can still shift underneath you on the next fresh resolution.</p><p>Pinning one line in package.json is putting a fence around one plant in an open field. <strong>Only the lockfile pins the whole tree.</strong> If reproducible builds are your actual goal, the lockfile is the mechanism, and pinning direct dependencies adds approximately nothing on top of it.</p><p>This is worth internalising because it kills the most common argument for pinning outright. “We pin for reproducibility” is usually a sentence said by a team that already has a committed lockfile and doesn’t realise it already won.</p><h3>Trap 2: caret behaves differently below 1.0</h3><p>^0.2.3 does <strong>not</strong> mean &gt;=0.2.3 &lt;1.0.0. It means &gt;=0.2.3 &lt;0.3.0.</p><p>And ^0.0.3 means exactly 0.0.3 — nothing else.</p><p>This is deliberate. Semver treats pre-1.0 packages as having made no stability promise at all, so for 0.x versions the minor slot is treated as breaking and caret quietly degrades into tilde. If you&#39;ve ever wondered why a 0.x dependency never seems to update, this is why.</p><h3>The husky case study</h3><p>Now the specific example, because husky is a genuinely good illustration rather than a hypothetical.</p><p>Husky is a devDependency. It installs git hooks. It never ships to production, and no line of your application code imports it. So the library concern doesn&#39;t apply at all — this is purely a question of how much surprise you want in your dev tooling.</p><p>And husky is a case where the surprise was real. <strong>Husky 9.1 deprecated the </strong><strong>husky install command</strong> in favour of calling husky directly. Version 9.1.7 is the current release, so a caret range resolves there today.</p><p>Which means: if your prepare script says &quot;husky install&quot; and your contract says &quot;^9.0.11&quot;, then the next fresh resolution silently moves you onto 9.1.x and every single npm install your team runs starts printing a deprecation warning. Nothing breaks. Nothing fails loudly. You just accumulate noise that somebody eventually spends an afternoon bisecting.</p><p>Pinned at 9.0.11, that never happens — until you deliberately upgrade, read the release notes, and change the prepare script in the same commit.</p><p>That’s the actual tradeoff, and notice how small it is. It isn’t “safety vs. recklessness.” It’s “when do I want to read the release notes: on my schedule, or on npm’s?”</p><h3>What I’d actually put in a repo</h3><p><strong>Tooling that gates your commits — husky, lint-staged, commitlint, simple-git-hooks: pin them.</strong> A silent minor bump that breaks a pre-commit hook blocks the entire team, and you gain nothing measurable from being on 9.1 two hours earlier than you would have been.</p><p><strong>Everything else in an application: caret, lockfile committed, and a bot.</strong> Renovate or Dependabot opening upgrade PRs is the part that actually matters. Then upgrades become deliberate events with a diff someone reads and CI someone watches — instead of accidents that happen to whoever ran npm install last.</p><p><strong>Anything you publish to npm: caret. Always.</strong> Let your consumers deduplicate.</p><h3>The reframe worth taking away</h3><p>Here’s the sentence I wish someone had told me years earlier:</p><blockquote><em>Caret does not mean “stay up to date.” It means “allow drift at unpredictable moments.” Renovate means “stay up to date.”</em></blockquote><p>Those are completely different properties, and most teams pick caret while wanting the second one. Once you have a bot proposing upgrades as reviewable pull requests, the caret in your package.json is doing far less work than you think — and the pin costs you far less than you feared.</p><p>Pick your ranges based on which of the four resolution moments you’re defending against. If you can’t name one, you don’t have a problem to solve, and you should go review something that matters instead.</p><p><em>One last footnote, because I’ve seen this in a real diff: if both </em><em>&quot;husky&quot;: &quot;9.0.11&quot; and </em><em>&quot;husky&quot;: &quot;^9.1.7&quot; somehow end up in the same </em><em>package.json, that&#39;s duplicate JSON keys. It isn&#39;t an error. The last one silently wins, and nothing anywhere tells you.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f43e5b36713" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[System design series]]></title>
            <link>https://ishaileshmishra.medium.com/system-design-series-687fdd4258d4?source=rss-e005b50ab875------2</link>
            <guid isPermaLink="false">https://medium.com/p/687fdd4258d4</guid>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[database-sharding]]></category>
            <dc:creator><![CDATA[Shailesh Mishra]]></dc:creator>
            <pubDate>Tue, 19 May 2026 10:27:06 GMT</pubDate>
            <atom:updated>2026-08-26T11:45:19.297Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>#5 Database Sharding: Breaking the Data Monolith</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JIAGfGszCLMPDdR9EgQdlQ.png" /></figure><h3>Database Sharding: Breaking the Data Monolith</h3><p>When your application reaches a massive scale, even the most powerful database server in the world will eventually run out of steam. You can upgrade the hardware (Vertical Scaling) all you want, but there’s a physical limit to what one machine can handle.</p><p>Enter <strong>Database Sharding</strong>. Sharding is the ultimate <em>divide and conquer</em> strategy for data. It involves breaking a large dataset into smaller, more manageable chunks called <strong>Shards</strong> and spreading them across multiple servers.</p><h3>The Secret Sauce: The Partition Key</h3><p>To shard effectively, you need a <strong>Partition Key</strong> (or Shard Key). This is a specific field in your data — like User_ID, Postal_Code, or Tenant_ID—that determines which shard a piece of data lives on.</p><ul><li><strong>How it works:</strong> When a request comes in, a <strong>Routing Layer</strong> looks at the Partition Key. If you use User_ID % 3, then User 10 goes to Shard 1, User 11 to Shard 2, and so on.</li><li><strong>The Goal:</strong> To ensure that data is distributed evenly across all servers so no single machine gets overwhelmed.</li></ul><h3>The “Hotspot” Problem</h3><p>Sharding isn’t magic; it requires careful planning. If you choose a poor Partition Key, you end up with <strong>Hotspots</strong>.</p><p>Imagine sharding by “Country” and having 90% of your users in the USA. One shard will be melting under the heat of constant traffic, while the other shards sit idle. A senior architect’s job is to pick a key that ensures a “Uniform Distribution” of traffic and storage.</p><h3>The Complexity Tax</h3><p>Sharding is often considered the “nuclear option” because of the complexity it introduces:</p><ol><li><strong>Cross-Shard Joins:</strong> If you need to combine data from Shard A and Shard B, your query becomes significantly slower and more complex.</li><li><strong>Resharding:</strong> If your shards get too full and you need to add a fourth shard, moving terabytes of data while the system is live is a high-wire balancing act.</li><li><strong>Distributed Transactions:</strong> Ensuring data consistency across multiple physical databases is much harder than doing it on one.</li></ol><h3>When Should You Shard?</h3><p>Don’t shard until you absolutely have to. Most applications can get remarkably far with <strong>Read Replicas</strong> and <strong>Vertical Scaling</strong>. You should only consider sharding when:</p><ul><li>Your write volume exceeds what a single primary database can handle.</li><li>Your dataset is so large it no longer fits on a single disk.</li><li>You need to physically store data in specific geographic regions for legal/compliance reasons.</li></ul><h3>Summary</h3><p>Sharding turns your database into a horizontally scalable powerhouse. It removes the “hardware ceiling” and allows your data layer to grow as fast as your user base. Just remember: with great power comes great architectural responsibility.</p><p><strong>Have you ever had to migrate a live database into a sharded architecture? Share your horror stories (or successes) below!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=687fdd4258d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[System Design Series]]></title>
            <link>https://ishaileshmishra.medium.com/system-design-series-d0bf19781505?source=rss-e005b50ab875------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0bf19781505</guid>
            <category><![CDATA[replication]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[systems-thinking]]></category>
            <dc:creator><![CDATA[Shailesh Mishra]]></dc:creator>
            <pubDate>Sun, 17 May 2026 19:00:46 GMT</pubDate>
            <atom:updated>2026-05-17T19:00:46.554Z</atom:updated>
            <content:encoded><![CDATA[<h4>#4 Understanding replication in distributed system | Data Resilience: Database Replication Made Simple</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ecQtcWMMtLjWQ8udNEwN0g.png" /></figure><h3>Why It Matters</h3><p>One database = one point of failure. A single power cut or hardware crash can wipe everything. <strong>Replication</strong> means keeping copies of your data on multiple servers — so if one goes down, others keep running.</p><h3>How It Works: Primary + Replicas</h3><p>Think of it like a head office and branch offices.</p><p>Role Job <strong>Primary</strong> Handles all writes (create, update, delete). The single source of truth. <strong>Replicas</strong> Handle all reads (fetch profile, load product list, etc.). They share the load.</p><p><strong>Why split reads and writes?</strong> Because most apps read far more than they write. Replicas absorb that traffic so the Primary stays fast.</p><h3>Sync vs. Async Replication</h3><p>This is the biggest decision. <em>When</em> does data get copied to replicas?</p><h3>Synchronous — “Wait for confirmation”</h3><blockquote><em>Primary writes → waits for replica to confirm → tells user “Done”</em></blockquote><ul><li>✅ Zero data loss. Replica always matches Primary.</li><li>❌ Slower. User waits for two servers to sync before getting a response.</li></ul><p><strong>Use when:</strong> Data accuracy is non-negotiable (banking, medical records).</p><h3>Asynchronous — “Fire and forget”</h3><blockquote><em>Primary writes → tells user “Done” → sends update to replica in the background</em></blockquote><ul><li>✅ Very fast. User gets instant response.</li><li>❌ Small lag (milliseconds to seconds) where replicas serve slightly stale data. If Primary crashes before syncing, that data is <strong>gone</strong>.</li></ul><p><strong>Use when:</strong> Speed matters more than perfect consistency (social feeds, product listings).</p><h3>What Happens When the Primary Dies? (Failover)</h3><p>Servers constantly ping each other via a <strong>heartbeat signal</strong>. If the Primary goes silent:</p><ol><li>A replica gets <strong>promoted</strong> to Primary</li><li>All traffic is rerouted to it</li><li>Old Primary gets repaired and rejoins as a replica</li></ol><p>The system heals itself — with minimal downtime.</p><h3>Replication Lag: The Hidden Trap</h3><p>With async replication, replicas can fall slightly behind. This causes a sneaky bug:</p><blockquote><em>User updates their profile → refreshes the page → sees the </em>old<em> data</em></blockquote><p>Why? The read hit a replica that hadn’t caught up yet.</p><p><strong>The fix:</strong> Design your app to accept <strong>eventual consistency</strong> — the understanding that all replicas <em>will</em> match the Primary, just not instantly.</p><h3>The Core Trade-off</h3><p>Priority Choose Data accuracy (no stale reads) <strong>Synchronous</strong> replication Speed &amp; scale <strong>Asynchronous</strong> replication</p><p>Most modern web apps go <strong>async</strong> — accepting a few milliseconds of lag for a smooth, fast user experience.</p><p><em>The goal of replication isn’t just performance — it’s survival. Fast systems that can’t recover from failure aren’t production-ready.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0bf19781505" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding replication in distributed System]]></title>
            <link>https://ishaileshmishra.medium.com/understanding-replication-in-distributed-system-062236ed220e?source=rss-e005b50ab875------2</link>
            <guid isPermaLink="false">https://medium.com/p/062236ed220e</guid>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[systems-thinking]]></category>
            <category><![CDATA[replication]]></category>
            <dc:creator><![CDATA[Shailesh Mishra]]></dc:creator>
            <pubDate>Fri, 15 May 2026 06:28:19 GMT</pubDate>
            <atom:updated>2026-05-15T06:28:19.956Z</atom:updated>
            <content:encoded><![CDATA[<h4>#4 <strong>Data Resilience: The Power of Database Replication</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ecQtcWMMtLjWQ8udNEwN0g.png" /></figure><h4>Data Resilience: Understanding Database Replication</h4><p>In distributed systems, data is one of the most important parts of the application. If your entire system depends on a single database server, even a small hardware failure or outage can bring everything down.</p><p>This is where Database Replication helps.</p><p>Replication means keeping multiple copies of the same data on different database servers. This improves:</p><blockquote>Reliability, Availability, Performance, Disaster recovery</blockquote><blockquote><strong>Primary-Replica Architecture:</strong></blockquote><blockquote>A common replication setup contains: One Primary database and Multiple Replica databases</blockquote><blockquote><strong>Primary Database: </strong>The Primary handles all write operations such as:</blockquote><blockquote>Creating data, Updating data and Deleting data</blockquote><blockquote>It acts as the main source of truth.</blockquote><h4><strong>Replica Databases:</strong></h4><p>Replicas mainly handle read operations.</p><p><strong>Example:</strong></p><ul><li><em>Viewing user profile</em></li><li><em>Loading products</em></li><li><em>Reading dashboard data</em></li></ul><p><em>This reduces pressure on the Primary database and helps the system handle more traffic.</em></p><blockquote>Example:<br>Users -&gt; Load Balancer -&gt;Read Replicas -&gt; Primary Database (Writes)</blockquote><h4>Synchronous vs Asynchronous Replication</h4><p>One important decision in replication is: When should replicas receive the updated data?</p><p><em>There are two common approaches.</em></p><p>— -</p><h4>1. Synchronous Replication</h4><p>In synchronous replication, the Primary waits for the Replica to confirm the data update before responding with success.</p><blockquote>Example:<br>Write Request → Primary DB → Replica DB Confirmation → Success Response</blockquote><p><strong>Benefits</strong></p><ul><li>Strong consistency</li><li>Very low chance of data loss</li><li>Replicas always stay updated</li></ul><p><strong>Drawbacks</strong></p><ul><li>Slower performance</li><li>Higher response time</li><li>Users wait longer</li></ul><p>— -</p><h4>2. Asynchronous Replication</h4><p>In asynchronous replication, the Primary saves the data first and immediately responds with success.</p><p>The update is sent to replicas in the background.</p><p>Example:</p><p>Write Request → Primary DB → Success Response → Background Replication to Replicas</p><p><strong>Benefits</strong></p><ul><li>Faster writes</li><li>Better performance</li><li>Lower latency</li></ul><p><strong>Drawbacks</strong></p><ul><li>Replication delay can happen</li><li>Replicas may temporarily show old data</li><li>Small risk of data loss during failures</li></ul><p>This delay is called Replication Lag.</p><p><strong>Replication Lag</strong></p><p>Replication Lag happens when replicas are slightly behind the Primary database.</p><p>Example:</p><p>1. User updates profile picture<br>2. Data updates in Primary DB<br>3. User refreshes immediately<br>4. Replica still has old data</p><p>Result:<br>The user temporarily sees outdated information.</p><p>This is common in high-traffic systems and is usually handled using Eventual Consistency.</p><p>— -</p><p><strong>Failover:</strong> Handling Database Failures</p><p>Replication is also important for disaster recovery.</p><p>Systems continuously monitor the Primary database using Heartbeats.</p><p>A heartbeat is a small signal that checks whether the database is alive.</p><p>If the Primary stops responding:</p><p>1. A Replica becomes the new Primary<br>2. Traffic is redirected automatically<br>3. Failed database is repaired later</p><p><strong>Example:</strong></p><p>Primary DB ❌ → Replica promoted as new Primary</p><p>This process is called Failover.</p><p>— -</p><h4><strong>Why Replication Matters</strong></h4><p>Database replication helps systems:</p><ul><li>Stay online during failures</li><li>Handle more traffic</li><li>Improve read performance</li><li>Recover faster from outages</li></ul><p>Without replication, a single database failure can stop the entire application.</p><p>— -</p><h4>Final Thoughts</h4><p>Database replication is always a balance between:</p><ul><li>Consistency</li><li>Performance</li><li>Availability</li></ul><p>Most modern applications prefer asynchronous replication because it provides better speed and smoother user experience, even if there is a small delay in data synchronization.</p><p>The real challenge is deciding:<br><em>How much delay is acceptable for your system?</em></p><p>For example:</p><ul><li>Banking systems prefer strong consistency</li><li>Social media systems prefer speed and availability</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=062236ed220e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[System Design Series]]></title>
            <link>https://ishaileshmishra.medium.com/load-balancer-in-distributed-systems-2d152840df49?source=rss-e005b50ab875------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d152840df49</guid>
            <category><![CDATA[load-balancer]]></category>
            <category><![CDATA[load-balancing]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[Shailesh Mishra]]></dc:creator>
            <pubDate>Fri, 15 May 2026 04:33:47 GMT</pubDate>
            <atom:updated>2026-05-17T18:50:08.626Z</atom:updated>
            <content:encoded><![CDATA[<h4>#3 <strong>Mastering Traffic Control: The Role of </strong>Load Balancer In Distributed Systems</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EIBfeF_04ouo8HN0shXi9A.png" /></figure><h3>Mastering Traffic Control: The Role of Load Balancers</h3><p>In distributed systems, a backend can fail if even one important part becomes overloaded. Imagine a flash sale where thousands of users open your website at the same time. Without a Load Balancer, some servers would receive too many requests and crash, while other servers remain unused.</p><p>A Load Balancer (LB) sits between users and servers and distributes traffic evenly, so that no single server gets overloaded.</p><h3>The Reliability Center</h3><p>A Load Balancer works as the main entry point between users and servers. It receives incoming requests and sends them to the server that can handle them best at that moment.</p><p>This helps maintain High Availability (HA). If one server fails, the Load Balancer automatically redirects traffic to other healthy servers so the application keeps running smoothly.</p><h3>4 Intelligent Routing Strategies</h3><p>Not all traffic is handled in the same way. Different routing strategies are used depending on the application’s needs.</p><ol><li><strong>Round Robin:</strong> This is the simplest routing method. The Load Balancer sends requests one by one to each server in sequence.</li></ol><pre>Request 1 → Server 1<br>Request 2 → Server 2<br>Request 3 → Server 3</pre><ol><li><strong>Least Connections:</strong> The Load Balancer checks which server currently has the fewest active requests and sends new traffic there. This is useful when some requests take longer to process than others.</li></ol><pre>Server 1 → 20 active requests<br>Server 2 → 5 active requests<br>Next request → Server 2</pre><ol><li><strong>Weighted Balancing:</strong> Some servers are more powerful than others. In this method, the Load Balancer sends more traffic to stronger servers and less traffic to smaller ones.</li></ol><pre>Powerful Server → 70% traffic<br>Small Server 1 → 15% traffic<br>Small Server 2 → 15% traffic</pre><ol><li><strong>Failover Routing:</strong> This acts as a backup plan. Traffic normally goes to the primary server or region. If the Load Balancer detects a failure, it automatically redirects traffic to a backup server or standby region..</li></ol><pre><br>Primary Region ❌<br>       ↓<br>Traffic redirected to Backup Region</pre><h3>The Magic of Health Checks</h3><p>How does a Load Balancer know whether a server is healthy or not?</p><p>It uses something called Health Checks. The Load Balancer regularly sends small requests, also called <em>pings</em>, to each server to check whether it is responding properly.</p><p>If a server stops responding because of issues like:</p><ul><li>High memory usage / Application crash / Network problem</li></ul><p>The Load Balancer marks that server as unhealthy and immediately stops sending traffic to it.</p><ul><li>Example:</li></ul><pre><br>Load Balancer → Server Ping ❌<br> ↓<br>Server marked unhealthy<br> ↓<br>Traffic stopped</pre><h3>Layer 4 vs Layer 7 Load Balancing</h3><p><strong>Layer 4 (Transport):</strong> Layer 4 makes routing decisions using basic network information like:</p><ul><li>IP address</li><li>Port number</li></ul><p>It does not check the actual request content. Because of this, it is very fast.</p><p>Example:</p><ul><li>Traffic → Sent based on IP and Port</li></ul><p><strong>Layer 7 (Application):</strong> Layer 7 is more intelligent. It looks inside the actual HTTP request, such as:</p><ul><li>URL path</li><li>Headers</li><li>Cookies</li></ul><p>This allows it to send different requests to different servers.</p><p>Example:</p><pre>/images → Image Servers<br>/api → Application Servers</pre><h3>Why Load Balancers Matter</h3><p>Without a Load Balancer, a single server can easily become overloaded and bring down your application.</p><p>But with a Load Balancer, traffic gets distributed across multiple servers, making the system more stable, scalable, and reliable.</p><p>This allows applications to handle thousands or even millions of users more smoothly.</p><p>A Load Balancer also helps systems recover automatically when a server fails, which is why modern applications depend heavily on them.</p><h3>Pro Tip</h3><p>Always monitor your Load Balancer carefully.</p><p>If it is not configured properly, it can itself become a bottleneck and slow down the entire application.</p><p>Continue reading the &lt;&lt; <a href="https://ishaileshmishra.medium.com/system-design-series-999af235d9fe?postPublishedType=repub"><em>previous</em></a> / <em>next &gt;&gt;</em>article in the System Design Series</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d152840df49" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[System Design Series]]></title>
            <link>https://ishaileshmishra.medium.com/system-design-series-999af235d9fe?source=rss-e005b50ab875------2</link>
            <guid isPermaLink="false">https://medium.com/p/999af235d9fe</guid>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[Shailesh Mishra]]></dc:creator>
            <pubDate>Wed, 13 May 2026 14:43:42 GMT</pubDate>
            <atom:updated>2026-05-14T13:12:36.871Z</atom:updated>
            <content:encoded><![CDATA[<h4>#2 Vertical vs. Horizontal Scaling: Choosing Your Growth Strategy</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jzDDltxL-3_0-KImnRfMUQ.png" /></figure><p>In the world of system design, “scaling” is the art of handling more. More users, more data, and more requests. When your application starts to crawl under the pressure of success, you have two primary paths to choose from: <strong>Vertical Scaling</strong> and <strong>Horizontal Scaling</strong>.</p><p>Understanding the trade-offs between these two is what separates a junior developer from a senior architect.</p><h3>Vertical Scaling: “The Powerhouse”</h3><p>Vertical scaling, or <strong>Scaling Up</strong>, is the process of adding more power to your existing server. Think of it like taking your computer and swapping out the processor for a faster one or adding more RAM.</p><ul><li><strong>How it works:</strong> You upgrade the CPU, Memory, or Storage of a single machine.</li><li><strong>The Pros:</strong> It is architecturally simple. Your code doesn’t need to change because it’s still running on one box. There’s no complex network communication between servers to worry about.</li><li><strong>The Cons:</strong> You hit a “hardware wall” eventually — there is only so much RAM money can buy. Most importantly, it creates a <strong>Single Point of Failure</strong>. If that one super-powered server goes down, your entire business goes offline.</li></ul><h3>Horizontal Scaling: “The Army”</h3><p>Horizontal scaling, or <strong>Scaling Out</strong>, involves adding more machines to your pool of resources. Instead of one giant server, you have ten, fifty, or thousands of smaller servers working in tandem.</p><ul><li><strong>How it works:</strong> You connect multiple independent nodes into a cluster, usually managed by a <strong>Load Balancer</strong> that distributes incoming traffic.</li><li><strong>The Pros:</strong> It offers virtually <strong>unlimited scale</strong> and high <strong>Fault Tolerance</strong>. If one server in a cluster of ten fails, the other nine keep the system running. It also allows you to use cheaper, “commodity” hardware.</li><li><strong>The Cons:</strong> It introduces massive complexity. You now have to deal with distributed data consistency, network latency between nodes, and complex deployment cycles.</li></ul><h3>The Scaling Limit (The Wall)</h3><p>Every system has a limit. In vertical scaling, the limit is physical (the maximum specs of a single motherboard). In horizontal scaling, the limit is often software-based (how well your database handles distributed locks or how much overhead your load balancer adds).</p><p>As traffic grows, horizontal scaling generally offers a more linear cost-to-performance ratio, whereas the cost of high-end vertical hardware grows exponentially.</p><h3>The Final Verdict</h3><ul><li><strong>Choose Vertical</strong> if you are in the early stages, have low-to-moderate traffic, or need a simple setup where engineering time is more expensive than hardware.</li><li><strong>Choose Horizontal</strong> if you are building for high availability, expect massive global growth, or cannot afford a single second of downtime.</li></ul><p>Most modern tech giants use a “hybrid” approach, but the long-term winner for the cloud era is almost always <strong>Horizontal Scaling</strong>.</p><p><strong>Which strategy is your current project using? Are you hitting the “vertical wall” yet?</strong></p><p>Continue reading the &lt;&lt; <a href="https://medium.com/@ishaileshmishra/system-design-series-999af235d9fe"><em>previous</em></a> / <a href="https://medium.com/@ishaileshmishra/system-design-series-999af235d9fe"><em>next</em></a><em> &gt;&gt;</em>article in the System Design Series</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=999af235d9fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[System Design Series]]></title>
            <link>https://ishaileshmishra.medium.com/system-design-series-fe025961dd88?source=rss-e005b50ab875------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe025961dd88</guid>
            <dc:creator><![CDATA[Shailesh Mishra]]></dc:creator>
            <pubDate>Wed, 13 May 2026 14:34:46 GMT</pubDate>
            <atom:updated>2026-05-14T12:49:15.434Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>#1 Decoding the Web: The Fundamentals of Distributed Systems</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y1lS-8qCB9omuZaOp-quyg.png" /></figure><h4>Decoding the Web: The Fundamentals of Distributed Systems</h4><p>In the early days of computing, a single powerful machine (a <strong>Monolith</strong>) did all the heavy lifting. But as the world moved online, one machine simply couldn’t keep up. Enter <strong>Distributed Systems</strong>: a collection of independent computers that appear to the user as a single, coherent system.</p><p>If you’ve ever wondered how platforms like Netflix or Google handle millions of users at once without breaking a sweat, the answer lies in these core principles.</p><h4>1. Scaling Out, Not Up (Horizontal Scaling)</h4><p>In a distributed world, we don’t just buy a bigger “brain” (Vertical Scaling); we add more “workers.”</p><ul><li><strong>Vertical Scaling:</strong> Adding more RAM or CPU to one server. There’s a ceiling to how big you can go.</li><li><strong>Horizontal Scaling:</strong> Adding more server racks to your cluster. This allows for nearly infinite growth and ensures that if one server fails, the others pick up the slack (<strong>Fault Tolerance</strong>).</li></ul><h4>2. The Gateway to the Cluster</h4><p>When a client (your phone or laptop) sends a request, it doesn’t just pick a random server. It hits an <strong>API Gateway</strong> or a <strong>Load Balancer</strong>. This acts as a traffic cop, directing incoming requests to the healthiest and least busy server in the cluster. This is where we track <strong>Latency</strong> — the tiny delays (often measured in milliseconds) as data travels through the network.</p><h4>3. Stateless vs. Stateful Services</h4><p>This is a critical architectural choice for any senior engineer:</p><ul><li><strong>Stateless Services:</strong> Like a vending machine. It doesn’t care who you are; it just processes the current request. Since no data is stored on the server itself, any server in the cluster can handle the request. This makes scaling incredibly easy.</li><li><strong>Stateful Services:</strong> Like a personal assistant. They remember your history and “state.” These are harder to scale because the system must ensure that the “memory” (data) is consistent across all nodes.</li></ul><h4>4. How Nodes Talk (Service Interaction)</h4><p>In a distributed system, servers are constantly “chatting.”</p><ul><li><strong>Synchronous (REST/gRPC):</strong> Server A waits for Server B to finish before moving on. It’s fast but can cause bottlenecks.</li><li><strong>Asynchronous (Message Queues):</strong> Server A drops a message in a “mailbox” (like RabbitMQ) and moves on. Server B picks it up whenever it’s ready. This decouples the services and prevents system-wide crashes.</li></ul><h4>5. The Challenge of Coordination</h4><p>When you have hundreds of servers, how do they agree on the “truth”? This is <strong>Distributed Coordination</strong>.</p><ul><li><strong>Consensus:</strong> Using protocols like <strong>Raft</strong> or <strong>Paxos</strong> to make sure every node agrees on the data.</li><li><strong>Leader Election:</strong> The system automatically picks one “leader” node to manage tasks.</li><li><strong>Distributed Locking:</strong> Ensuring two servers don’t try to update the same piece of data at the exact same time.</li></ul><h3>The Bottom Line</h3><p>Distributed systems are complex, messy, and prone to network “jitters,” but they are the backbone of the modern internet. By shifting from a single point of failure to a collaborative cluster of nodes, we build systems that are not only faster but virtually unstoppable.</p><p>Which part of the distributed puzzle do you find most challenging — managing state or tackling network latency?</p><p>Continue reading the <a href="https://medium.com/@ishaileshmishra/system-design-series-999af235d9fe"><em>next</em></a><em> </em>article in the System Design Series. &gt;&gt;</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe025961dd88" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hand-drawn infographic System Design Explanation]]></title>
            <link>https://ishaileshmishra.medium.com/hand-drawn-infographic-system-design-explanation-2c945d3244d7?source=rss-e005b50ab875------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c945d3244d7</guid>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[product-design]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[Shailesh Mishra]]></dc:creator>
            <pubDate>Sun, 10 May 2026 18:09:17 GMT</pubDate>
            <atom:updated>2026-05-10T18:40:42.273Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M1LdEZvDx3oWKWovLtsvGQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XXTCEfwc1GyQ1sX5aygvIw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fGk5C_rRjNAMpWpOfHBxTQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LJOxu3B1KPdAxmOMqUEI3w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vxCw1_RY61MxFDB7YNKwkg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*744dJwJjEYRuaaibZWKiZA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EHza8sz5eMNAj7-zak6gdw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*26I57HuD0D0Ty8ZC88rF3w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FtQ97NsE3s4q63aMuVZmvQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6KXA7cwt5IYbxXeWm1Bn6g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c945d3244d7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Moving Beyond AI Demos: How to Build Smart, Reliable AI Tools for Your Business]]></title>
            <link>https://ishaileshmishra.medium.com/moving-beyond-ai-demos-how-to-build-smart-reliable-ai-tools-for-your-business-a33deecb14ba?source=rss-e005b50ab875------2</link>
            <guid isPermaLink="false">https://medium.com/p/a33deecb14ba</guid>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[gen-ai-for-business]]></category>
            <dc:creator><![CDATA[Shailesh Mishra]]></dc:creator>
            <pubDate>Thu, 19 Feb 2026 04:26:23 GMT</pubDate>
            <atom:updated>2026-02-19T04:26:23.724Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YH-5Dfz8dbwTakaP" /></figure><p><em>Have you ever played around with ChatGPT and thought, Wow, this is amazing! How can I make it work for my company’s specific information?</em></p><p><em>You’re not alone! Many businesses see the power of AI but then hit a wall when they try to make it answer questions about their own private documents, like company policies, internal reports, or customer data.</em></p><p><em>The problem? Standard AI models (like the ones you see online) are trained on public information from the internet. They don’t know anything about your company’s secrets or specific files.</em></p><p><em>So, if you ask a regular AI about your </em><strong><em>Q3 marketing strategy</em></strong><em>, it will probably make something up! This is what we call </em><strong><em>hallucination.</em></strong></p><h3><em>Introducing RAG: Your AI’s Open Book</em></h3><p><em>Imagine a student taking a test. A regular AI is like a student who only knows what they memorized months ago. But a </em><strong><em>RAG (Retrieval-Augmented Generation)</em></strong><em> system is like a student who is allowed to use an </em><strong><em>open textbook</em></strong><em>.</em></p><p><em>Before answering, the RAG system looks up the answer in your specific documents, then uses that information to give you a correct reply. It’s like giving your AI a brain and a library card to your company’s files!</em></p><h3><em>Why Demo RAG Isn’t Enough for Business</em></h3><p><em>Many online tutorials show you how to build a simple RAG system in minutes. This is great for a demo!</em></p><p><em>But a real business needs much more:</em></p><ul><li><strong><em>Demo RAG:</em></strong><em> Good for one person, a few small documents. Often makes mistakes.</em></li><li><strong><em>Production RAG:</em></strong><em> Built for thousands of users, millions of documents, and must be super accurate. It has many extra steps to make sure it gets things right every time.</em></li></ul><h3><em>How a Real-World RAG System Works</em></h3><p><em>Building a professional RAG system involves several smart steps:</em></p><ol><li><strong><em>Reading Your Documents (Ingestion):</em></strong><em> You can’t just throw a 100-page PDF at an AI. The system first breaks down your big documents into smaller, easy-to-read </em><strong><em>chunks</em></strong><em> (like paragraphs). It’s smart enough not to cut sentences in half!</em></li><li><strong><em>Smart Storage (Databases):</em></strong></li></ol><ul><li><em>It stores your document chunks in a special </em><strong><em>Vector Database</em></strong><em> which turns words into numbers. This helps the AI find pieces of text with similar meanings.</em></li><li><em>It also uses a regular database to remember details like </em><strong><em>who wrote this document?</em></strong><em> or </em><strong><em>when was it updated?</em></strong><em> This helps the AI search more precisely (e.g., Find the sales report only from last quarter).</em></li></ul><p><strong><em>3. Finding the Best Information (Search &amp; Reranking):</em></strong></p><ul><li><em>When you ask a question, the system uses a smart search that looks for exact words and similar meanings.</em></li><li><em>Then, it has a </em><strong><em>Reranker</em></strong><em>— a kind of quality control. It looks at the top 10 results and picks the absolute best one to make sure the AI gets the most accurate information.</em></li></ul><p><strong><em>4. Giving You the Answer (Reasoning Engine):</em></strong></p><ul><li><em>Instead of just spitting out an answer, a professional system often uses multiple </em><strong><em>AI agents</em></strong><em>. One agent might search your internal documents, another might check public websites, and a </em><strong><em>Manager</em></strong><em> agent brings all the pieces together into one clear, helpful answer for you.</em></li></ul><h3><em>Making Sure It’s Safe and Accurate</em></h3><p><em>For a business, AI needs to be reliable and safe.</em></p><ul><li><strong><em>Checking Answers:</em></strong><em> The system constantly checks its answers against what’s known to be true.</em></li><li><strong><em>Red Teaming:</em></strong><em> Experts try to “break” the AI by asking tricky or inappropriate questions to make sure it stays safe and doesn’t share secrets.</em></li><li><strong><em>Stress Testing:</em></strong><em> The system is tested to see if it can handle thousands of people using it at the same time without crashing.</em></li></ul><h3><em>Note :</em></h3><p><em>If you’re thinking about building an AI tool for your business, remember this: </em><strong><em>Focus on your data!</em></strong></p><p><em>Even the smartest AI system can’t give good answers if your original documents are messy, poorly organized, or broken into bad chunks.</em></p><p><em>Think of it like cooking: You can have the best chef in the world, but if you give them bad ingredients, you won’t get a great meal! It’s </em><strong><em>Garbage in, garbage out!</em></strong></p><p><em>Thanks. Keep Learning…</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a33deecb14ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>