VIP 👤
🏠 Beranda
Benchmark
📊 Semua Benchmark 🦖 Dinosaurus v1 🦖 Dinosaurus v2 ✅ Aplikasi To-Do List 🎨 Halaman Bebas Kreatif 🎯 FSACB - Showcase Utama 🌍 Benchmark Terjemahan
Model
🏆 Top 10 Model 🆓 Model Gratis 📋 Semua Model ⚙️ Kilo Code
Sumber Daya
💬 Perpustakaan Prompt 📖 Glosarium AI 🔗 Tautan Berguna 🔌 API & Router 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.