The Domino Effect: Why One Slow Service is Deadlier Than a Total Crash
You’ve designed your services, added an API Gateway, and set up Service Discovery. Everything looks perfect on paper.
The Domino Effect: Why One Slow Service is Deadlier Than a Total Crash
You’ve designed your services, added an API Gateway, and set up Service Discovery. Everything looks perfect on paper.
Until one service becomes slow.
In a monolith, a slow function just makes one request slow. In microservices, one slow service can trigger a Cascading Failure that nukes your entire ecosystem. Today, we learn the “Survival Kit” of backend engineering: Resilience Patterns.
The Nightmare Scenario: Cascading Failure

Cascading Failure
Imagine your Order Service calls the Payment Service. Suddenly, the Payment Service starts taking 30 seconds to respond instead of 500ms.
What happens next?
- Order Service threads start waiting for Payment to respond.
- New orders keep coming in, occupying more threads.
- The Thread Pool gets exhausted.
- The Order Service becomes unresponsive, even for requests that don’t need the Payment Service.
Caption: A slow service is often worse than a dead one; it holds onto resources, causing dependent services to collapse.
1. Circuit Breaker (The “Fail Fast” Rule)
The Circuit Breaker is inspired by electrical engineering. If the “voltage” (failure rate) is too high, it flips the switch to protect the house.
The Idea: If a service fails repeatedly → Stop calling it immediately.
How it works (The 3 States):
- Closed: Everything is normal. Requests flow through.
- Open: Failure threshold reached. Requests are blocked immediately, and a Fallback is returned.
- Half-Open: After a “sleep” period, it lets a few requests through to see if the service has recovered.
Code (Resilience4j):
@CircuitBreaker(name = "paymentService", fallbackMethod = "paymentFallback")
public String processPayment() {
return restTemplate.getForObject("http://payment-service/pay", String.class);
}
public String paymentFallback(Exception ex) {
return "Payment system is currently overwhelmed. Your order is queued.";
}
2. Timeout (The “Stop Waiting” Rule)
In production, “forever” is usually about 2 seconds. If a service hasn’t answered by then, it probably isn’t going to.
The Idea: Set a hard limit on how long you are willing to wait for a response.
The Benefit: It frees up your service threads quickly so they can handle other requests.
3. Retry (The “Maybe It Was a Fluke” Rule)
Sometimes a network packet gets lost or a service restarts. A quick retry might solve the problem.
The Golden Rule of Retries:
- DO: Retry “Idempotent” operations (like fetching a user profile).
- DON’T: Retry non-idempotent operations (like “Charge Credit Card”) unless you have a unique Request-ID to prevent double charging.
Summary Table: Which Pattern to Use?
Pattern | Purpose | Real-World Analogy
----------------|------------------------------|-------------------------
Circuit Breaker | Prevent Cascading Failures | A fuse in an electric box
Timeout | Stop Resource Exhaustion | Hanging up after 5 rings
Retry | Handle Transient Glitches | Redialing a dropped call
Fallback | Provide a "Plan B" | Using the stairs when the lift is broken
Common Project Mistakes
- Configuring Infinite Retries: This is essentially a “Self-Inflicted DDoS Attack.”
- No Timeouts: Leaving default timeouts (which are often infinite) is the #1 cause of production outages.
- Ignoring Idempotency: Not realizing that retrying a POST request can create duplicate data.Implement Rate Limiting to prevent DDOS.
The “Senior” Interview Answer
When asked how to handle service failures, use this specific framing:
“In distributed systems, failure is not an exception — it’s expected. I don’t design for ‘if’ a service fails, but ‘when.’ I implement a Circuit Breaker to prevent cascading failures, combined with aggressive Timeouts to protect my thread pools. For transient network issues, I use a Retry strategy with exponential backoff, ensuring all retried operations are idempotent.”
“Microservices don’t fail suddenly; they fail gradually. If you don’t cut off the infection early, it will spread to every corner of your system.”
메타데이터
- post_id
- 830ad37ba2b3
- slug
- the-domino-effect-why-one-slow-service-is-deadlier-than-a-total-crash-830ad37ba2b3
- url
- https://medium.com/@panditaarchit98/the-domino-effect-why-one-slow-service-is-deadlier-than-a-total-crash-830ad37ba2b3
- canonical_url
- https://medium.com/@panditaarchit98/the-domino-effect-why-one-slow-service-is-deadlier-than-a-total-crash-830ad37ba2b3
- author_url
- https://medium.com/@panditaarchit98
- status
- ok
- fetched_at
- 2026-06-27 18:20:27