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:
Any advice much appreciated!
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.
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:
User | Count |
---|---|
3 | |
3 | |
3 | |
3 | |
2 |