Investigating TTFB Variations on a Shopify Plus Store

Time to First Byte (TTFB) is a key performance metric that directly impacts the user experience of any online store. Recently, while comparing the TTFB of a large Shopify Plus store—a UK expansion store for UK customers—with a standard Shopify demo store, we noticed significant differences in response times, even on cache hits. Both requests were generated from the UK.

How We Identified the Issue

Initially, we observed slower network response times on the Shopify Plus store, which prompted a deeper investigation. By reviewing the Server Response headers including Server-Timing, we identified that the times were much slower for our store compared to the demo and that the x-dc header, which indicates the data center routing, showed that in our Plus store we are being routed through an EU datacenter to a US data centre whereas the demo store was served entirely from an EU datacenter.

Here’s a summary of the key findings:

Shopify Plus Store (UK-based):

TTFB: 526ms

Data Center Routing (x-dc): gcp-europe-west4, gcp-us-central1, gcp-us-central1

Cloudflare Request Duration: 207ms

Server Processing Time: 60ms

Shopify Demo Store (Theme Store):

TTFB: 70ms

Data Center Routing (x-dc): gcp-europe-west1, gcp-europe-west1, gcp-europe-west1

Cloudflare Request Duration: 56ms

Server Processing Time: 18ms

Key Findings

The x-dc header revealed that the Shopify Plus store is frequently routed through U.S. data centers (gcp-us-central1), despite both requests being made from the UK and the store serving a UK customer base. In contrast, the Shopify demo store is consistently routed through European data centers (gcp-europe-west1), leading to much faster TTFB.

Aside from the data center routing, there was no significant difference between other key metrics such as Cloudflare request duration or server processing time. This suggests that the data center routing is the main factor contributing to the slower performance of the Plus store.

The Search for Answers

We’ve spoken with various types of Shopify support, including Merchant Success and technical support, but have been unable to get any information on whether there are ways to optimise routing or why this issue is occurring.

We’re not looking for trade secrets on how Shopify routes data through different centre. Instead, we want to know whether there’s anything we can do via the theme or installed apps to prevent the need for routing through U.S. data centers, or whether this routing is entirely unrelated to the site’s build and only depends on traffic patterns or Shopify’s infrastructure decisions.

Conclusion

By reviewing Server-Timing HTTP headers and analysing the x-dc header, it’s clear that routing through U.S. data centers is the primary contributor to slower TTFB on the Shopify Plus store, despite it being a UK-based store serving UK customers. Understanding whether this is something we can influence through the site build or configuration would help developers optimise their stores more effectively.

If anyone in the community has encountered similar issues or has insight into how to improve data center routing for Shopify Plus stores, would love to hear your thoughts.

4 Likes

Under settings and privacy I believe, you can see which data center the store is located.

I have seen a number of old stores in the EU using the US data center.

Following thread.

1 Like

Following this since I also have a similar situation :slightly_smiling_face:

Added performance and removed liquid

Hi Mike!

Thanks for the detailed post and the investigation that you did.

This is 100% correct. Overall, our ultimate goal is to provide the best performance to the visitors. This involves keeping data and rendering as close to the shop’s operating region as possible.

Sometimes, this can’t be done right away. There will also be cases where we have to adjust the routing for maintenance reasons, especially before such big events like BFCM.

All that said, this situation with some of the EU stores should be temporary and resolved soon.

3 Likes

Hi Mateusz,

Thanks for taking the time to dive into this and share your insights. We were a bit concerned it might have been an implementation issue on our end, so it’s a relief to know that isn’t the case. Really glad to hear Shopify is aware of this and is close to a fix! Looking forward to seeing the results! :slight_smile:

2 Likes

@Mateusz-Shopify just confirming that we’ve now noticed our merchants store is being served entirely from Europe data centres, which leads me to believe this has been resolved. We’ve seen decent TTFB improvements, which is great! Thanks again for your assistance and to the Shopify team for getting this rolled out before BF!