The circuit breaker has three states: Closed means requests pass through normally. Open means requests are blocked to prevent further failures. Half-Open allows limited requests to check if the system has recovered.
The circuit breaker is typically placed on the client side to stop requests from reaching a failing downstream service, preventing cascading failures.
When multiple instances have their own circuit breakers, their states may differ causing inconsistent behavior. Using centralized storage or distributed consensus helps keep states synchronized.
A short timeout means the circuit breaker tests the service too soon, possibly before it has recovered, causing repeated failures and instability.
Total states = 1000 instances * 10 services = 10,000 states.
Memory = 10,000 * 1KB = 10,000 KB = ~10 MB.
