<?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 Re: Caching All Static Content in the Splunk UI in Security</title>
    <link>https://community.splunk.com/t5/Security/Caching-All-Static-Content-in-the-Splunk-UI/m-p/69429#M2266</link>
    <description>&lt;P&gt;Another way would to cache only static objects matching a pattern, for example with varnish in vcl_recv:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;if (req.request == "GET" &amp;amp;&amp;amp; req.url ~ ".(gif|jpg|swf|css|js|png|jpg|jpeg|gif|png|tiff|tif|svg|swf|ico|css|js|vsd|doc|ppt|pps|xls|mp3|mp4|m4a|ogg|mov|avi|wmv|sxw|zip|gz|bz2|tgz|tar|rar|)$" ) {&lt;BR /&gt;
    return(lookup);&lt;BR /&gt;
}&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;HTH.&lt;/P&gt;

&lt;P&gt;Simon&lt;/P&gt;</description>
    <pubDate>Sat, 01 Oct 2011 09:17:56 GMT</pubDate>
    <dc:creator>Simon</dc:creator>
    <dc:date>2011-10-01T09:17:56Z</dc:date>
    <item>
      <title>Caching All Static Content in the Splunk UI</title>
      <link>https://community.splunk.com/t5/Security/Caching-All-Static-Content-in-the-Splunk-UI/m-p/69427#M2264</link>
      <description>&lt;P&gt;In troubleshooting an unrelated problem with Firebug, I took a look at the amount of http calls to static content, and it seems fairly significant.  What are the recommended approaches supported by Splunk to cache content?&lt;/P&gt;

&lt;P&gt;When I have done Plone development in the past I have used Varnish [1] and that had a dramatic impact on a heavy UI.  I am curious what caching system splunk customers use.  We are currently using ngnix, so perhaps enabling their caching might be a good choice [2].&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;A href="http://en.wikipedia.org/wiki/Varnish_(software" rel="nofollow"&gt;http://en.wikipedia.org/wiki/Varnish_(software&lt;/A&gt;)&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://wiki.nginx.org/NginxHttpProxyModule#proxy_cache_path" rel="nofollow"&gt;http://wiki.nginx.org/NginxHttpProxyModule#proxy_cache_path&lt;/A&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Wed, 13 Oct 2010 05:41:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Caching-All-Static-Content-in-the-Splunk-UI/m-p/69427#M2264</guid>
      <dc:creator>ngift</dc:creator>
      <dc:date>2010-10-13T05:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Caching All Static Content in the Splunk UI</title>
      <link>https://community.splunk.com/t5/Security/Caching-All-Static-Content-in-the-Splunk-UI/m-p/69428#M2265</link>
      <description>&lt;P&gt;I've used Apache httpd in front of Splunk with mod_cache and mod_rewrite/mod_expires to cache static content both on the client side (Expires header) and on the reverse proxy (in-memory cache). This brought a noticeable performance gain in some cases. This is possible with nginx as well. If you need to optimize the UI performance, you could cache all URIs that start with either &lt;CODE&gt;/&amp;lt;locale&amp;gt;/static&lt;/CODE&gt; or &lt;CODE&gt;/&amp;lt;locale&amp;gt;/modules&lt;/CODE&gt;. &lt;/P&gt;

&lt;P&gt;eg. &lt;CODE&gt;/en-US/static/*&lt;/CODE&gt; and &lt;CODE&gt;/en-US/modules/*&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The only thing that you might be aware of is that some custom modules from splunkbase are generating static content on-the-fly. This generated content should not be cached and those modules might not work correctly with such a configuration.&lt;/P&gt;

&lt;P&gt;As an example, the nginx configuration could look like this (not tested):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    location ~ ^/[a-z]+\-[A-Z]+/(static|modules)/.* {
        proxy_pass             &lt;A href="http://127.0.0.1:8000" target="test_blank"&gt;http://127.0.0.1:8000&lt;/A&gt;;
        proxy_set_header       Host $host;
        proxy_cache            STATIC;
        proxy_cache_valid      200  1d;
        proxy_cache_use_stale  error timeout invalid_header updating
                               http_500 http_502 http_503 http_504;
        expires 24h;
    }
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Oct 2010 06:12:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Caching-All-Static-Content-in-the-Splunk-UI/m-p/69428#M2265</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-10-13T06:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Caching All Static Content in the Splunk UI</title>
      <link>https://community.splunk.com/t5/Security/Caching-All-Static-Content-in-the-Splunk-UI/m-p/69429#M2266</link>
      <description>&lt;P&gt;Another way would to cache only static objects matching a pattern, for example with varnish in vcl_recv:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;if (req.request == "GET" &amp;amp;&amp;amp; req.url ~ ".(gif|jpg|swf|css|js|png|jpg|jpeg|gif|png|tiff|tif|svg|swf|ico|css|js|vsd|doc|ppt|pps|xls|mp3|mp4|m4a|ogg|mov|avi|wmv|sxw|zip|gz|bz2|tgz|tar|rar|)$" ) {&lt;BR /&gt;
    return(lookup);&lt;BR /&gt;
}&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;HTH.&lt;/P&gt;

&lt;P&gt;Simon&lt;/P&gt;</description>
      <pubDate>Sat, 01 Oct 2011 09:17:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Caching-All-Static-Content-in-the-Splunk-UI/m-p/69429#M2266</guid>
      <dc:creator>Simon</dc:creator>
      <dc:date>2011-10-01T09:17:56Z</dc:date>
    </item>
  </channel>
</rss>

