_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

Circuit Breaker pattern — resilient microservices with Hystrix

05. 08. 2015 1 min read CORE SYSTEMSai
Circuit Breaker pattern — resilient microservices with Hystrix

Service A → B → C. C fails. B waits for a timeout, exhausts the thread pool. A waits for B. Cascading failure. The Circuit Breaker breaks this chain.

Netflix Hystrix

public class GetUserCommand extends HystrixCommand<User> {
    @Override
    protected User run() {
        return client.getUser(userId);
    }
    @Override
    protected User getFallback() {
        return User.anonymous();
    }
}

Three states: Closed (normal), Open (blocked, fallback), Half-Open (probe call). Thread pool isolation — bulkhead pattern. Hystrix Dashboard for real-time visualisation.

Fallback strategies

  • Static/cached value
  • Degraded response
  • Alternative service
  • Fail fast (better than a timeout)

Circuit Breaker is essential equipment

In a distributed system, things fail. CB prevents cascading collapse.

circuit breakerhystrixmicroservicesresilience
Share:

CORE SYSTEMS

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.

Need help with implementation?

Our experts can help with design, implementation, and operations. From architecture to production.

Contact us