Circuit Breaker Design Prompt to Secure Your System

밤하늘속으로
"One service blew up and the whole system went down!" It's the scariest scenario in microservices (MSA) environments: one payment service starts to slow down, and then a cascade of ordering, shipping, and notification services all go down... It's one of the biggest fears of developers.
This actually happened to me at an e-commerce company when an external PG started delaying API responses by 30 seconds, and while waiting for them, threads on all servers were blocked, bringing down the entire service. If I had implemented the Circuit Breaker pattern correctly, I could have blocked the PG service and kept everything else working.

Prompt.

복사
### Circuit Breaker Pattern Expert
◉ Identify what you want to protect
Service structure: [API Gateway/Microservice/External Integration].
Dependency map: [Call relationships between services].
Failure vulnerabilities: [external APIs/DB/network/internal services].
Business Criticality: [Core/Important/General]
Circuit breaker settings
** Define thresholds
- Failure rate: [OPEN when more than 50%]
- Response time: [Failure count if more than 5 seconds].
- Minimum number of requests: [Judged at 10 or more]
- Timeout: [3 seconds]
** State Transition Logic
CLOSED → OPEN: [consecutive failure conditions]
open → half_open: [Attempt after wait time]
half_open → closed/open: [test result]
** Fallback strategy
Return cached data
Respond to default/error messages
Call an alternate service
Disable functionality (Graceful Degradation)
Monitoring and alerting
- Real-time status dashboard
- Circuit breaker activation notifications
- Automatic notification of recovery points
- Failure pattern analysis reports
Implementation technology stack
→ Spring Cloud Circuit Breaker
→ Netflix Hystrix/Resilience4j
→ Istio Service Mesh
→ Custom implementation guide
Please design an optimized circuit breaker implementation for [service architecture] in detail.
A well-implemented circuit breaker makes a system really robust, because if one service fails, the other services continue to work unaffected. From the user's point of view, it's much more satisfying to know that the entire service is still available, with only a few features temporarily limited.
Failures can happen at any time, the important thing is to prevent them from propagating, so why not make your system more robust by building a shield?

Write a comment

Prompts for developing immersive educational content

Have you ever watched your learners lose focus after less than five minutes? Even the best content can get boring qui...

Prompt for assetization strategies that make real money

"I want to make money work for me, but how do I get started?" is a question we hear a lot! Living paycheck to paychec...

Prompt

ChatGPT

Where is the Creativity Switch Hiding? Find your own button!

ChatGPT

Allocate your training budget smartly prompt

ChatGPT

Confident because you have nothing to hide, trusted because you’re transparent

ChatGPT

Nurturing the Seeds of Student Leadership Prompts

ChatGPT

Creative presentation prompts to engage your audience

ChatGPT

Find the hidden money stream prompt

ChatGPT

“Why don’t I get recognized for my hard work?” – Discover the hidden formula for performance and rewards!

ChatGPT

Looking for ways to create a river of data?

ChatGPT

Being able to claim something as yours is different from being able to prove it

ChatGPT

The magic of testing: learn when you fail, learn when you succeed

ChatGPT

Aha moments don’t happen by accident, they come to the prepared mind

ChatGPT

Real artists are creative even when they copy

ChatGPT

Great art thrives on good infrastructure

ChatGPT

While the robots work, I focus on more meaningful things

ChatGPT

You can’t live without a cache, but it’s more dangerous if it’s wrong (Distributed Cache Verification Prompt)

ChatGPT

Manage system vital signs prompt