Business growth is a good problem to have. Companies can avoid many common growing pains by making smart technology choices, and no one knows this better than digital businesses like SHIFT Commerce and its customers. Choosing Heroku enabled SHIFT to quickly launch a scalable platform and successful business, which in turn helps online retailers better manage their own growth.
Based in the UK, SHIFT Commerce is an e-commerce solution built for scale. Many digital storefronts start out on plug n’ play platforms in order to reduce time to launch, only to become constrained by them as their business grows. SHIFT helps customers grow continuously with a new approach that gives them the speed of launch and affordability of a SaaS with the development flexibility of a hosted solution. Running a more flexible storefront on SHIFT enables customers to accelerate their path to enterprise scale and better manage large product catalogs, global expansion, and heavy demand.
Freedom to Focus on Delivering Value
SHIFT’s managed platform allows customers to focus on what they’re good at—running their business—without the pain of setting up and managing e-commerce infrastructure. This philosophy also guided the SHIFT founders in their early planning, and it was a core reason for choosing the platform-as-a-service approach for their own business. The engineering team wanted to focus on where they could add the most value: developing a great product, not managing application infrastructure.
Heroku is backed by teams who are experts in application infrastructure—scaling, security, data, etc. Heroku continues to innovate year after year and we get to reap the benefits. Ryan Townsend, CTO, SHIFT Commerce
When it came time to choose a PaaS, Heroku was their first choice. SHIFT’s CTO Ryan Townsend knows Heroku well. He started using the platform when it was in beta over 10 years ago and has been using Heroku at various companies ever since. Townsend knew that Heroku’s flexibility and enterprise-grade performance could help SHIFT Commerce build a scalable business model that would set the company up for future growth. Townsend also took future costs into consideration, finding long-term value in Heroku’s managed services.
I’d rather pay a bit more, be laser-focused on what we’re good at and let Heroku take care of what they’re good at, which is infrastructure. Ryan Townsend, CTO, SHIFT Commerce
Heroku Powers SHIFT’s Core Product
From day one, SHIFT Commerce put Heroku at its core and built an architecture that gets the most out of the platform. The team runs nearly everything using Heroku services and add-ons, except for a few outside services that are not available on the platform. Heroku makes many of SHIFT’s differentiating product features possible. For example, in order to provide freedom to front-end developers, their deployment engine uses the Heroku API to deploy front-end code that customers have uploaded to the SHIFT platform. Such features would be too costly and time-intensive if the SHIFT team had to build it all from scratch.
Much of our core product functionality would be far more complex, or even not exist, without Heroku. It would take us years to develop our own version of Heroku on AWS. Ryan Townsend, CTO, SHIFT Commerce
Doing More with Data Services on Heroku
A massive amount of data flows through SHIFT Commerce every day. As customers engage shoppers and grow their business, the platform must handle an exponential amount of data without impacting performance. SHIFT’s data architecture is built around Heroku’s three integrated data services.
Heroku Postgres is at the heart of SHIFT’s data layer. The relational database is the team’s go-to place for most of their data. Their implementation is intentionally straightforward, although the team does use some advanced features, like JSON columns for storing unstructured data, which allows each customer to utilise different attributes in their product catalogues. Rather than dealing with the limitations of a traditional document database, they can take advantage of the atomicity and guarantees that come with a relational database. SHIFT also relies on read-only replicas (followers) both to help serve faster reads and isolate long queries for reporting purposes.
SHIFT uses Apache Kafka on Heroku for asynchronous communication between the different services that make up their product. Knowing Kafka is built on super robust foundations with the ability to self-heal, by pausing streams when issues crop up and resuming once addressed, made it an obvious choice for such a critical element of their infrastructure. The team has been discovering more and more use cases for Kafka and creating their own innovative tools. Currently, they’re working on a proof of concept for a Kafka-based reporting tool for customers. The tool pulls data out of Kafka into a real-time dashboard for customers to view product sell-through reports. Customers can then push special offers in real-time during peak seasons or drive targeted merchandising throughout the day. If successful, the tool may get folded back into the SHIFT platform as a new feature.
Heroku Redis is primarily used as a job queue for Sidekiq to manage and process background jobs. Because Heroku configures Redis to persist data to disk, there’s no risk of data loss or reduced performance. However, now the company has adopted Kafka, the team is now finding there is a smaller dependency on Sidekiq, which helps simplify their architecture. SHIFT also takes advantage of Redis’s built-in pub/sub system that helps enable their platform’s scalability. Whenever an API call comes in, the platform would previously need to query the database to look up things like account configuration or feature flags. The more API calls; the greater the overhead. So instead, when the app boots up, it queries once for the initial settings, storing them in memory for lightning-fast access then subscribes to a stream in Redis for updates, so the app doesn’t have to query the database thereafter.
Heroku’s fully-managed data services free us from the time-consuming tasks around setting up, managing, and scaling our own data infrastructure. We can focus instead on coming up with new ways to use our data to benefit our customers. Ryan Townsend, CTO, SHIFT Commerce
Lower Risk Deployment, Higher Confidence
As SHIFT Commerce grows, so does its engineering team. Most new hires have some familiarity with Heroku, but those who don’t find it easy to ramp up quickly. The team uses most of Heroku’s collaboration tools, such as GitHub integration, Heroku Pipelines and review apps, to support their continuous delivery workflows.
One of Heroku’s biggest benefits for the team is the platform’s rollback feature. If a problem arises after pushing to production, developers can quickly revert to the previous release using a simple command. For the SHIFT team, this is liberating. Knowing that a consistent, reliable rollback process is always available lowers the risk of every deployment. It gives the team greater confidence to release faster and maintain a rapid development pace.
Our team members are all massive fans of Heroku. Everyone loves the fact that Heroku is something that we don't have to manage—it just works. Ryan Townsend, CTO, SHIFT Commerce
Growing Towards the Future
Going forward, SHIFT Commerce plans to expand their use of Heroku and explore new opportunities for driving growth. The team intends to experiment more with Kafka and build new features around data. They also plan to work with data scientists and bring in powerful technologies like artificial intelligence and machine learning to help them unlock the potential of SHIFT’s vast quantity of data for their business and their customers.
Inside SHIFT Commerce on Heroku
SHIFT launched as a monolithic Ruby app, and the team has since been breaking off pieces of it into a small set of microservices that focus on specific aspects of the business. Read more about the team's journey in Ryan Townsend's blog post: "Deconstructing Monolithic Applications into Services."
The SHIFT engineering team deploys using Heroku's CI/CD tools, such as GitHub integration, Heroku Pipelines, and review apps. The team uses Heroku Add-ons whenever they can to help speed up development. Their top add-ons include Elasticsearch, Algolia, and Memcached, and the SHIFT platform makes heavy use of data services: Heroku Postgres, Heroku Redis, and Apache Kafka on Heroku.
Listen to the Code[ish] podcast featuring Ryan Townsend: “Application Performance and Building SaaS on PaaS”.