IntegrationAdvancedcircuit-breakerresiliencecallouts
Design circuit breaker pattern when external systems fail during Salesforce callouts
Real World Scenario
Credit bureau API outage causes thousands of Apex callout exceptions filling debug logs and blocking loan application Flows.
Expected Answer
• Circuit breaker states Closed Open Half-Open tracking failure rate
• Open circuit fails fast with user message skip callout for cooldown period
• Half-open test single request before closing circuit
• Fallback: manual review queue when bureau unavailable
• Platform Cache stores circuit state across transactions
• Middleware circuit breaker preferred over Apex per-transaction logic
• Alert when circuit opens page ops before user flood
Follow-Up Questions & Answers
Click to expand — each follow-up includes a direct, interview-ready answer
Main difference: use case and scale. Circuit breaker states Closed Open Half-Open tracking failure rate. Open circuit fails fast with user message skip callout for cooldown period. Pick based on your integration pattern and team capability. Fail fast beats retry storm—circuit breaker protects Salesforce governor limits and user experience. Optimize for scale and operational observability.
Architect Perspective
Fail fast beats retry storm—circuit breaker protects Salesforce governor limits and user experience.