This site is in beta. We welcome your feedbackOpen link in new window

Pattern Overview

Heroku is a part of the Salesforce Platform that is well-suited to handling large volumes of API requests and is frequently used to improve scalability. For example, a common pattern is to use Heroku ConnectOpen link in new window to enable synchronization between Salesforce and Heroku Postgres.

Extending CRM with Heroku Connect

Here, a large number of client systems can access Heroku to retrieve data that is kept in sync with Salesforce. As the clients scale, the number of Postgres databases and the number of Heroku dynos can be scaled to meet the increased demand. Meanwhile, the demand on Salesforce itself remains unaffected.

Complexity Considerations

Scaling Salesforce environments in this way comes with some added complexity. External clients will either need to query the Postgres database or connect through a custom API implemented on Heroku web dynos. Heroku Connect has strong management tools, but you’ll need to consider how Salesforce sandbox refreshes work with your other integration testing environments.

Additionally, there is some risk that data can get out of syncOpen link in new window in rare circumstances. You'll need to consider this in your implementation.

Security Considerations

Security is another factor to consider because the ownership structures (like Profiles, Roles, Territory Management, etc) you can configure in the core CRM functions of Salesforce are not extended automatically into Heroku. If you have complex security requirements, you may face additional complexity in the Heroku implementation.

For many businesses, this approach offers the best of both worlds. Salesforce provides a flexible base architecture, with the steady scale that a business needs day to day, and Heroku complements this with the ability to scale up to meet the needs of high-volume processes that would be affected by governor limits if run directly against Salesforce.

About the Contributors

Steve Stearns is a Regional Success Architect Director at Salesforce on the Scale and Availability team. Scale and Availability architects apply the learnings from our large customer engagements to help influence product scale evolution and innovation.