{"id":505,"date":"2010-04-07T16:15:19","date_gmt":"2010-04-07T15:15:19","guid":{"rendered":"http:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/"},"modified":"2010-04-07T16:15:19","modified_gmt":"2010-04-07T15:15:19","slug":"handling-a-file-server-workload-with-varnish","status":"publish","type":"post","link":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/","title":{"rendered":"Handling a file-server workload with varnish"},"content":{"rendered":"<p>During last couple of months, we have been playing with varnish for <code>files.myopera.com<\/code>, the My Opera main files server.<\/p>\n<p>I&#39;m not sure this is a typical use case for varnish, maybe it is, but it has a few unique challenges which I&#39;ll try to explain here:<\/p>\n<ul>\n<li>really high number of connections (in the 10k range)<\/li>\n<li>large file set, ~100 millions<\/li>\n<li>the longer the TTL, the better (10 days it&#39;s the default)<\/li>\n<li>really simple or no VCL logic<\/li>\n<\/ul>\n<p>In other Varnish installations we&#39;re maintaining here at Opera, the real challenge is to seamlessly interface with backend application servers, but in this case the &quot;backend&quot; is just another http file server with little more logic.<\/p>\n<p>Searching around, and using the resources I mentioned some blog posts ago, we have found a few critical settings that need to be tuned to achieve consistent performance levels. Some are obvious, some others are not so obvious:<\/p>\n<ul>\n<li><b>threads related<\/b> parameters<\/li>\n<li><b>hash bucket size<\/b><\/li>\n<li><b>Session related<\/b> parameters<\/li>\n<li><b>Grace<\/b> config and health checking<\/li>\n<\/ul>\n<p>I&#39;ll explain all the settings we had to change and how they affected us in a later post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>During last couple of months, we have been playing with varnish for files.myopera.com, the My Opera main files server. I&#39;m not sure this is a typical use case for varnish, maybe it is, but it has a few unique challenges which I&#39;ll try to explain here: really high number of connections (in the 10k range) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[453,465,75,326,60],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Handling a file-server workload with varnish - Random hacking<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Handling a file-server workload with varnish - Random hacking\" \/>\n<meta property=\"og:description\" content=\"During last couple of months, we have been playing with varnish for files.myopera.com, the My Opera main files server. I&#039;m not sure this is a typical use case for varnish, maybe it is, but it has a few unique challenges which I&#039;ll try to explain here: really high number of connections (in the 10k range) [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/\" \/>\n<meta property=\"og:site_name\" content=\"Random hacking\" \/>\n<meta property=\"article:published_time\" content=\"2010-04-07T15:15:19+00:00\" \/>\n<meta name=\"author\" content=\"cosimo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"cosimo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/\"},\"author\":{\"name\":\"cosimo\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"headline\":\"Handling a file-server workload with varnish\",\"datePublished\":\"2010-04-07T15:15:19+00:00\",\"dateModified\":\"2010-04-07T15:15:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/\"},\"wordCount\":193,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"keywords\":[\"caching\",\"files\",\"performance\",\"server\",\"varnish\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/\",\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/\",\"name\":\"Handling a file-server workload with varnish - Random hacking\",\"isPartOf\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#website\"},\"datePublished\":\"2010-04-07T15:15:19+00:00\",\"dateModified\":\"2010-04-07T15:15:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.streppone.it\/cosimo\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Handling a file-server workload with varnish\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#website\",\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/\",\"name\":\"Random hacking\",\"description\":\"Assume nothing. Code defensively. Keep it simple, stupid!\",\"publisher\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.streppone.it\/cosimo\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\",\"name\":\"cosimo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g\",\"caption\":\"cosimo\"},\"logo\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/author\/cosimo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Handling a file-server workload with varnish - Random hacking","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/","og_locale":"en_US","og_type":"article","og_title":"Handling a file-server workload with varnish - Random hacking","og_description":"During last couple of months, we have been playing with varnish for files.myopera.com, the My Opera main files server. I&#39;m not sure this is a typical use case for varnish, maybe it is, but it has a few unique challenges which I&#39;ll try to explain here: really high number of connections (in the 10k range) [&hellip;]","og_url":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/","og_site_name":"Random hacking","article_published_time":"2010-04-07T15:15:19+00:00","author":"cosimo","twitter_card":"summary_large_image","twitter_misc":{"Written by":"cosimo","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/#article","isPartOf":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/"},"author":{"name":"cosimo","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"headline":"Handling a file-server workload with varnish","datePublished":"2010-04-07T15:15:19+00:00","dateModified":"2010-04-07T15:15:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/"},"wordCount":193,"commentCount":0,"publisher":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"keywords":["caching","files","performance","server","varnish"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/","url":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/","name":"Handling a file-server workload with varnish - Random hacking","isPartOf":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#website"},"datePublished":"2010-04-07T15:15:19+00:00","dateModified":"2010-04-07T15:15:19+00:00","breadcrumb":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/04\/handling-a-file-server-workload-with-varnish\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.streppone.it\/cosimo\/blog\/"},{"@type":"ListItem","position":2,"name":"Handling a file-server workload with varnish"}]},{"@type":"WebSite","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#website","url":"https:\/\/www.streppone.it\/cosimo\/blog\/","name":"Random hacking","description":"Assume nothing. Code defensively. Keep it simple, stupid!","publisher":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.streppone.it\/cosimo\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1","name":"cosimo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g","caption":"cosimo"},"logo":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/"},"url":"https:\/\/www.streppone.it\/cosimo\/blog\/author\/cosimo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts\/505"}],"collection":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/comments?post=505"}],"version-history":[{"count":0,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts\/505\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/media?parent=505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/categories?post=505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/tags?post=505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}