Repaso
Español
System DesignAdvancedSD-13

A downstream service is failing and timing out. Which pattern stops your service from hammering it and failing slowly?

Options

  1. Circuit breaker (Correct option)
  2. Singleton
  3. Saga
  4. Sharding

Answer

Circuit breaker

Why

Like an electrical breaker: after several failures in a row, the circuit 'opens' and calls to that service fail immediately (or return a fallback) instead of waiting for timeouts.

This protects your own threads and gives the broken service time to recover. After a pause, the breaker lets a test request through ('half-open'); if it works, it closes again.

Combine with timeouts and retries with exponential backoff.

Remember

Circuit breaker = stop calling a failing service for a while.

Key terms

Practice this question in Repaso