No breaker vs circuit breaker

Without a breaker, every call waits for the failed payment API, and the waiting calls pile up. A circuit breaker opens after repeated failures and fails calls at once during a cooldown. In a 15 s outage, p99 is 6,784 ms without a breaker and 544 ms with one. Both lose about 29 percent of checkouts.

Play the level

Three failure domainsTap to fail one replica. The fourth tap heals all.

3 of 3 up · availability 99.9999%

Case 1

The payment API is down from 0:20 to 0:35. Shoppers tap Pay again, so checkout traffic doubles from 120 to 240 requests/s. p99 must stay below 700 ms and availability at 65 percent or more.

Case 1
Measure Goal No circuit breaker Circuit breaker, 5 s cooldown
p99 latency under 700 ms 6.8 s Fail 544 ms Pass
Availability at least 65% 71.4% Pass 70.9% Pass
Monthly cost 8 USD/mo 12 USD/mo
Error rate 28.6% 29.1%
HTTP/2HTTP/2UsersWorker1 vCPU · 1 GBPayment pro…1 vCPU · 1 GB
HTTP/2HTTP/2UsersWorker1 vCPU · 1 GBPayment pro…1 vCPU · 1 GB
No circuit breaker: misses a goal
HTTP/2UsersAPI gateway1 vCPU · 1 GBWorker1 vCPU · 1 GBPayment pro…1 vCPU · 1 GB
HTTP/2UsersAPI gateway1 vCPU · 1 GBWorker1 vCPU · 1 GBPayment pro…1 vCPU · 1 GB
Circuit breaker, 5 s cooldown: meets the goals