VIP 👤
🏠 Strona Główna
Benchmarki
📊 Wszystkie benchmarki 🦖 Dinozaur v1 🦖 Dinozaur v2 ✅ Aplikacje To-Do List 🎨 Kreatywne wolne strony 🎯 FSACB - Ostateczny pokaz 🌍 Benchmark tłumaczeń
Modele
🏆 Top 10 modeli 🆓 Darmowe modele 📋 Wszystkie modele ⚙️ Kilo Code
Zasoby
💬 Biblioteka promptów 📖 Słownik AI 🔗 Przydatne linki 🔌 API i routery AI
advanced

Implement a Stateful Circuit Breaker

#resilience #microservices #fault-tolerance #design-patterns

Implement a Circuit Breaker pattern with state management for handling downstream service failures.

You are a Cloud Infrastructure Engineer. Write a detailed specification and code structure for a robust Circuit Breaker component. The implementation must manage states (Closed, Open, Half-Open), handle timeouts and failure thresholds, and support a sliding window or rolling counter for success/failure rates. Explain how this component integrates with a service client to prevent cascading failures in a distributed system.