How would you design a focused test strategy for circuit breakers at normal and peak traffic?
Answer
Build the smallest useful model of the behavior by turning business demand and reliability expectations into a representative workload and measurable hypothesis. Focus on circuit breakers at normal and peak traffic. Use service-level objectives, resource telemetry and correctness under load as the oracle. Cover steady, spike, stress, soak, degradation and recovery behavior. Keep data and dependencies controlled enough to reproduce failures. Release only when thresholds are met without hidden errors, data loss or unsafe retry amplification.
Strong answer includes
- explicit risk and test oracle for circuit breakers
- models realistic workload
- correlates latency with resources and correctness
- measurable evidence and residual-risk statement
Practical example
The team designed a focused test matrix for a resilience4j circuit breaker on the recommendations service: at normal traffic it verifies the breaker stays closed under a 2% baseline error rate, and at 5x peak traffic with 30% injected errors it verifies the breaker opens within the configured window and requests fail fast instead of queuing. Half-open recovery was tested separately by restoring the dependency and checking the breaker closes after the configured number of successful probes.