Search GimmeJob

Type at least 2 characters. Enter also searches by meaning.
QA interview question
Performance & resilienceSeniorOccasionalTest design

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.

#performance#resilience#circuit-breakers

Sources

Grafana k6 documentationGrafana Labs · Performance test modelling, execution and metricsGoogle SRE booksGoogle · Reliability, SLOs, monitoring, incidents and resiliencePrometheus alerting practicesPrometheus · Symptom-based actionable alerts, metamonitoring and noise reduction