App Proxy Speed

New Member
3 0 0

Does anyone know of any limitations (speed wise) of the App Proxies? I have a simple ajax call that is just returning a 2 line JSON text from my server. This is taking almost 600ms.

When I test my server direct, the response is around 30ms.

I am wondering if this is possibly one or a mix of the following:

  • The app proxy takes time to process the request. I am not sure this could account for 550ms though.
  • The location of the server that is making the call to mine is very far away. Although I have speed tested my server from London (my location) and Canada and both are 30 - 60ms in general.
  • Something else on the page is making the proxy request look slow. i.e. Maybe the ajax call is doing some other work, but again I am not sure this could add another ~550ms.

Any advice much appreciated!

0 Likes
New Member
3 0 0

I have found the answer to this...I should have just tested the proxy directly...

 

The app proxy is slow:

https://www.thehairpinlegcompany.co.uk/apps/stock-info/reviews

Just to reiterate, this is just responding with a cached JSON string. There is no other work happening on the server.

How do the app providers do this when we are able to make calls directly to their servers? i.e. for reviews.io we can call 

https://api.reviews.co.uk

Direct from the browser, and there are no CORS issues. If I try to call my own server, it fails due to CORS, so using the proxy is the only option as far as I can see.

0 Likes
New Member
3 0 0

Final thing I have found, just to help anyone else who comes up against this. If you own the responding server (i.e. are in control of the app code), you can respond with the header:

'access-control-allow-origin' => "*"

 This is not recommended unless the API is intended to be public, but I think in these cases this would be fine. More info here:

https://www.moesif.com/blog/technical/cors/Authoritative-Guide-to-CORS-Cross-Origin-Resource-Sharing...

0 Likes
Shopify Partner
1388 26 254

I get the same ~600ms response for my own App Proxy. Unfortunately, it is indeed quite slow.

0 Likes