Tobi Lutke, Shopify founder, built the core of what would become the biggest provider of e-commerce storefronts for small business in 2004 using Ruby on Rails. The same programming language helped define much of the wiring of the world’s internet-based software — from Twitter to Basecamp.

More web programming languages have become popular in the last 15 years but Shopify still uses Rails at the core although it has significantly improved the way it handles data and keeps over 820,000 online shops running smoothly. The company’s approach gives it a competitive edge.

Built to scale

Shopify, like most companies and even humans had to learn from its mistakes to grow at a massive scale.

By 2014, Shopify was overwhelmed by so much data. As a solution, the company split up its core database that compares to a giant and overflowing warehouse into partitions, like a series of storage spaces rather than one large warehouse.

Unfortunately, according to Shopify Production Engineer Kir Shatrov, the solution introduced an entirely new problem. Instead of one MySQL database making requests of the rest of the infrastructure, it became multiples of mini databases which proved to be too much to bear.

Now, the company uses containers from Docker and Kubernetes to pull together “pods” of compute, storage, memory, and more representing a “full instance of Shopify with its own datastores,” Shatrov writes. The company uses the Google Kubernetes Engine to create and orchestrate its pods.

Is Shopify’s advantage is fading

Many had doubted Shopify’s ability to keep attracting merchants with more competition from Instagram and others.

Did the store expansion slow significantly? On Black Friday weekend in 2017, Shopify served a record of more than half a million merchants. Less than two years later, there are over 820,000 Shopify merchants. If Instagram is truly taking business away from Shopify, it won’t be serving 1 million merchants by 2019.

It looks like Shopify will pass 1.1 million merchants, and maybe more. Careful investments in its tech infrastructure over the last five years have allowed Shopify to position itself as the small business e-commerce platform that can scale up with successful businesses as they grow. Amazon introduced AWS for similar reasons.

Among small businesses, there are many that need the sort of scale that so far, only Shopify can offer.