HerokuSiraj GhaffarExplainer
Optimizing Data Reliability: Heroku Connect & Drift Detection
Summary
Heroku Connect syncs Salesforce data with Heroku Postgres, but primary polling can miss changes when long-running Salesforce automations commit after the polling window advances, creating drift. The service uses secondary polls over the same bounds as primary polls to find and repair missed changes, with Bulk API or SOAP API selected according to dataset size and retries for failed polls. Recent improvements change Bulk API drift handling by creating one secondary bulk job for each primary bulk job, then adding corresponding batches instead of creating many jobs. Secondary tasks are now scheduled and executed with limited concurrency, reducing simultaneous database connections consumed while Postgres is updated and preserving capacity for applications. The post says these changes reduce load on Salesforce and improve operational reliability during heavy synchronization, while noting that Heroku Connect remains asynchronous rather than truly real-time.
Context
Primary polling can miss Salesforce changes when long-running automations commit after the polling window has advanced. These missed transactions create drift between Salesforce and Heroku Postgres, while unrestricted secondary polling can create many Salesforce bulk jobs and consume database connections needed by applications.
Approach / What changed
Heroku Connect tracks primary poll bounds and uses secondary polls to detect and repair missed changes. For Bulk API synchronization, it now creates one secondary bulk job per primary bulk job, adds corresponding batches, and limits the scheduling and concurrent execution of secondary poll tasks.
Takeaways
Secondary polls reuse the primary poll bounds to catch Salesforce changes that the initial poll missed.
For Bulk API drift detection, one secondary bulk job is created for each primary bulk job, with secondary batches corresponding to primary batches.
Limiting concurrent secondary poll tasks reduces database connections used during synchronization and leaves more connections available to applications.
Source and freshness
- Source
- heroku.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.