<?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 Shital Bhabad on Medium]]></title>
        <description><![CDATA[Stories by Shital Bhabad on Medium]]></description>
        <link>https://medium.com/@bhabad1?source=rss-1742b9412543------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*KQVpp6LHEWNQlNnB.</url>
            <title>Stories by Shital Bhabad on Medium</title>
            <link>https://medium.com/@bhabad1?source=rss-1742b9412543------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 16:24:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bhabad1/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[Circuit Breaker]]></title>
            <link>https://medium.com/@bhabad1/circuit-breaker-2490d4e3aae5?source=rss-1742b9412543------2</link>
            <guid isPermaLink="false">https://medium.com/p/2490d4e3aae5</guid>
            <category><![CDATA[resilience]]></category>
            <category><![CDATA[circuit-breaker]]></category>
            <category><![CDATA[microservices-pattern]]></category>
            <category><![CDATA[software-design-patterns]]></category>
            <category><![CDATA[distributed-system-design]]></category>
            <dc:creator><![CDATA[Shital Bhabad]]></dc:creator>
            <pubDate>Fri, 22 May 2026 15:16:44 GMT</pubDate>
            <atom:updated>2026-05-22T15:18:53.352Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Building Systems That Fail Gracefully, Recover Automatically, and Never Let One Broken Dependency Bring Down the World</em></p><h3>Foreword</h3><p>There is a class of production incidents that follows a familiar and deeply frustrating script: a single downstream database or third-party API becomes slow. Within minutes, the threads handling requests pile up waiting for responses that will never arrive. Connection pools are exhausted. Memory climbs. The health check starts failing. By the time the on-call engineer is paged, three services that have nothing to do with the original failure are also down — and now you’re debugging a distributed catastrophe instead of a single dependency outage.</p><p>This is a cascading failure. It is, in my experience, the single most underestimated failure mode in distributed systems. And the circuit breaker pattern is the most direct architectural weapon against it.</p><p>This post is not a tutorial. It is a holistic treatment — from the theoretical foundations through production-grade implementation, tuning, observability, and the subtle mistakes engineers make even after they think they’ve gotten it right.</p><h3>1. The Problem Space: Why Distributed Systems Fail Differently</h3><h4>The Fallacy of the Reliable Network</h4><p>The <a href="https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing">Eight Fallacies of Distributed Computing</a> lead with this: <strong><em>the network is reliable</em></strong>. Every engineer knows it intellectually, yet systems are routinely architected as if it were true.</p><p>In a monolith, a function call either returns or throws synchronously. In a distributed system, a network call to a remote service can:</p><ul><li>Return successfully or return an error</li><li>Time out after a configured duration</li><li><strong>Never return</strong> — hang indefinitely if no timeout is set</li></ul><p>That last case is the one that kills you. Threads waiting for a hung downstream service do not release their resources. Each new incoming request spawns a new thread waiting for the same hung service. You don’t fail; you accumulate. And accumulation leads to exhaustion.</p><h4>The Cascade Anatomy</h4><p>Consider a simple dependency graph in a microservices architecture:</p><pre>Client → API Gateway → Auth Service → [Database, Token Service]<br>                     → Product Service → [Database, Inventory Service]</pre><p>If Inventory Service begins responding in 30 seconds instead of 30 milliseconds:</p><ol><li>Product Service threads pile up waiting on Inventory Service</li><li>Product Service becomes slow for API Gateway callers</li><li>API Gateway threads pile up waiting on Product Service</li><li>Auth Service also connects to the same database cluster — now under pressure from retry storms</li><li>The entire platform degrades, not just inventory lookups</li></ol><p>The failure propagated upward through the dependency graph. The root cause was a single slow service. The observable symptom was platform-wide degradation.</p><p><strong>Research quantifies this brutally</strong>: circuit-breaking patterns, when properly implemented, reduce cascading failures in production by over 83% according to distributed systems resilience studies.</p><h3>2. The Conceptual Origin</h3><p>The circuit breaker pattern was popularised in the software world by <strong>Michael Nygard</strong> in his 2007 book <em>Release It!</em>. The metaphor is borrowed directly from electrical engineering.</p><p>In electrical circuits, a circuit breaker:</p><ol><li>Allows current to flow normally (<strong>Closed</strong>)</li><li>Trips and stops all current when a fault is detected (<strong>Open</strong>)</li><li>Allows a small test current after a cooldown to see if the fault has cleared (<strong>Half-Open</strong>)</li></ol><p>The software analogue maps perfectly:</p><ol><li><strong>Closed</strong>: Requests pass through; failures are counted</li><li><strong>Open</strong>: All requests fail immediately without touching the downstream service</li><li><strong>Half-Open</strong>: A probe request is sent; if it succeeds, the circuit resets</li></ol><h3>3. The State Machine</h3><p>The circuit breaker is, at its core, a finite state machine with three states and four transitions.</p><pre>┌─────────────────────────────────────────────────────────────────────┐<br>│                                                                     │<br>│   ┌──────────┐   failure threshold   ┌──────────┐                  │<br>│   │          │  ─────────────────→   │          │                  │<br>│   │  CLOSED  │                       │   OPEN   │                  │<br>│   │          │  ←─────────────────   │          │                  │<br>│   └──────────┘   probe succeeds      └──────────┘                  │<br>│         ↑           (via Half-Open)       │                        │<br>│         │                                 │ reset timeout          │<br>│         │                                 ↓                        │<br>│         │                          ┌──────────────┐                │<br>│         └──────────────────────────│  HALF-OPEN   │                │<br>│            probe request succeeds  └──────────────┘                │<br>│                                          │                         │<br>│                                          │ probe request fails     │<br>│                                          └────────────→ OPEN       │<br>└─────────────────────────────────────────────────────────────────────┘</pre><h4>State: CLOSED</h4><p><strong>Normal operation.</strong> Every request passes through to the downstream service. The circuit breaker silently monitors two things:</p><ul><li><strong>Failure count or failure rate</strong> over a rolling window</li><li><strong>Slow call rate</strong> (calls that succeed but exceed a latency threshold)</li></ul><p>When either metric crosses its configured threshold, the circuit transitions to Open. This is the <strong>trip condition</strong>.</p><p>Critical design decision: <em>count-based</em> vs <em>rate-based</em> thresholds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ffQGua-HsZwi66BYrNqZrQ.png" /></figure><h4>State: OPEN</h4><p><strong>The circuit has tripped.</strong> No requests reach the downstream service. All calls are <strong>failed fast</strong> — typically with a specific exception or HTTP status code (503 Service Unavailable) without any network I/O.</p><p>This is the most misunderstood state. Engineers sometimes see fast failures from an Open circuit breaker and treat them as bugs. They are not. They are the pattern working as designed: protecting your service from spending time and resources on calls that are guaranteed to fail.</p><p>The Open state lasts for a configured <strong>reset timeout</strong> (sometimes called a cooldown period). After this elapses, the circuit moves to Half-Open.</p><h4>State: HALF-OPEN</h4><p><strong>The circuit is testing recovery.</strong> A limited number of probe requests are allowed through. The rest continue to fail fast.</p><p>If the probes succeed → the circuit resets to Closed. The downstream service has recovered.</p><p>If the probes fail → the circuit returns to Open and the reset timer restarts.</p><p>Half-Open is where subtle bugs appear. If you allow too many probes simultaneously, you risk overwhelming a fragile, partially recovered service. Most production implementations allow only 1–2 probes at a time.</p><h3>Configuration Parameters: The Devil Is in the Details</h3><p>This is where most implementations fall apart. Engineers copy default configuration values from tutorials and never revisit them. Production circuit breakers require deliberate tuning based on your service’s actual SLA characteristics.</p><h4>Core Parameters</h4><pre>interface CircuitBreakerConfig {<br>  // How long a single call is allowed to run before being considered failed<br>  timeout: number;                    // milliseconds<br>// What percentage of calls must fail before the circuit opens<br>  errorThresholdPercentage: number;   // 0-100<br>  // Minimum number of calls required before the error rate is evaluated<br>  // (Prevents tripping on 1 failure out of 1 call)<br>  volumeThreshold: number;            // call count<br>  // How long the circuit stays Open before moving to Half-Open<br>  resetTimeout: number;               // milliseconds<br>  // Maximum concurrent requests allowed (capacity/bulkhead)<br>  capacity: number;                   // request count<br>  // Percentage of slow calls that triggers opening (latency-based tripping)<br>  slowCallDurationThreshold?: number; // milliseconds<br>  slowCallRateThreshold?: number;     // 0-100<br>}</pre><h4>Tuning Guidance</h4><p><strong>Timeout</strong>: Set to your downstream service’s P99 latency under healthy conditions, multiplied by 2–3x as a safety margin. Do not guess. Pull this from your APM tool. If your database responds in under 200ms at P99, set the timeout to 500ms. A 30-second timeout means threads can wait 30 seconds before the circuit even begins to register a failure — defeating the purpose.</p><p><strong>errorThresholdPercentage</strong>: 50% is a common default, but it’s not always right. For critical authentication or payment services, you might trip at 20–25% because even that level of failure rate is unacceptable. For non-critical notification services, 70% might be appropriate because occasional failures are tolerable. Align this with your SLA and PagerDuty thresholds.</p><p><strong>volumeThreshold</strong>: This is often overlooked and critically important. Without it, a service that receives 2 requests and fails 1 would trip at 50% error rate — far too sensitive. Set this to a value that represents a statistically meaningful sample size for your traffic pattern. For a service receiving 1000 RPS, a volume threshold of 10 is fine. For a service receiving 2 RPS, you may need a longer evaluation window rather than a count-based threshold.</p><p><strong>resetTimeout</strong>: This controls how quickly you attempt recovery. Too short, and you’ll repeatedly open and close the circuit, hammering a fragile recovering service. Too long, and you delay recovery unnecessarily. Align this with the typical recovery time of the downstream service, which you can estimate from historical incident data. Starting at 30 seconds and adjusting based on observations is a reasonable approach.</p><h4>The Tuning Feedback Loop</h4><pre>Deploy → Observe metrics → Identify false positives (nuisance trips) <br>       or false negatives (failures not caught) → Adjust thresholds → Repeat</pre><p><strong>This is not a one-time activity</strong>. Circuit breaker configurations should be reviewed as part of any major traffic pattern change or downstream service architecture change.</p><h3>Implementation Architecture</h3><h4>Placement Strategy</h4><p>Where you place the circuit breaker in your service matters significantly.</p><p><strong>Option A: Client-side circuit breaker (most common)</strong></p><pre>[Your Service] → [Circuit Breaker Wrapper] → [Downstream Service]</pre><p>The circuit breaker lives in the calling service. Each caller independently monitors the downstream service’s health. This is the default pattern and works well for most cases.</p><p><strong>Option B: API Gateway / Sidecar circuit breaker</strong></p><pre>[Your Service] → [Service Mesh / Sidecar] → [Downstream Service]<br>                        ↑<br>               [Circuit Breaker here]</pre><p>In service mesh architectures (Istio, Linkerd), circuit breaking can be pushed to the infrastructure layer, removing it from application code entirely. The trade-off: you lose the ability to implement application-aware fallback logic, but you gain consistent behaviour across all services without code changes.</p><p><strong>Option C: Per-instance vs. shared state</strong></p><p>A critical architectural decision: does each instance of your service maintain its own circuit breaker state, or is state shared across all instances?</p><p><strong>Per-instance (default):</strong></p><ul><li>Simple to implement</li><li>No shared state infrastructure needed</li><li>The circuit in Instance A can be Open while Instance B is closed — inconsistent behaviour across the cluster</li></ul><p><strong>Shared state (Redis, distributed cache):</strong></p><ul><li>Consistent circuit state across all instances</li><li>Requires additional infrastructure</li><li>Appropriate when your fleet is large enough that per-instance state produces noisy, inconsistent behaviour</li></ul><p>For most services with fewer than 20 instances, per-instance state is perfectly acceptable. At scale (100+ instances), shared state becomes worth the operational cost.</p><h4>Scope Granularity</h4><p>A single circuit breaker per downstream service is a starting point, not a rule. Consider:</p><ul><li><strong>Per-endpoint circuit breakers</strong>: An /users endpoint failing doesn&#39;t necessarily mean /health is failing</li><li><strong>Per-tenant circuit breakers</strong>: In multi-tenant SaaS, one tenant’s traffic pattern shouldn’t trip the circuit for others</li><li><strong>Per-operation circuit breakers</strong>: Read operations and write operations may have very different failure profiles</li></ul><p>More granular circuit breakers give more precise failure isolation but add configuration complexity. Default to per-service, refine to per-endpoint when you have evidence that endpoint-level failure isolation would have prevented a real incident.</p><h3>Fallback Strategies</h3><p><strong>Level 1: Cached response:</strong> Return the last known-good response from a local or distributed cache. Appropriate for read-heavy, eventually-consistent data (product catalogues, feature configurations, user profiles).</p><p><strong>Level 2: Degraded response:</strong> Return a reduced but valid response. An e-commerce product page can render without real-time inventory counts. A dashboard can load without the latest analytics widget. Define your minimum viable response.</p><p><strong>Level 3: Static default:</strong> Return a hardcoded, safe default. A recommendation engine being unavailable shouldn’t crash a homepage — return a static list of featured items instead.</p><p><strong>Level 4: Fail fast with a user-facing message:</strong> Sometimes, honest failure is the right fallback. Return a clear 503 with a retry-after header rather than silently returning stale or incorrect data. This is especially true for financial or security-critical operations.</p><pre>const breaker = new CircuitBreaker(fetchUserProfile, config);<br>breaker.fallback((userId: string, error: Error) =&gt; {<br>  // Level 1: try cache<br>  const cached = cache.get(`user:${userId}`);<br>  if (cached) return { ...cached, fromCache: true };<br>  // Level 2: degraded response<br>  return { id: userId, name: &#39;Unknown&#39;, preferences: defaultPreferences };<br>});</pre><p><strong>The fallback anti-pattern</strong>: Triggering another network call inside a fallback. If your fallback calls a backup service, you need a circuit breaker around that call too — otherwise you’ve just deferred the problem.</p><h3>Resilience Pattern Composition</h3><p>The circuit breaker does not operate in isolation. It is one instrument in a resilience orchestra. Understanding how these patterns compose — and how they interact — is what separates a resilient architecture from a fragile one wearing safety equipment.</p><h4>The Resilience Stack</h4><pre>Incoming Request<br>       │<br>       ▼<br>┌─────────────────────┐<br>│   Timeout           │  ← Bound maximum wait time for any call<br>└──────────┬──────────┘<br>           │<br>           ▼<br>┌─────────────────────┐<br>│   Retry             │  ← Re-attempt on transient failure<br>└──────────┬──────────┘<br>           │<br>           ▼<br>┌─────────────────────┐<br>│   Circuit Breaker   │  ← Stop retrying when failure is persistent<br>└──────────┬──────────┘<br>           │<br>           ▼<br>┌─────────────────────┐<br>│   Bulkhead          │  ← Limit concurrent calls to this dependency<br>└──────────┬──────────┘<br>           │<br>           ▼<br>       Downstream Service</pre><h4>Pattern Interactions</h4><p><strong>Timeout + Circuit Breaker:</strong> Timeout is what gives the circuit breaker data. Without a bounded timeout, calls hang indefinitely, and the circuit breaker never sees a failure — it sees nothing. Always configure timeouts before circuit breakers.</p><p><strong>Retry + Circuit Breaker:</strong> These patterns can work against each other if not sequenced carefully. Retries inside an Open circuit breaker will hit the circuit immediately and fail fast — this is correct and desired. But retries should never be placed <em>outside</em> the circuit breaker, as that would cause the circuit breaker’s failure count to multiply with each retry. The circuit breaker should wrap the final call; retry wraps the circuit breaker.</p><p><strong>Bulkhead + Circuit Breaker:</strong> The bulkhead limits how many concurrent requests can be in-flight to a given downstream service. This prevents resource exhaustion independently of failure rate. Even if the circuit is closed, a bulkhead at capacity will reject new requests. Together, they protect against both failure-driven and volume-driven overload.</p><p><strong>Rate Limiter + Circuit Breaker:</strong> Rate limiting protects your service from being overwhelmed by callers. Circuit breaking protects your service from being overwhelmed by downstream failures. They are complementary and orthogonal.</p><h4>Retry with Exponential Backoff and Jitter</h4><p>Naive retry is dangerous. If 1000 instances all retry simultaneously after a 1-second outage, the recovering service is hit with a thundering herd at precisely the moment it’s most fragile.</p><pre>const delay = (attempt: number): number =&gt; {<br>  const exponential = Math.pow(2, attempt) * baseDelay;<br>  const jitter = Math.random() * exponential;<br>  return Math.min(exponential + jitter, maxDelay);<br>};</pre><p>The jitter spreads retry storms over time. This is not optional — it is essential at any meaningful scale.</p><h3>Observability: You Cannot Tune What You Cannot See</h3><p>Implementing a circuit breaker without observability is worse than not having one — you’ll have mysterious 503 responses with no explanation, and your operators will disable the feature in frustration.</p><h4>Metrics to Emit</h4><p>Every circuit breaker transition should emit a metric. The minimum viable set:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oh90epEGO6bZwibD0fvymw.png" /></figure><h4>Alerts to Configure</h4><p><strong>Page immediately:</strong></p><ul><li>Any circuit breaker transitions to OPEN and stays there for &gt; 5 minutes</li><li>Circuit breaker for a critical dependency (database, auth service) opens at all times</li></ul><p><strong>Alert (non-page):</strong></p><ul><li>Circuit breaker opens and closes repeatedly within a short window (flapping — indicates intermittent instability)</li><li>Fallback rate exceeds X% — callers are getting degraded responses even if the circuit isn’t open</li></ul><p><strong>Trend-watch:</strong></p><ul><li>Increasing timeout rate without circuit opening (circuit may be misconfigured with too-high threshold)</li><li>Increasing rejection rate (capacity/bulkhead limit being hit regularly — indicates need to tune capacity or scale downstream)</li></ul><h4>Dashboarding</h4><p>Your circuit breaker dashboard should show, per service, per time window:</p><ol><li>State timeline (was the circuit open? when? for how long?)</li><li>Success/failure/timeout/rejection rate</li><li>Correlation with downstream service latency P50/P99/P99.9</li><li>Fallback invocation rate and type</li></ol><p>The power of this dashboard is correlation: you should be able to visually trace a latency spike in downstream service → rising timeout rate → circuit breaker opening → spike in fallback responses → circuit closing after service recovers. If you can tell that story in your dashboard, your observability is correct.</p><h3>Anti-Patterns and Common Mistakes</h3><h4>Anti-Pattern 1: The Overly Sensitive Circuit Breaker</h4><p><strong>Symptom:</strong> Circuit opens frequently on minor blips; users see errors constantly. <strong>Cause:</strong> Too-low errorThresholdPercentage or too-low volumeThreshold. <strong>Fix:</strong> Raise volumeThreshold, align error threshold with actual SLA requirements, and review whether all errors should count toward the failure rate (HTTP 404s are client errors, not downstream failures).</p><h4>Anti-Pattern 2: The Never-Opening Circuit Breaker</h4><p><strong>Symptom:</strong> Downstream service is clearly degraded, but the circuit never opens. <strong>Cause:</strong> Timeout is too high (requests are slow but completing before the timeout), error threshold is too high, or errors are being swallowed before they reach the circuit breaker. <strong>Fix:</strong> Lower timeout to match realistic SLA expectations; ensure all failure paths propagate the error rather than returning empty/default values.</p><h4>Anti-Pattern 3: Circuit Breaker Without Fallback</h4><p><strong>Symptom:</strong> Circuit opens, service returns 503 with no explanation. <strong>Cause:</strong> No fallback strategy defined. <strong>Fix:</strong> Always define fallback behaviour, even if it’s just a structured error response with a Retry-After header. The fallback is not optional.</p><h4>Anti-Pattern 4: Nested Circuit Breakers Sharing State</h4><p><strong>Symptom:</strong> Circuit breaker trips on Service A unexpectedly when only Service B is down. <strong>Cause:</strong> A shared circuit breaker wrapping calls to multiple services, or a poorly scoped circuit breaker around a function that internally calls multiple dependencies. <strong>Fix:</strong> Circuit breakers must be scoped to a <strong>single downstream dependency</strong>. Never share a circuit breaker across multiple services.</p><h4>Anti-Pattern 5: Circuit Breaker on Idempotent vs. Non-Idempotent Operations</h4><p><strong>Symptom:</strong> Duplicate records created; double charges processed. <strong>Cause:</strong> A retry+circuit breaker stack that retries write operations that already completed (the response was lost, not the operation). <strong>Fix:</strong> Never retry non-idempotent operations unconditionally. Use idempotency keys. The circuit breaker’s fast-fail on Open state is safe (the downstream was never called), but retries on timeout require idempotency guarantees.</p><h4>Anti-Pattern 6: Ignoring Slow Calls</h4><p><strong>Symptom:</strong> Downstream service becomes slow but doesn’t error; threads pile up; circuit never opens because no errors are occurring. <strong>Cause:</strong> Circuit breaker configured to only monitor errors, not latency. <strong>Fix:</strong> Enable slowCallDurationThreshold and slowCallRateThreshold. A service responding in 10 seconds is just as dangerous as a service returning 500 errors — both exhaust your thread pool.</p><h3>When NOT to Use a Circuit Breaker</h3><p>Circuit breakers are not universally applicable. Misapplying them is worse than not having them.</p><p><strong>Don’t wrap local in-memory operations.</strong> Circuit breakers add overhead and complexity. They belong around network I/O, not local function calls.</p><p><strong>Don’t wrap operations that must complete.</strong> Financial ledger writes, audit logs, and regulatory reporting operations cannot be silently dropped via a fallback. The failure must be surfaced and handled explicitly.</p><p><strong>Don’t replace proper error handling.</strong> A circuit breaker around code that silently swallows errors will never trip — and gives false confidence that failures are being caught. Fix the error handling first.</p><p><strong>Don’t use circuit breakers to paper over SLA misalignment.</strong> If your service depends on a downstream that has a 5-second P99 and your SLA requires a 500ms response, the circuit breaker will be Open almost constantly. The right fix is to renegotiate the dependency contract or cache aggressively — not to configure the circuit breaker to tolerate 5-second calls.</p><p>The circuit breaker pattern is not a feature. It is an architectural commitment to the principle that <strong>partial availability is better than complete unavailability</strong>. A system that degrades gracefully — serving reduced functionality while one dependency recovers — is categorically more reliable than a system that either works perfectly or fails completely.</p><p>The engineers who have truly internalised this pattern stop thinking about individual service dependencies and start thinking about <strong>failure domains</strong> — clusters of functionality that share a failure boundary. Circuit breakers are the fences between those domains. Design the fences well, and individual storms stay localised. Design them poorly — or skip them entirely — and every storm becomes a catastrophe.</p><p><em>References:</em></p><ul><li><a href="https://learn.microsoft.com/en-us/azure/architecture/patterns/circuit-breaker">Circuit Breaker Pattern — Microsoft Azure Architecture Center</a></li><li><a href="https://microservices.io/patterns/reliability/circuit-breaker.html">Circuit Breaker Pattern — microservices.io (Chris Richardson)</a></li><li><a href="https://en.wikipedia.org/wiki/Circuit_breaker_design_pattern">Circuit Breaker Design Pattern — Wikipedia</a></li><li><a href="https://github.com/nodeshift/opossum">Opossum — Node.js Circuit Breaker (nodeshift)</a></li><li><a href="https://www.baeldung.com/cs/microservices-circuit-breaker-pattern">Circuit Breaker Pattern in Microservices — Baeldung</a></li><li><a href="https://medium.com/codetodeploy/circuit-breaker-bulkhead-pattern-a-deep-dive-for-distributed-systems-6256a39eb269">Circuit Breaker &amp; Bulkhead Pattern — CodeToDeploy</a></li><li><a href="https://system-design.space/en/chapter/resilience-patterns/">Fault Tolerance Patterns: Circuit Breaker, Bulkhead, Retry</a></li><li><a href="https://dev.to/axiom_agent/nodejs-circuit-breaker-pattern-in-production-opossum-fallbacks-and-resilience-engineering-1mj4">Node.js Circuit Breaker in Production with Opossum — DEV Community</a></li><li><a href="https://www.datadoghq.com/videos/how-draftkings-solves-the-microservices-murder-mystery-with-circuit-breakers/">How DraftKings Solves Cascading Failures with Circuit Breakers — Datadog</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2490d4e3aae5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Difference between Concurrency and Parallelism]]></title>
            <link>https://medium.com/@bhabad1/difference-between-concurrency-and-parallelism-a4f29b9e6dd7?source=rss-1742b9412543------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4f29b9e6dd7</guid>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[parallelism]]></category>
            <dc:creator><![CDATA[Shital Bhabad]]></dc:creator>
            <pubDate>Wed, 17 Jan 2024 12:13:20 GMT</pubDate>
            <atom:updated>2024-01-17T12:13:20.058Z</atom:updated>
            <content:encoded><![CDATA[<p>Difference between Concurrency and Parallelism</p><p>Concurrency and parallelism are concepts in computer science and programming that relate to how tasks are executed and managed in a system, but they have slightly different meanings.</p><p><strong>Concurrency:</strong></p><p>Concurrency refers to the ability of a system to handle multiple tasks or processes at the same time, without necessarily executing them simultaneously. In a concurrent system, tasks can overlap in time, but they may not be actively running simultaneously. Instead, the system switches between tasks, giving the illusion of simultaneous execution. Concurrency is particularly useful for applications that involve multitasking, like handling multiple user requests in a web server or managing different components of a complex software system.</p><p><strong>Parallelism:</strong></p><p>Parallelism, on the other hand, involves the actual simultaneous execution of multiple tasks or processes across multiple computing resources, such as multiple CPU cores or processors. Parallelism is focused on achieving higher performance and speeding up the execution of tasks by distributing the workload across multiple processing units. This is especially beneficial for tasks that can be divided into smaller, independent parts that can be worked on concurrently.</p><p>In summary, concurrency is about managing and scheduling multiple tasks in a way that they appear to be executing simultaneously, while parallelism is about actually executing multiple tasks simultaneously to improve performance. Both concepts are important for optimizing the efficiency and performance of modern computer systems and software applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4f29b9e6dd7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>