Circuit Breaker Design Prompt to Secure Your System

밤하늘속으로
2,550
32 0
"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

Find the hidden money stream prompt

I went from checking my bank account balance once a month to checking my assets every morning with a cup of coffee, a...

How do you create a system that makes money make money?

I was worried about the lack of returns for several years after I started investing. People told me that I should inv...

Prompt

ChatGPT

Server Configuration Like Code? Revolutionizing Infrastructure Codification!

ChatGPT

The moment the artist in me awakens – a miracle from the first brushstroke!

ChatGPT

Software overcomes the limitations of physical cables

ChatGPT

Real-time system health check prompts

ChatGPT

The secret of those who make more for the same money is efficiency

ChatGPT

Stop Googling, Real Research Unleashes Your Creativity!

ChatGPT

Artists don’t grow alone, they grow together

ChatGPT

It’s harder to stay rich than it is to get richer

ChatGPT

Revealing Education’s ‘Hidden Cards’ – When Transparency Is Money!

ChatGPT

Good questions are now more important than good answers

ChatGPT

Manage system vital signs prompt

ChatGPT

Lesson design prompts that flipped learner-centered

ChatGPT

Creating a good lecture is one thing, creating a good learning environment is another.

ChatGPT

Service can’t find the service?

ChatGPT

I was spending 5 hours doing something that should have taken 5 minutes!

ChatGPT

Non-disruptive deployment strategy prompt