# A Pods Architecture To Allow Shopify To Scale

DevFeed: [A Pods Architecture To Allow Shopify To Scale](<https://devfeed.tech/articles/a-pods-architecture-to-allow-shopify-to-scale-1284.md>)

Original publisher: [Read original article](<https://shopify.engineering/a-pods-architecture-to-allow-shopify-to-scale>)

Author: Xavier Denis

Published: 2018-03-02T19:30:00Z

Content type: article

Language: en

Sources: [Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering.md>), [Shopify Engineering - Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering-shopify-engineering.md>)

Topics: [App](<https://devfeed.tech/topics/app.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [data-centers](<https://devfeed.tech/tags/data-centers.md>), [database](<https://devfeed.tech/tags/database.md>), [disaster-recovery](<https://devfeed.tech/tags/disaster-recovery.md>), [outage](<https://devfeed.tech/tags/outage.md>), [performance](<https://devfeed.tech/tags/performance.md>), [platform](<https://devfeed.tech/tags/platform.md>), [resilience](<https://devfeed.tech/tags/resilience.md>), [scalability](<https://devfeed.tech/tags/scalability.md>), [scale](<https://devfeed.tech/tags/scale.md>), [server](<https://devfeed.tech/tags/server.md>), [shopify](<https://devfeed.tech/tags/shopify.md>), [workers](<https://devfeed.tech/tags/workers.md>)

## AI overview

Shopify describes a pod-based runtime architecture that isolates sets of shops and their datastores to improve horizontal scalability and limit the impact of failures. Requests and delayed jobs are assigned to one pod, while load balancers use Sorting Hat to route requests to the appropriate pod.

## Source excerpt

In 2015, it was no longer possible to continue buying a larger database server for Shopify. We finally had no choice but to shard the database, which allowed us to horizontally scale our databases and continue our growth. However, what we gained in performance and scalability we lost in resilience. Throughout the Shopify codebase was code like this: Sharding.with_each_shard do some_action end If any of our shards went down, that entire action would be unavailable across the platform. We realized this would become a major problem as the number of shards continued to increase. In 2016 we sat down to reorganize Shopify's runtime architecture.