ForceChallenges
ProblemsDailyNotesInterview
Sign in

Practice

All problemsSOQL practiceApex trigger challengesDaily challengeOpportunityTrigger.oldMapBefore UpdateBulkificationContactValidationGROUP BYSemi-JoinAccountBefore Insert

Interview questions

All questionsAdminAdministrationApexApex TriggerAsync ApexDevelopmentField ServiceField ServiceIntegrationLwc

By company

DeloitteSalesforceAccentureInfosysPwCCognizant

Learn

Study notes

ForceChallenges

AboutContact usPrivacy PolicyTerms of ServiceFor AI assistants (llms.txt)
© 2026 ForceChallenges · Salesforce SOQL & Apex trigger practice
Integration questions12 of 100
IntegrationMedium 2 min read

What disaster recovery and failover architectures ensure high availability for mission-critical enterprise integrations?

Answer

Basics: Salesforce operates multi-site infrastructure and has its own disaster recovery (site switching, status at trust.salesforce.com). Your responsibility is the integration layer, the external systems, and your data recovery design. The question is what happens when either side is down.

How it works:

  1. Redundant middleware: active-active or active-passive instances behind a load balancer or DNS failover; stateless so any node can handle any message.
  2. Durable buffering: queue messages (message broker, or Salesforce Platform Events within retention) so outages do not lose data.
  3. Retry with exponential backoff and a cap, plus idempotent receivers so retries are safe.
  4. Circuit breaker: stop calling a failing endpoint and queue or fail fast.
  5. Endpoint failover: in Salesforce use Named Credentials so the endpoint can be repointed in one place; keep a standby endpoint.
  6. Replay and reconcile: after recovery, replay events (72-hour window for platform events) or run delta syncs using SystemModstamp.

Advanced / deep dive: Define RPO and RTO per integration; mission-critical order flows may need near-zero RPO (dual writes are risky; prefer events plus reconciliation). Salesforce outbound messages retry for up to 24 hours; Apex callouts do not retry on their own, so build retry via Queueable/Scheduled jobs. Because Salesforce IP ranges and instance addresses can change (and Hyperforce changes hosting), integrate by My Domain and Named Credentials and avoid hard-coding instance URLs. Keep backups: Salesforce Backup and Restore (paid) or exports/third-party tools, since the recycle bin holds deleted records for only 15 days. Test failover regularly with game days, and monitor with synthetic transactions.

Code / config example:

Failover pattern (declarative + middleware):
Named Credential "ERP_Primary" -> https://erp-a.example.com
On repeated 5xx/timeouts (circuit open after N failures):
  update endpoint to "ERP_Secondary" (deploy Named Credential change or use a gateway DNS name)
Failed messages -> Integration_Log__c (Status = Retrying) -> scheduled Queueable retries with backoff

Hidden gotchas & must-remember points:

  • Salesforce does not give you control of its failover; design for tolerance.
  • Platform event replay window is limited (72 hours); long outages need delta sync.
  • Never hard-code instance URLs or IPs.
  • Retries without idempotency create duplicates.
  • Backups are separate from the recycle bin (15 days).
  • A single middleware node is a single point of failure.

Best practice: Stateless redundant middleware, durable queues, idempotent retries, and a rehearsed recovery plan with defined RPO and RTO.

IntegrationDisaster RecoveryHigh Availability
Practice SOQL & Apex
PreviousWhat data cleansing and transformation practices ensure high data quality during inbound enterprise integrations?Next How do mock testing frameworks simulate negative server scenarios during integration unit test executions?

More Integration questions

  • How do PushTopics combine SOQL query criteria with real-time streaming notifications in Salesforce?
  • How do webhook security mechanisms verify the authenticity of incoming HTTP notifications from external systems?
  • How do federated identity and SAML single sign-on streamline authentication across enterprise integration landscapes?
  • How do CORS settings permit authorized web applications to perform cross-origin REST requests against Salesforce?
  • How do rate limiting and throttling mechanisms protect Salesforce endpoints from excessive traffic spikes?