Since the beginning of February 2020, you may have noticed some familiar-looking Esri web applications popping up in your newsfeeds, media sites, and agencies like WHO, regarding the novel coronavirus, Covid-19. This is because ArcGIS Online is being used by many authoritative sources and community members to share information about Coronavirus through dashboards, apps and maps. These applications have provided public information to hundreds of millions—probably billions—of people worldwide. For example, the Johns Hopkins University dashboard has received over 1.5 million views an hour during the week of March 8th, 2020, depending on the time of day. ArcGIS Online is built on reliable, scalable infrastructure that supports the massive amount web traffic that the Covid-19 applications receive.
During the virtual 2020 Esri Developers Summit, Sud Menon and Jeremy Bartley highlighted technical components of ArcGIS Online, including response caching, dynamic feature tiles and Content Delivery Network (CDN), that make the ArcGIS Online infrastructure scalable. The purpose of this article is to quickly outline best practices to ensure that the applications you build for a large audience are using these key components of the ArcGIS Online infrastructure. As this article is a quick list of things to check, please use the links and references below to learn more about why the configurations are essential, and feel free to ask questions in the comments below.
Scalable checklist for web applications hosted on ArcGIS Online:
- Use ArcGIS Online to publish hosted feature layers, including feature layer views and web applications.
- Share hosted feature layers, web applications with everyone (this enables the use of CDN).
- Ensure the following layer settings are disabled on all hosted feature layers included in the application:
- – Editing
- – Sync
- – Ownership-based access when editor tracking is enabled. Click this link for more details about this setting.
- Set the cache control to align with your data update frequency on the layer settings page. By default, public layers are set to 30 seconds. If your data is being updated every 15 minutes, set the cache control to 15 minutes.
- Do not include relative date filters with the map, layer and/or application.
- – With Map Viewer or the visualization tab, don’t include filters that contains the “in the last” or “not in the last” operators.
- – With Dashboards, don’t include a filter that contains the following operators: “is within the last”, “is before the last”, “is within the next” or “is after the next”. When using the “is before” and “is after” operators, the period value cannot be “Now”.
- – With Web AppBuilder, don’t include the “in the last”, “not in the last”, “today”, “yesterday” and “tomorrow” operators when using the filter widget.
- Use attribute filters instead of spatial filters when showing data that updates by location. As an example, if you want to show the displaced population from a hurricane and filter the values by state, configure your app to filter via the state name, instead of using current map extent.
- – Dashboard settings for all operational layers and supported elements other than the Map
- – Web AppBuilder Infographic widget , Query widget, Info Summary widget
When the above settings are configured for public applications, response caching and CDN will be utilized, creating a fast, efficient application that can support high amounts of web traffic. If an app receives significant traffic without following the settings users of the application may notice that the layers in the application load intermittently.
To improve the performance ( speed of app loading and interactions) for these types of applications, consider implementing the following recommendations:
- When displaying a map with complex polygon and line geometry, enable Optimize Layer Drawing option on the layer settings page.
- If setting up an attribute filter for the application with a large dataset (more than 2000 features), create an attribute index with the layer. If the index was created prior to publishing (in ArcMap or ArcGIS Pro) the index will be inherited when the layer is published.
A note on Cacheable queries
Hosted feature layers in ArcGIS Online power maps and apps that can be used for sharing information publicly. The applications use feature layer queries to request data that is then visualized (features are drawn and power pop-ups). Often, the same information is requested and displayed by viewers of the application, and response caching can be used to efficiently use the response from a query over and over again until the data updates. As ArcGIS Online is built to show geospatial information, feature tiles are used to ensure that geometry information can also take advantage of response caching, even when extents and scales change when users are interacting with the map. When you follow the quick setup steps in this article, it ensures that your app is sending cacheable queries that can be stored and utilized by CDN, resulting in an app that is scalable and efficient anywhere in the world.