JS API CDN Health Check?

221
1
10-14-2019 05:49 AM
Jay_Gregory
Occasional Contributor III

I've been asked to add a "failover" in our JS apps in case we lose access to the public internet or Esri's CDN goes offline.  So we're hosting a copy of the API locally, but we don't have the infrastructure to speedily deliver it to our geographically dispersed customers.  What I was thinking was to run a quick check on app load that tests access to Esri's CDN, and only point to our locally hosted version if that request fails.  

Is there a JS API "health check" endpoint so to speak?  If not that, what is the smallest possible resource I could test from js.arcgis.com to ensure connectivity?

Thanks!

0 Kudos
1 Reply
ChristopherKoenig
Esri Contributor

Hi Jay,

To answer your question about the smallest resource you can use to check the status of the ArcGIS JavaScript API you might be able to check if your app can access https://js.arcgis.com/4.13/dojo/dojo.js.

There is a non-programmatic way to check the status of Esri's services at the ArcGIS Online Health Dashboard.  The status of the JavaScript API CDN would fall under the 'ArcGIS.com Web Site' service status.

Sincerely,

Chris

0 Kudos