<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CKAN: Ticket #537: Caching and Performance improvement</title>
    <link>http://localhost/ticket/537</link>
    <description>&lt;p&gt;
There are several places where performance is unacceptably slow. Even in places where it is not, the system could still be more responsive for read requests.
&lt;/p&gt;
&lt;p&gt;
Introducing caching has to be done carefully and should be done in a &lt;em&gt;standards compliant manner&lt;/em&gt;.
&lt;/p&gt;
&lt;h2 id="Generalstrategy"&gt;General strategy&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;Where possible, cache output within the pylons app (beaker).
&lt;/li&gt;&lt;li&gt;Facilitate external caching in an end-user's web browser or a caching proxy
&lt;/li&gt;&lt;li&gt;Slightly stale data is not necessarily much of a problem so allow the output to be cached for a relatively short period (e.g. 5-15 minutes).
&lt;/li&gt;&lt;li&gt;When cache expiry has been reached, a request will be made to the server. The server should check if its internally cached data is still valid, and serve that, otherwise regenerate the data.
&lt;/li&gt;&lt;/ul&gt;&lt;h2 id="Tasks"&gt;Tasks&lt;/h2&gt;
&lt;p&gt;
These tasks should be broken into sub-tickets:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;caching of parts of templates that are expensive to render (package list, tag list, group list)
&lt;/li&gt;&lt;li&gt;caching of entire output using beaker particularly for API read operations.
&lt;/li&gt;&lt;li&gt;need to perform a check to see if the cache should be invalidated by checking if anything in the output would have changed -- i.e. checking timestamps on package modifications. this is a natural place to introduce the ETag which will help browsers and web caches.
&lt;/li&gt;&lt;li&gt;cache infrastructure front end - varnish, squid, etc. To do this right, the controllers need to set the cache control headers appropriately (max-age, must-revalidate). This is a good resource: &lt;a class="ext-link" href="http://www.mnot.net/cache_docs/#CACHE-CONTROL"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://www.mnot.net/cache_docs/#CACHE-CONTROL&lt;/a&gt;
&lt;ul&gt;&lt;li&gt;Deploy varnish on a host dedicated to this purpose for research. This will be useful for other sites as well
&lt;/li&gt;&lt;li&gt;Do not configure varnish to ignore cache control headers or otherwise behave in a non HTTP/1.1 compliant manner
&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 id="FutureWork"&gt;Future Work&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;Investigate ckanclient library maintaining a local cache as a web browser would
&lt;/li&gt;&lt;li&gt;Investigate using a CDN like Google Storage or Amazon for serving cached data.
&lt;/li&gt;&lt;/ul&gt;</description>
    <language>en-us</language>
    <image>
      <title>CKAN</title>
      <url>http://assets.okfn.org/p/ckan/img/ckan_logo_shortname.png</url>
      <link>http://localhost/ticket/537</link>
    </image>
    <generator>Trac 0.12.3</generator>
    <item>
      
        <dc:creator>wwaites</dc:creator>

      <pubDate>Mon, 30 Aug 2010 16:11:34 GMT</pubDate>
      <title>type changed</title>
      <link>http://localhost/ticket/537#comment:1</link>
      <guid isPermaLink="false">http://localhost/ticket/537#comment:1</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;type&lt;/strong&gt;
                changed from &lt;em&gt;requirement&lt;/em&gt; to &lt;em&gt;task&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>johnbywater</dc:creator>

      <pubDate>Mon, 30 Aug 2010 16:44:00 GMT</pubDate>
      <title>owner set; milestone deleted</title>
      <link>http://localhost/ticket/537#comment:2</link>
      <guid isPermaLink="false">http://localhost/ticket/537#comment:2</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;owner&lt;/strong&gt;
              set to &lt;em&gt;johnbywater&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;milestone&lt;/strong&gt;
                &lt;em&gt;ckan v1.2&lt;/em&gt; deleted
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>johnbywater</dc:creator>

      <pubDate>Mon, 30 Aug 2010 16:52:27 GMT</pubDate>
      <title>description changed</title>
      <link>http://localhost/ticket/537#comment:3</link>
      <guid isPermaLink="false">http://localhost/ticket/537#comment:3</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;description&lt;/strong&gt;
              modified (&lt;a href="/ticket/537?action=diff&amp;amp;version=3"&gt;diff&lt;/a&gt;)
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>johnbywater</dc:creator>

      <pubDate>Mon, 30 Aug 2010 16:53:31 GMT</pubDate>
      <title>description changed</title>
      <link>http://localhost/ticket/537#comment:4</link>
      <guid isPermaLink="false">http://localhost/ticket/537#comment:4</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;description&lt;/strong&gt;
              modified (&lt;a href="/ticket/537?action=diff&amp;amp;version=4"&gt;diff&lt;/a&gt;)
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>johnbywater</dc:creator>

      <pubDate>Mon, 30 Aug 2010 17:21:56 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/537#comment:5</link>
      <guid isPermaLink="false">http://localhost/ticket/537#comment:5</guid>
      <description>
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>johnbywater</dc:creator>

      <pubDate>Mon, 30 Aug 2010 17:23:37 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/537#comment:2</link>
      <guid isPermaLink="false">http://localhost/ticket/537#comment:2</guid>
      <description>
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>johnbywater</dc:creator>

      <pubDate>Mon, 30 Aug 2010 17:24:05 GMT</pubDate>
      <title>type changed</title>
      <link>http://localhost/ticket/537#comment:3</link>
      <guid isPermaLink="false">http://localhost/ticket/537#comment:3</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;type&lt;/strong&gt;
                changed from &lt;em&gt;task&lt;/em&gt; to &lt;em&gt;defect&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>johnbywater</dc:creator>

      <pubDate>Mon, 30 Aug 2010 17:24:48 GMT</pubDate>
      <title>type changed</title>
      <link>http://localhost/ticket/537#comment:4</link>
      <guid isPermaLink="false">http://localhost/ticket/537#comment:4</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;type&lt;/strong&gt;
                changed from &lt;em&gt;defect&lt;/em&gt; to &lt;em&gt;task&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>johnbywater</dc:creator>

      <pubDate>Mon, 30 Aug 2010 17:25:38 GMT</pubDate>
      <title>owner changed</title>
      <link>http://localhost/ticket/537#comment:5</link>
      <guid isPermaLink="false">http://localhost/ticket/537#comment:5</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;owner&lt;/strong&gt;
              changed from &lt;em&gt;johnbywater&lt;/em&gt; to &lt;em&gt;wwaites&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>wwaites</dc:creator>

      <pubDate>Wed, 01 Sep 2010 07:12:36 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/537#comment:6</link>
      <guid isPermaLink="false">http://localhost/ticket/537#comment:6</guid>
      <description>
        &lt;p&gt;
See &lt;a class="closed ticket" href="http://localhost/ticket/540" title="story: Implement caching in a systematic manner (closed: fixed)"&gt;#540&lt;/a&gt; for a story about Varnish. Strongly favouring squid at this juncture.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>dread</dc:creator>

      <pubDate>Mon, 25 Oct 2010 16:11:37 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/537#comment:7</link>
      <guid isPermaLink="false">http://localhost/ticket/537#comment:7</guid>
      <description>
        &lt;p&gt;
Can this ticket be updated? Were any tasks listed here done? Anything remaining still planned?
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>thejimmyg</dc:creator>

      <pubDate>Wed, 20 Jul 2011 16:22:09 GMT</pubDate>
      <title>status changed; priority, repo, theme, resolution set</title>
      <link>http://localhost/ticket/537#comment:8</link>
      <guid isPermaLink="false">http://localhost/ticket/537#comment:8</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;priority&lt;/strong&gt;
                set to &lt;em&gt;awaiting triage&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;repo&lt;/strong&gt;
                set to &lt;em&gt;ckan&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;theme&lt;/strong&gt;
                set to &lt;em&gt;none&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;new&lt;/em&gt; to &lt;em&gt;closed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;resolution&lt;/strong&gt;
                set to &lt;em&gt;duplicate&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Consolidation of caching has been moved in ticket &lt;a class="closed ticket" href="http://localhost/ticket/995" title="defect: consolidate caching (closed: wontfix)"&gt;#995&lt;/a&gt;.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>