Where to deploy custom app for the best performance?

Hi all

We are Australia based and use Azure.
I’ve created an app using react-router template (typescript) and deployed it to Azure cloud AEST (Sydney).

The app is getting inventory levels from several locations in one call, example:

In the graphql app, it takes 370ms to get the result.
In the app proxy, it takes 700 lowest with highest at 1.5 second.

Perhaps my app is deployed to the wrong place.
What is the best option performance-wise, main consideration being proximity between Shopify backend and the app.

HI,
What I don’t quite understand is why we need to use an app proxy when we can just call it directly in the Shopify app backend?

Hi Eric. I’m new to Shopify and perhaps missing something important.
I’m building a custom stock availability & delivery calculation logic. Stock data is native inventory in Shopify, parameters in location metafields. For the theme to show stock, it ajax calls my app (api), the app backend behind the api calls Shopify Graphql to retrieve the mentioned data and perform the calculus. Data is sensitive (including real stock numbers and warehouses). What can I do more simple?

Hi @Dimitry_Nechaev you are correct in your implementation here, in that you cannot make external HTTP requests (including to Admin API) in an Online Store storefront, and you are required to use App Proxies to make a request to your back end app, which then makes the Admin API call and returns the results through the app proxy to the storefront.

The additional steps there of making the request to your app, which makes the request to the API, and then responds to the app proxy request, will add more latency to the full request roundtrip, compared to just making the API call by itself in the GraphQL app or your own back end app.

hi Kellan

When I’m calling Graphql app, it responds from shopifycloud.com, which is a Google cloud IP range. What regions Shopify backend is hosted on in Australia?

Hi @Dimitry_Nechaev,

I do apologize, as while we do utilize servers located all throughout the world, we are unable to discuss the specifics of our internal infrastructure, due to internal security protocols, specifically in that we are unable to discuss anything that hasn’t been announced or discussed publicly, via our official channels, such as the Shopify Help Center, Changelogs, or Shopify Blog.

I may recommend checking out our Shopify Engineering Blog for more information.

Hi Kellan

Thanks for this great support.
I already figured the most kept secret - Shopify is hosted with Google Cloud. The rest is trial and catch.

1 Like