Resource Caching - VarnishAdvanced setup
- requires additional moduleand VCL for Drupal- http://drupal.org/project/varnishGranular ttls (time to live)Specific resource (image/css) and pageelement! All available through VCL config.
Resource Caching - VarnishAnatomy of
a varnish hit:HTTP/1.1 200 OKServer: ApacheX-Drupal-Cache: MISSExpires: Sun, 19 Nov 1978 05:00:00 GMTLast-Modified: Tue, 08 Jan 2013 21:20:17 +0000Cache-Control: public, max-age=900ETag: "1357680017-1"Content-Language: enX-Generator: Drupal 7 (http://drupal.org)Link: </node/5468>; rel="shortlink",<http://badgerfakedomain.com/>; rel="canonical"Vary: Accept-EncodingContent-Type: text/html; charset=utf-8Date: Tue, 08 Jan 2013 21:20:22 GMTX-Varnish: 979772308 979772303Age: 3Via: 1.1 varnishConnection: keep-aliveX-Cache: HIT
Data Caching - memcachedExample:Core cache
- core cache tables (cache_*)Moved into memcached and shared betweenmultiple instances across multiple serversSimple api makes getting and setting easyDrupal requires - http://drupal.org/project/memcache and pecl extension
3rd Party Caching - AkamaiOne
of the biggest caching providersA high chance youve experienced Akamai 4-5times today.Static cache of resourcesContent Distribution Network100+ Edge servers all over the planet
Caching to the rescueEach layer
provides protection3rd Party - shield 99% of anon trafficVarnish - the restAnonymous users should never know your sitehas issues.
Debugging TipsConfigure different urls for
different platforms- Easier to identify what cache layer has anissueDont be afraid to flush caches- Your backend should be able to cope with itAnalyse headers! Drupal and Varnish provide alot of info