X-Sorting-Hat-PodId

The HTTP X-Sorting-Hat-PodId response header is an unofficial, Shopify-specific header identifying the pod handling a request in Shopify's multi-tenant infrastructure.

Usage

Shopify operates a podded architecture where each pod is a fully isolated instance of the platform, consisting of a dedicated MySQL database shard and supporting datastores like Redis and Memcached. Each pod houses a unique subset of merchant stores. The X-Sorting-Hat-PodId header reveals which pod processed a given request.

The "Sorting Hat" is Shopify's routing layer, deployed at the load balancer level. When a request arrives, the Sorting Hat consults a routing table, matches the target store to its assigned pod, and attaches the pod identifier as a header. Application servers downstream use this header to connect to the correct datastore, ensuring each request reaches only the data partition responsible for the targeted store.

Note

The X- prefix for non-standard headers is deprecated per RFC 6648.

Values

Numeric pod identifier

The value is a positive integer representing a specific pod in Shopify's infrastructure. Each number maps to an isolated set of datastores serving a group of merchant stores. The same store consistently routes to the same pod, though Shopify migrates stores between pods for load balancing.

-1

A value of -1 indicates the request was not routed to a specific pod. This appears on requests not mapped to a particular store, such as generic platform pages or unresolved domains.

Example

A request to a Shopify-hosted store returned a pod identifier of 337. This means the store's data lives on pod 337, and the Sorting Hat routed the request to the corresponding datastores.

X-Sorting-Hat-PodId: 337

A different store routed to pod 82. Stores on distinct pods have fully isolated data, so pod 82 has no access to the data on pod 337.

X-Sorting-Hat-PodId: 82

A value of -1 signals the request did not resolve to a store-specific pod. This commonly appears on staging domains or generic Shopify endpoints.

X-Sorting-Hat-PodId: -1

The X-Sorting-Hat-PodId header typically appears alongside other Shopify routing headers in the same response.

X-Sorting-Hat-PodId: 253
X-ShardId: 253
X-ShopId: 12345678
X-Sorting-Hat-ShopId: 12345678

Takeaway

The X-Sorting-Hat-PodId header identifies which pod in Shopify's multi-tenant architecture processed a request. The numeric value maps to an isolated data partition, making the header useful for diagnosing routing and infrastructure behavior on Shopify-hosted stores.

See also

Last updated: March 6, 2026