{"id":1329,"date":"2012-01-10T04:06:40","date_gmt":"2012-01-10T09:06:40","guid":{"rendered":"http:\/\/cd34.com\/blog\/?p=1329"},"modified":"2012-01-10T04:12:17","modified_gmt":"2012-01-10T09:12:17","slug":"finally-a-formal-release-for-my-wordpress-varnish-esi-plugin","status":"publish","type":"post","link":"https:\/\/cd34.com\/blog\/infrastructure\/finally-a-formal-release-for-my-wordpress-varnish-esi-plugin\/","title":{"rendered":"Finally, a formal release for my WordPress + Varnish + ESI plugin"},"content":{"rendered":"<p>A while back I wrote a plugin to take care of a particular client traffic problem. As the traffic came in very quickly and unexpectedly, I had only minutes to come up with a solution. As I knew Varnish pretty well, my initial reaction was to put the site behind Varnish. But, there&#8217;s a problem with Varnish and WordPress.<\/p>\n<p>WordPress is a cookie monster. It uses and depends on cookies for almost everything &#8211; and Varnish doesn&#8217;t cache assets that contain cookies. VCL was modified and tweaked, but, the site was still having problems.<\/p>\n<p>So, a plugin was born. Since I was familiar with ESI, I opted to write a quick plugin to cache the sidebar and the content would be handled by Varnish. On each request, Varnish would assemble the Edge Side Include and serve the page &#8211; saving the server from a meltdown.<\/p>\n<p>The plugin was never really production ready, though, I have used it for a year or so when particular client needs came up. When Varnish released 3.0, ESI could work with GZipped\/Deflated content which significantly increased the utility of the plugin.<\/p>\n<p>If you would like to read a detailed explanation of how the plugin works and why, here&#8217;s the <a href=\"\/blog\/scalability\/wordpress-varnish-and-esi-plugin\/\">original presentation<\/a> I gave in Florida.<\/p>\n<p>You can find the plugin on WordPress&#8217;s plugin hosting at <a href=\"http:\/\/wordpress.org\/extend\/plugins\/cd34-varnish-esi\/\">http:\/\/wordpress.org\/extend\/plugins\/cd34-varnish-esi\/<\/a>.<\/p>\n<div style=\"float:left;\">\n<div id=\"fb-root\"><\/div>\n<fb:like href=\"https:\/\/cd34.com\/blog\/infrastructure\/finally-a-formal-release-for-my-wordpress-varnish-esi-plugin\/\" width=\"250\" send=\"false\" show_faces=\"false\" layout=\"button_count\" action=\"recommend\"><\/fb:like>\n<\/div><div style=\"clear:both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>A while back I wrote a plugin to take care of a particular client traffic problem. As the traffic came in very quickly and unexpectedly, I had only minutes to come up with a solution. As I knew Varnish pretty well, my initial reaction was to put the site behind Varnish. But, there&#8217;s a problem [&hellip;]<\/p>\n<div style=\"float:left;\">\n<div id=\"fb-root\"><\/div>\n<fb:like href=\"https:\/\/cd34.com\/blog\/infrastructure\/finally-a-formal-release-for-my-wordpress-varnish-esi-plugin\/\" width=\"250\" send=\"false\" show_faces=\"false\" layout=\"button_count\" action=\"recommend\"><\/fb:like>\n<\/div><div style=\"clear:both;\"><\/div>","protected":false},"author":15,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[65,21,26],"class_list":["post-1329","post","type-post","status-publish","format-standard","hentry","category-infrastructure","tag-esi","tag-varnish","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/posts\/1329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/comments?post=1329"}],"version-history":[{"count":6,"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/posts\/1329\/revisions"}],"predecessor-version":[{"id":1335,"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/posts\/1329\/revisions\/1335"}],"wp:attachment":[{"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/media?parent=1329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/categories?post=1329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/tags?post=1329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}