Salesforce Decode
Salesforcedecode
Back to questions
IntegrationIntermediatetimeoutcalloutapex

Align Apex HTTP callout timeout with middleware and external SLA

Real World Scenario

Apex callout timeout 10 seconds but MuleSoft route timeout 60 seconds causing orphaned MuleSoft transactions when Apex already failed.

Expected Answer

• Timeout chain: external SLA plus buffer equals middleware equals Apex callout • Apex max 120s but user transaction budget usually under 10s • Async callout for long external processes with callback • Correlation ID passed all layers matching timeout logs • MuleSoft async pattern when Apex cannot wait • Document timeout matrix per integration interface • Never set Apex timeout higher than Flow synchronous limit

Follow-Up Questions & Answers

Click to expand — each follow-up includes a direct, interview-ready answer

Never fail silently. Timeout chain: external SLA plus buffer equals middleware equals Apex callout. Implement retry with exponential backoff and a dead-letter queue for permanent failures. Misaligned timeouts create ghost transactions—architect timeout chain top-down from UX budget. Balance speed of delivery with maintainability.

Architect Perspective

Misaligned timeouts create ghost transactions—architect timeout chain top-down from UX budget.