<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How much does does using a relative date filter effect CDN, scalability and performance? in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/how-much-does-does-using-a-relative-date-filter/m-p/1624911#M65129</link>
    <description>&lt;P&gt;We have a hosted feature service that is updated frequently through a ArcGIS Velocity feed. The hosted feature service is published as a public hosted view and consumed in a public instant web app.&lt;/P&gt;&lt;P&gt;The hosted view has editing disabled and CDN enabled.&lt;/P&gt;&lt;P&gt;Typically the hosted view will display between 10 and 100 polygons.&lt;/P&gt;&lt;P&gt;We wish to make the app as performant as possible as we are expecting large spikes in usage. We are trying to follow the&amp;nbsp;&lt;A href="https://doc.arcgis.com/en/arcgis-online/reference/best-practices-scalable-web-apps.htm#ESRI_SECTION1_21F56956CC0C4A20836DE7030E938BFA" target="_blank" rel="noopener"&gt;Best practices to optimize scalability&lt;/A&gt; guidelines. Unfortunately, due to a limitation of ArcGIS Velocity analytics, we need to use a relative date filter in the hosted view definition. The filter we are using is update_date within the last 5 minutes. This is necessary to filter out features that are no longer in the Velocity feed. (We can't use Gap Analysis as it doesn't work on polygon features).&lt;/P&gt;&lt;P&gt;The best practices guide warns against using relative dates:&lt;/P&gt;&lt;P&gt;"When setting up &lt;A href="https://doc.arcgis.com/en/arcgis-online/manage-data/set-view-definition.htm" target="_blank" rel="noopener"&gt;view definitions&lt;/A&gt; and &lt;A href="https://doc.arcgis.com/en/arcgis-online/create-maps/apply-filters-mv.htm" target="_blank" rel="noopener"&gt;filters&lt;/A&gt;, do not use dynamic or relative date conditions, such as &lt;SPAN class=""&gt;current time&lt;/SPAN&gt;,&lt;EM&gt;&lt;STRONG&gt; &lt;SPAN class=""&gt;in the last five minutes&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;, &lt;SPAN class=""&gt;today&lt;/SPAN&gt;, &lt;SPAN class=""&gt;yesterday&lt;/SPAN&gt;, or &lt;SPAN class=""&gt;tomorrow&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;How much of an impact, or how do we measure the impact, of using a relative date filter?&lt;/P&gt;&lt;P&gt;Does it break the CDN?&lt;/P&gt;&lt;P&gt;Is it just the initial query before data is added to the cache that is slow?&lt;/P&gt;&lt;P&gt;Any insights or suggestions greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jun 2025 02:28:13 GMT</pubDate>
    <dc:creator>DrewDowling</dc:creator>
    <dc:date>2025-06-19T02:28:13Z</dc:date>
    <item>
      <title>How much does does using a relative date filter effect CDN, scalability and performance?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-much-does-does-using-a-relative-date-filter/m-p/1624911#M65129</link>
      <description>&lt;P&gt;We have a hosted feature service that is updated frequently through a ArcGIS Velocity feed. The hosted feature service is published as a public hosted view and consumed in a public instant web app.&lt;/P&gt;&lt;P&gt;The hosted view has editing disabled and CDN enabled.&lt;/P&gt;&lt;P&gt;Typically the hosted view will display between 10 and 100 polygons.&lt;/P&gt;&lt;P&gt;We wish to make the app as performant as possible as we are expecting large spikes in usage. We are trying to follow the&amp;nbsp;&lt;A href="https://doc.arcgis.com/en/arcgis-online/reference/best-practices-scalable-web-apps.htm#ESRI_SECTION1_21F56956CC0C4A20836DE7030E938BFA" target="_blank" rel="noopener"&gt;Best practices to optimize scalability&lt;/A&gt; guidelines. Unfortunately, due to a limitation of ArcGIS Velocity analytics, we need to use a relative date filter in the hosted view definition. The filter we are using is update_date within the last 5 minutes. This is necessary to filter out features that are no longer in the Velocity feed. (We can't use Gap Analysis as it doesn't work on polygon features).&lt;/P&gt;&lt;P&gt;The best practices guide warns against using relative dates:&lt;/P&gt;&lt;P&gt;"When setting up &lt;A href="https://doc.arcgis.com/en/arcgis-online/manage-data/set-view-definition.htm" target="_blank" rel="noopener"&gt;view definitions&lt;/A&gt; and &lt;A href="https://doc.arcgis.com/en/arcgis-online/create-maps/apply-filters-mv.htm" target="_blank" rel="noopener"&gt;filters&lt;/A&gt;, do not use dynamic or relative date conditions, such as &lt;SPAN class=""&gt;current time&lt;/SPAN&gt;,&lt;EM&gt;&lt;STRONG&gt; &lt;SPAN class=""&gt;in the last five minutes&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;, &lt;SPAN class=""&gt;today&lt;/SPAN&gt;, &lt;SPAN class=""&gt;yesterday&lt;/SPAN&gt;, or &lt;SPAN class=""&gt;tomorrow&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;How much of an impact, or how do we measure the impact, of using a relative date filter?&lt;/P&gt;&lt;P&gt;Does it break the CDN?&lt;/P&gt;&lt;P&gt;Is it just the initial query before data is added to the cache that is slow?&lt;/P&gt;&lt;P&gt;Any insights or suggestions greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2025 02:28:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-much-does-does-using-a-relative-date-filter/m-p/1624911#M65129</guid>
      <dc:creator>DrewDowling</dc:creator>
      <dc:date>2025-06-19T02:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: How much does does using a relative date filter effect CDN, scalability and performance?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-much-does-does-using-a-relative-date-filter/m-p/1627020#M65210</link>
      <description>&lt;P&gt;My understanding of this is that dynamic filters, such as relative date, cannot be cached and will always reach the database. This is because the underlying conditions (current time) - and thereby the cached response - is always changing. I believe this would apply to the browser cache, CDN and feature tile cache. For both view and map based filters.&lt;/P&gt;&lt;P&gt;You can check if the requests are going to the cache or database by monitoring the network traffic:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChristopherCounsell_0-1750905481389.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/135149iD20AD0D14D84F5D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChristopherCounsell_0-1750905481389.png" alt="ChristopherCounsell_0-1750905481389.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;x-cache: Hit from cloudfront&lt;/EM&gt; indicates the response comes from the CDN cache (miss = did not use CDN)&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;x-esri-ftiles-cache-compress: true&lt;/EM&gt; indicates the response is cached as a feature tile on the server&lt;/LI&gt;&lt;LI&gt;query-request units of 1-3 means it has not been cached and has gone to the database. Will count against your organization performance limits - too many requests and it'll timeout for 60 seconds.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/data-management/data-management/scalable-hosted-feature-layers-in-arcgis-online-tile-queries-and-response-caching" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/data-management/data-management/scalable-hosted-feature-layers-in-arcgis-online-tile-queries-and-response-caching&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/js-api-arcgis/mapping/mapping-large-datasets-on-the-web" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/js-api-arcgis/mapping/mapping-large-datasets-on-the-web&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://mediaspace.esri.com/media/t/1_oznrvijl" target="_blank"&gt;https://mediaspace.esri.com/media/t/1_oznrvijl&lt;/A&gt;&amp;nbsp;(might be a more recent UC video available...)&lt;/P&gt;&lt;P&gt;I don't know much about ArcGIS Velocity but you could look to try and use a different attribute e.g. calculate a field to "current" or "archived" as part of the feature updates and use that your filter. You'd still need to consider the edit frequency impact on indexing, CDN, feature tile cache generation... but I think it'll have some capacity to succeed where relative date filters won't.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2025 02:59:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-much-does-does-using-a-relative-date-filter/m-p/1627020#M65210</guid>
      <dc:creator>ChristopherCounsell</dc:creator>
      <dc:date>2025-06-26T02:59:56Z</dc:date>
    </item>
  </channel>
</rss>

