<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Posts on Ron Williams</title>
        <link>https://ronwilliams.io/posts/</link>
        <description>Recent content in Posts on Ron Williams</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-us</language>
        <copyright>Ron Williams</copyright>
        <lastBuildDate>Sun, 03 Jan 2016 00:21:44 -0400</lastBuildDate>
        <atom:link href="https://ronwilliams.io/posts/index.xml" rel="self" type="application/rss+xml" />
        
        <item>
            <title>RFC7231 Compliant HTTP Date Headers</title>
            <link>https://ronwilliams.io/posts/rfc7231-compliant-http-date-headers/</link>
            <pubDate>Sun, 03 Jan 2016 00:21:44 -0400</pubDate>
            
            <guid>https://ronwilliams.io/posts/rfc7231-compliant-http-date-headers/</guid>
            <description>Tracking down the Date Header standard. Improve reverse-proxy and edge caching with proper HTTP Date header usage.
 PROJECT BACKGROUND Over the past five months, I have worked on the USDA WCMaaS (Web Content Management as a Service) Platform helping migrate and launch several Drupal and static based websites on the environment. WCMaaS is a Salt managed and Docker containerized system intended for use across USDA for improving sites. Inline with other modern tools selected, the system uses Varnish 4.</description>
            <content type="html"><![CDATA[<blockquote>
<p>Tracking down the Date Header standard. Improve reverse-proxy and edge caching with proper HTTP Date header usage.</p>
</blockquote>
<h2 id="project-background">PROJECT BACKGROUND</h2>
<p>Over the past five months, I have worked on the USDA WCMaaS (Web Content Management as a Service) Platform helping migrate and launch several Drupal and static based websites on the environment. WCMaaS is a Salt managed and Docker containerized system intended for use across USDA for improving sites. Inline with other modern tools selected, the system uses Varnish 4.x (version is important later!). We&rsquo;ve gone from site launches requiring months to our recent launch being 16 days from dev delivery to production. Overall it has been rewarding and we&rsquo;re now implementing changes on an agile basis including Solr and reliable Akamai profiles. Within the Akamai Luna control panel I noticed that the hit-offload metric was very low (5%) which meant less than an ideal amount of traffic was being handle by the edge caching provided by Akamai&rsquo;s service.</p>
<h2 id="investigating-http-response-headers">INVESTIGATING HTTP RESPONSE HEADERS</h2>
<p>After opening a ticket with Akamai, they tracked down some of the issue to the HTTP Date response header returned by the origin servers. When returning the Date header using curl (some headers redacted for clarity), the field content returned a range of 1-15 minutes in the past.</p>
<pre><code>$ curl -sI https://example.gov/sites/default/files/file.pdf -H &quot;Host: farmtoschoolcensus.fns.usda.gov&quot;
HTTP/1.1 200 OK
Date: Sun, 20 Dec 2015 13:00:41 GMT
Last-Modified: Mon, 23 Nov 2015 15:12:39 GMT
Cache-Control: max-age=1209600
Expires: Sun, 03 Jan 2016 13:00:41 GMT
X-Varnish: 8614352 6450650
Age: 196430
Via: 1.1 varnish-v4
X-Cache: HIT
</code></pre><h2 id="is-something-wrong-with-varnish">IS SOMETHING WRONG WITH VARNISH?</h2>
<p>With the information provided by Akamai, I set out to find out why Varnish was setting an old date header. For my personal server I have Varnish 3.x and the same commands against that system return a more immediate timestamp compared to Varnish 4.x. In 2014, Varnish devs intentionally changed the Date header behavior to <a href="https://www.varnish-cache.org/trac/changeset/89870e0bbd785964c322e1e453f492d747731c88/">use the Date header provided by the backend</a> (in my case, Docker containers running Apache). A <a href="https://www.varnish-cache.org/trac/ticket/1673">Varnish Date header issue</a> was closed and marked Won&rsquo;t Fix and referred to the original commit. Within the commit was a reference to <a href="https://www.ietf.org/rfc/rfc2616.txt">RFC2616</a>, the old circa 1999 web standard document that was incredibly formative to the internet, but could not predict all potential implementations or new technologies.</p>
<h2 id="researching-the-rfc26167231-standards">RESEARCHING THE RFC2616/7231 STANDARDS</h2>
<p>With a lead from the Varnish issue queue, I reviewed RFC 2616 then found section 14.18:</p>
<pre><code>   The Date general-header field represents the date and time at which
   the message was originated, having the same semantics as orig-date in
   RFC 822. The field value is an HTTP-date, as described in section
   3.3.1; it MUST be sent in RFC 1123 [8]-date format.
 
       Date  = &quot;Date&quot; &quot;:&quot; HTTP-date
 
   An example is
 
       Date: Tue, 15 Nov 1994 08:12:31 GMT
 
   Origin servers MUST include a Date header field in all responses,
   except in these cases:
</code></pre><p>I’ve drawn attention to orig-date which is defined in <a href="https://www.ietf.org/rfc/rfc0822.txt">RFC822</a> (a 1982 document!) as ‘original’. I looked for a newer spec since the RFC822 standards doc was a bit sparse and the <a href="https://www.mnot.net/blog/2014/06/07/rfc2616_is_dead">IETF HTTP Working Group chair recommends against RFC2616</a>. <a href="https://httpwg.github.io/specs/rfc7231.html#header.date">RFC7231</a> provides a similar definition, but instead refers to <a href="https://tools.ietf.org/html/rfc5322#section-3.6.1">RFC5322</a> as a definition of the orig-date:</p>
<pre><code>   The origination date specifies the date and time at which the creator
   of the message indicated that the message was complete and ready to
   enter the mail delivery system.  For instance, this might be the time
   that a user pushes the &quot;send&quot; or &quot;submit&quot; button in an application
   program.  In any case, it is specifically not intended to convey the
   time that the message is actually transported, but rather the time at
   which the human or other creator of the message has put the message
   into its final form, ready for transport.  (For example, a portable
   computer user who is not connected to a network might queue a message
   for delivery.  The origination date is intended to contain the date
   and time that the user queued the message, not the time when the user
   connected to the network to send the message.)
</code></pre><h2 id="final-verdict-caches-should-use-backend-date-header-content">FINAL VERDICT: CACHES SHOULD USE BACKEND DATE HEADER CONTENT</h2>
<p>While standards are subject to interpretation, the backend/origin Date header should be used by caches (edge and reverse proxy). I do believe that the Varnish mechanism of passing on the backend request headers is appropriate. I&rsquo;ll be commenting on the Varnish issue so future users won&rsquo;t research as much to find out what the Varnish devs have already concluded. In addition we&rsquo;re working with Akamai to update our cache profiles to use the origin Date header content as defined in the specs.</p>
]]></content>
        </item>
        
        <item>
            <title>Docker 4 Drupal Themes - Design 4 Drupal Boston 2015 Conference Session</title>
            <link>https://ronwilliams.io/posts/docker-4-drupal-themes-design-4-drupal-boston-2015-conference-session/</link>
            <pubDate>Sat, 01 Aug 2015 00:21:44 -0400</pubDate>
            
            <guid>https://ronwilliams.io/posts/docker-4-drupal-themes-design-4-drupal-boston-2015-conference-session/</guid>
            <description>Here&amp;rsquo;s the final session Docker 4 Drupal Themes after presenting in Philadelphia, DC, and Boston during July.
 Relevant links:
 USDA LAP/Drupal Docker Container Silarsis/Yeoman Docker Container  </description>
            <content type="html"><![CDATA[<p>Here&rsquo;s the final session Docker 4 Drupal Themes after presenting in Philadelphia, DC, and Boston during July.</p>
<iframe src="//www.slideshare.net/slideshow/embed_code/key/NYBVBfIntA5Zy6" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> <br>
<p>Relevant links:</p>
<ol>
<li><a href="http://usda-ocio-eas.github.io/lap-docker/">USDA LAP/Drupal Docker Container</a></li>
<li><a href="https://github.com/silarsis/yeoman">Silarsis/Yeoman Docker Container</a></li>
</ol>
]]></content>
        </item>
        
        <item>
            <title>SEO for Digital Media - GNSI Conference 2015 Presentation</title>
            <link>https://ronwilliams.io/posts/seo-digital-media-gnsi-conference-2015-presentation/</link>
            <pubDate>Wed, 08 Jul 2015 00:21:44 -0400</pubDate>
            
            <guid>https://ronwilliams.io/posts/seo-digital-media-gnsi-conference-2015-presentation/</guid>
            <description>I will be presenting at the Guild of Natural Science Illustrators Conference 2015 at Arcadia University on July 8th, 2015.
I have included slides from the presentation below.
 Upcoming session: Docker for Drupal Development with Ben Hosmer</description>
            <content type="html"><![CDATA[<p>I will be presenting at the <a href="http://2015.conf.gnsi.org/program/presentations/">Guild of Natural Science Illustrators</a> Conference 2015 at Arcadia University on July 8th, 2015.</p>
<p>I have included slides from the presentation below.</p>
<iframe src="https://www.slideshare.net/slideshow/embed_code/key/xWDWBtkwSxljDB" width="476" height="400" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
<p><em>Upcoming session:</em> <a href="https://www.drupalgovcon.org/drupal-govcon-2015/docker-drupal-development.html">Docker for Drupal Development</a> with <a href="http://radarearth.com/">Ben Hosmer</a></p>
]]></content>
        </item>
        
        <item>
            <title>Building A Scalable Private VMware Based Drupal Cloud Session</title>
            <link>https://ronwilliams.io/posts/building-scalable-private-vmware-based-drupal-cloud-session/</link>
            <pubDate>Fri, 01 Aug 2014 00:21:44 -0400</pubDate>
            
            <guid>https://ronwilliams.io/posts/building-scalable-private-vmware-based-drupal-cloud-session/</guid>
            <description>I&amp;rsquo;ll be presenting a session at DrupalCamp Colorado with Al Roberts entitled &amp;ldquo;Building A Scalable Private VMware Based Drupal Cloud&amp;rdquo;.
Slides:</description>
            <content type="html"><![CDATA[<p>I&rsquo;ll be presenting a session at DrupalCamp Colorado with Al Roberts entitled &ldquo;<a href="https://2014.drupalcampcolorado.org/session/building-scalable-private-vmware-based-drupal-cloud">Building A Scalable Private VMware Based Drupal Cloud</a>&rdquo;.</p>
<p>Slides:</p>
<iframe src="//www.slideshare.net/slideshow/embed_code/37591827" width="476" height="400" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>]]></content>
        </item>
        
    </channel>
</rss>
