{"id":2493,"date":"2017-04-02T01:45:15","date_gmt":"2017-04-01T16:45:15","guid":{"rendered":"http:\/\/blog.xcir.net\/?p=2493"},"modified":"2017-04-05T01:08:50","modified_gmt":"2017-04-04T16:08:50","slug":"varnish5-1-1%e3%81%8c%e3%83%aa%e3%83%aa%e3%83%bc%e3%82%b9%e3%81%95%e3%82%8c%e3%81%be%e3%81%97%e3%81%9f","status":"publish","type":"post","link":"http:\/\/blog.xcir.net\/?p=2493","title":{"rendered":"Varnish5.1.1\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f"},"content":{"rendered":"<p>5.0.0\u306e\u5f8c\u7d99\u306e5.1.1\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f\u3002 [<a href=\"https:\/\/github.com\/varnishcache\/varnish-cache\/blob\/varnish-5.1.1\/doc\/changes.rst\">changelog<\/a>] [<a href=\"https:\/\/www.varnish-cache.org\/#varnish-5-1-1-is-here\">\u30ea\u30ea\u30fc\u30b9\u6587<\/a>] [<a href=\"https:\/\/www.varnish-cache.org\/docs\/trunk\/whats-new\/changes-5.1.html\">changes<\/a>] [<a href=\"https:\/\/www.varnish-cache.org\/docs\/trunk\/whats-new\/upgrading-5.1.html\">Upgrading<\/a>]<br \/>\n\u307e\u305f\u3001\u4eca\u56de\u304b\u3089\u30d1\u30c3\u30b1\u30fc\u30b8\u304cpackagecloud\u3067\u63d0\u4f9b\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002(<a href=\"https:\/\/packagecloud.io\/varnishcache\/varnish5\">packagecloud<\/a>)<br \/>\n5.1.0\u306f\u3069\u3046\u306a\u3063\u305f\u306e\uff1f\u3068\u3044\u3046\u8a71\u3067\u3059\u304c\u3001\u3061\u3087\u3063\u3068\u554f\u984c\u3068\u306a\u308b\u30d0\u30b0\u304c\u3042\u3063\u305f\u305f\u3081\u7fcc\u65e5\u306b\u3059\u30505.1.1\u3092\u51fa\u3057\u305f\u611f\u3058\u3067\u3059\u3002<br \/>\n\u4eca\u56de\u306e\u30ea\u30ea\u30fc\u30b9\u3067\u306f4.1.4\/4.1.5\u3067\u5909\u66f4\u3055\u308c\u305f\u5185\u5bb9\u3068\u7d30\u304b\u3044\u6a5f\u80fd\u4fee\u6b63(VCL\u5909\u66f4\u542b\u3080)\u304c\u3042\u308a\u307e\u3059\u3002(\u305d\u308c\u306b\u3064\u3044\u3066\u306f\u5272\u611b\u3057\u3066\u307e\u3059)<br \/>\nVCL\u306e\u5909\u66f4\u306f\u3042\u308b\u3082\u306e\u306e\u4fee\u6b63\u3057\u306a\u3044\u3068\u52d5\u304b\u306a\u3044\u3088\u3046\u306a\u5909\u66f4\u306f\u306a\u3044\u306e\u3067\u3088\u307b\u3069\u306e\u3053\u3068\u304c\u306a\u3044\u9650\u308a\u305d\u306e\u307e\u307e\u52d5\u4f5c\u3059\u308b\u306f\u305a\u3067\u3059\u3002<br \/>\n\u306a\u304a\u3001VMOD\u306b\u3064\u3044\u3066\u306f\u52d5\u304b\u306a\u304f\u306a\u308b\u3082\u306e\u3082\u3042\u308b\u306e\u3067\u4e8b\u524d\u306b\u4f7f\u7528\u3057\u3066\u3044\u308b\u3082\u306e\u304c\u52d5\u304f\u304b\u3092\u78ba\u8a8d\u3057\u305f\u307b\u3046\u304c\u826f\u3044\u3067\u3057\u3087\u3046\u3002<br \/>\n\u307e\u305f\u3001\u7d2f\u7a4d\u30d0\u30b0\u3082\u4fee\u6b63\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u3088\u307b\u3069\u4fee\u6b63\u3055\u308c\u3066\u3044\u308b\u30d0\u30b0\u3067\u56f0\u3063\u3066\u306a\u3044\u9650\u308a\u306f<strong>\u672c\u756a\u3078\u306e\u9069\u7528\u306f\u4e00\u65e64\u6708\u4e2d\u65ec\u307e\u3067\u306f\u69d8\u5b50\u898b<\/strong>\u305f\u307b\u3046\u304c\u826f\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002\uff08\u4f55\u3082\u306a\u304b\u3063\u305f\u3089\u3059\u3044\u307e\u305b\u3093\uff09<\/p>\n<h4>\u6a5f\u80fd\u5f37\u5316<\/h4>\n<p><strong>varnishd\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u8ffd\u52a0(-I [cli file])<\/strong><br \/>\nworker\u304c\u8d77\u52d5\u3059\u308b\u524d\u306b\u6307\u5b9a\u3055\u308c\u305fcli file\u8aad\u307f\u8fbc\u307e\u308c\u307e\u3059\u3002<br \/>\n\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306fvarnish\u306ecli\u30b3\u30de\u30f3\u30c9(vcl.load\u3084vcl.use\u306a\u3069)\u304c\u5217\u6319\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3053\u308c\u304c\u306a\u3093\u306e\u5f79\u306b\u7acb\u3064\u306e\u304b\u3068\u3044\u3046\u3068\u30015.0.0\u3067\u8ffd\u52a0\u3055\u308c\u305fvcl\u306e\u30e9\u30d9\u30eb\u6a5f\u80fd\u3092\u4f7f\u3063\u3066\u3044\u308b\u4eba\u306b\u306f\u975e\u5e38\u306b\u4fbf\u5229\u306a\u6a5f\u80fd\u3067\u3059\u3002<br \/>\n<a href=\"http:\/\/blog.xcir.net\/?p=2332\">\u4ee5\u524d\u7d39\u4ecb<\/a>\u3057\u305f\u3068\u304a\u308alabel\u6a5f\u80fd\u3092\u4f7f\u3046\u306b\u306f\u5148\u306bvcl.load\u3092\u5229\u7528\u3057\u3066\u30e9\u30d9\u30eb\u3092\u5b9a\u7fa9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3057\u305f\u3002<br \/>\n\u3057\u304b\u3057varnishd\u3067vcl\u3092\u8aad\u307f\u8fbc\u3080-f\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u306f\u30e9\u30d9\u30eb\u3092\u6307\u5b9a\u3067\u304d\u306a\u304b\u3063\u305f\u305f\u3081\u3001\u6709\u52b9\u306b\u4f7f\u3046\u306b\u306f\u5225\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u308b\u306a\u3069\u82e5\u5e72\u3081\u3093\u3069\u304f\u3055\u304b\u3063\u305f\u9762\u3082\u5426\u5b9a\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002<br \/>\n\u3057\u304b\u3057\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u3046\u3053\u3068\u3067worker\u304c\u8d77\u52d5\u3059\u308b\u524d\u306b\u30e9\u30d9\u30eb\u4ed8\u304d\u3067vcl\u3092\u8aad\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u975e\u5e38\u306b\u697d\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; \">\n\r\nvcl.load panic \/etc\/varnish_panic.vcl\r\nvcl.load siteA0 \/etc\/varnish_siteA.vcl\r\nvcl.load siteB0 \/etc\/varnish_siteB.vcl\r\nvcl.load siteC0 \/etc\/varnish_siteC.vcl\r\nvcl.label siteA siteA0\r\nvcl.label siteB siteB0\r\nvcl.label siteC siteC0\r\nvcl.load main \/etc\/varnish_main.vcl\r\nvcl.use main\r\n\n<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306acli\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u3063\u3066\u304a\u3044\u3066<\/p>\n<pre class=\"brush: plain; \">\n\r\nsub vcl_recv {\r\n    if (req.http.host ~ &quot;asite.example.com$&quot;) {\r\n        return(vcl(siteA));\r\n    }\r\n    if (req.http.host ~ &quot;bsite.example.com$&quot;) {\r\n        return(vcl(siteB));\r\n    }\r\n    if (req.http.host ~ &quot;csite.example.com$&quot;) {\r\n        return(vcl(siteC));\r\n    }\r\n    \/\/ Main site processing ...\r\n}\r\n\n<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306aVCL\u3092\u4f7f\u3046\u3053\u3068\u3067\u30e9\u30d9\u30eb\u6a5f\u80fd\u3092\u4f7f\u3046\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u30b3\u30de\u30f3\u30c9\u306e\u5148\u982d\u306b\u300c-\u300d\u3092\u3064\u3051\u308b\u3053\u3068\u3067\u305d\u306e\u30b3\u30de\u30f3\u30c9\u304c\u5931\u6557\u3057\u3066\u3082\u51e6\u7406\u3092\u7d9a\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059<\/p>\n<pre class=\"brush: plain; \">\n\r\n\u8d77\u52d5\u306b\u5931\u6557\u3059\u308b\r\nvcl.load nf \/etc\/varnish\/notfound.vcl\r\n \r\n\u8d77\u52d5\u306b\u5931\u6557\u3057\u306a\u3044\r\n- vcl.load nf \/etc\/varnish\/notfound.vcl\r\n\n<\/pre>\n<p><strong>varnishd\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u8ffd\u52a0(-x (parameter|vsl|cli|builtin))<\/strong><br \/>\n\u3053\u308c\u306f\u4f55\u304b\u3057\u3089\u306e\u52d5\u4f5c\u304c\u3068\u3044\u3046\u308f\u3051\u3067\u306f\u306a\u304f\u3066\u4ee5\u4e0b\u306e\u60c5\u5831\u304c\u8868\u793a\u3055\u308c\u308b\u30b3\u30de\u30f3\u30c9\u3067\u3059<\/p>\n<p>parameter<br \/>\n\u8d77\u52d5\u30d1\u30e9\u30e1\u30fc\u30bf(-p)\u306e\u60c5\u5831(\u30c7\u30d5\u30a9\u5024\u306a\u3069)<\/p>\n<p>vsl<br \/>\nvsl\u306e\u30bf\u30b0\u3084\u51fa\u529b\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u8aac\u660e<\/p>\n<p>cli<br \/>\nvarnish\u306ecli(vcl.list\u306a\u3069)\u306e\u8aac\u660e\u3092\u51fa\u529b\u3057\u307e\u3059<\/p>\n<p>builtin<br \/>\nbuiltin.vcl\u3092\u51fa\u529b\u3057\u307e\u3059<\/p>\n<p><strong>HTTP\/2\u304c\u3088\u308a\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f<\/strong><br \/>\n5.0.0\u306eHTTP\/2\u306f\u6b63\u76f4\u691c\u8a3c\u74b0\u5883\u3067\u3082\u4f7f\u3046\u306b\u306f\u8f9b\u3044\u3082\u306e\u3060\u3063\u305f\u306e\u3067\u3059\u304c(POST\u6295\u3052\u308b\u3068\u843d\u3061\u308b\u306a\u3069)<br \/>\n5.1.1\u3067\u306f\u4e00\u90e8\u6c17\u3092\u3064\u3051\u308b\u30dd\u30a4\u30f3\u30c8\u306f\u3042\u308b\u3082\u306e\u306e\u691c\u8a3c\u74b0\u5883\u3067\u4f7f\u3048\u308b\u3050\u3089\u3044\u306b\u306f\u52d5\u304d\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001HTTP\/2\u95a2\u9023\u306f5.1.1\u30ea\u30ea\u30fc\u30b9\u5f8c\u3082\u7a4d\u6975\u7684\u306b\u30d0\u30b0\u4fee\u6b63\u304c\u884c\u308f\u308c\u3066\u304a\u308a\u3001\u3082\u3057\u4f7f\u3044\u305f\u3044\u5834\u5408\u306f<a href=\"http:\/\/blog.xcir.net\/?p=2407\">\u3053\u306e\u8a18\u4e8b<\/a>\u3067\u7d39\u4ecb\u3057\u305fpkg-varnish-cache\u3092\u4f7f\u3063\u3066\u6700\u65b0\u306e\u30b3\u30fc\u30c9\u3067\u8a66\u3059\u3053\u3068\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\u3002<br \/>\n\u306a\u304a\u3001\u6c17\u3092\u3064\u3051\u308b\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u304c\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u8ee2\u9001\u30b5\u30a4\u30ba(varnishncsa %I %O\u306a\u3069)\u306a\u3069\u306e\u7d71\u8a08\u304c\u3059\u3079\u30660 <a href=\"https:\/\/github.com\/varnishcache\/varnish-cache\/issues\/2238\">#2238<\/a><\/li>\n<li>body\u304c\u3042\u308b\u30ea\u30af\u30a8\u30b9\u30c8\u3067content-length\u304c\u3042\u308b\u5834\u5408\u3067\u3082Transfer-Encoding: chunked\u3092\u4ed8\u4e0e\u3059\u308b <a href=\"https:\/\/github.com\/varnishcache\/varnish-cache\/issues\/2247\">#2247<\/a><\/li>\n<li>\u30af\u30c3\u30ad\u30fc\u306e\u7573\u307f\u8fbc\u307f\u3092\u884c\u308f\u306a\u3044\u306e\u3067VCL\u3067\u30af\u30c3\u30ad\u30fc\u306e\u64cd\u4f5c\u3092\u884c\u3046\u5834\u5408\u306b\u554f\u984c\u304c\u3042\u308b <a href=\"https:\/\/github.com\/varnishcache\/varnish-cache\/issues\/2291\">#2291<\/a> <a href=\"https:\/\/github.com\/varnishcache\/varnish-cache\/issues\/2300\">#2300<\/a><\/li>\n<\/ul>\n<p>\u3067\u3059\u3002<br \/>\n\u7d71\u8a08\u306b\u3064\u3044\u3066\u306f\u73fe\u6642\u70b9\u3067\u306f\u3069\u3046\u3057\u3088\u3046\u3082\u306a\u3044\u306e\u3067\u3059\u304c\u3001\u307b\u304b\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u306eVCL\u3067\u4e00\u65e6\u56de\u907f\u53ef\u80fd\u3067\u3059\u3002<br \/>\n\u3082\u3061\u308d\u3093\u4fee\u6b63\u3055\u308c\u305f\u5834\u5408\u306f\u4e0d\u8981\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; \">\n\r\nsub vcl_recv{\r\n  if(req.http.cookie){\r\n    \/\/ temporary...\r\n    \/\/ https:\/\/github.com\/varnishcache\/varnish-cache\/issues\/2291\r\n    \/\/ https:\/\/github.com\/varnishcache\/varnish-cache\/issues\/2300\r\n    std.collect(req.http.cookie);\r\n    set req.http.cookie = regsuball(req.http.cookie,&quot;, &quot;,&quot;; &quot;);\r\n  }\r\n  if(req.proto ~ &quot;HTTP\/2&quot;){\r\n    if(req.http.content-length){\r\n      \/\/ temporary...\r\n      \/\/ https:\/\/github.com\/varnishcache\/varnish-cache\/issues\/2247\r\n      unset req.http.content-length;\r\n    }\r\n  }\r\n}\r\n\n<\/pre>\n<p>\u306a\u304a\u4e0a\u8a18\u3067\u884c\u3063\u3066\u3044\u308b\u30af\u30c3\u30ad\u30fc\u306e\u7573\u307f\u8fbc\u307f\u3067\u3059\u304c\u3001\u3082\u3057ESI\u3092\u5229\u7528\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u306fHTTP\/2\u306b\u9650\u5b9a\u3057\u3066\u3082\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n\u4ed6\u306e\u6ce8\u610f\u70b9\u3068\u3057\u3066\u306fPRIV_TASK\/PRIV_TOP\u3092\u5229\u7528\u3057\u3066\u3044\u308bvmod\u306b\u3064\u3044\u3066\u306f\u73fe\u6642\u70b9\u3067\u306f\u907f\u3051\u3066\u304a\u3044\u305f\u307b\u3046\u304c\u7121\u96e3\u3067\u3059\u3002(HTTP\/1\u3067\u306f\u554f\u984c\u3042\u308a\u307e\u305b\u3093)<br \/>\n\u307e\u305fHTTP\/2\u95a2\u9023\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u3057\u3066\u4ee5\u4e0b\u304c\u8ffd\u52a0\u3055\u308c\u3066\u3044\u307e\u3059<\/p>\n<ul>\n<li>h2_rx_window_increment<\/li>\n<li>h2_rx_window_low_water<\/li>\n<\/ul>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u306f10MB\u3067\u5341\u5206\u5927\u304d\u3044\u306e\u3067\u7279\u306b\u5909\u66f4\u3059\u308b\u5fc5\u8981\u306f\u306f\u306a\u3055\u305d\u3046\u3067\u3059\u304c\u3001<br \/>\n\u5927\u304d\u306aPOST\/PUT\u3092\u53d7\u3051\u308b\u5834\u5408\u306f\u5927\u304d\u304f\u3057\u3066\u3082\u826f\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><strong>\u5373\u51e6\u7406\u3092\u7d42\u4e86\u3059\u308b\u305f\u3081\u306ereturn(fail)\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f<\/strong><br \/>\n\u3053\u308c\u306f\u3069\u306evcl\u30a2\u30af\u30b7\u30e7\u30f3\u304b\u3089\u3082\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u306a\u304afail\u306e\u5f8c\u306fvcl_synth\u304c\u30b3\u30fc\u30eb\u3055\u308c\u307e\u3059\u304c\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067resp.status\u306b\u306f503\u304cresp.reason\u306b\u306fVCL failed\u304c\u5165\u3063\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u7279\u306b\u64cd\u4f5c\u3092\u3057\u306a\u3044\u5834\u5408\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u306f503\u304c\u898b\u3048\u307e\u3059\u3002<br \/>\n\u306a\u304avcl_synth\u5185\u3067fail\u3092\u547c\u3073\u51fa\u3057\u305f\u5834\u5408\u306f\u63a5\u7d9a\u3092\u30a2\u30dc\u30fc\u30c8\uff08\u5373\u5207\u308a\uff09\u3057\u307e\u3059\u3002<\/p>\n<p><strong>vcl_backend_response\u3067return(pass(DURATION))\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f<\/strong><br \/>\n\u8981\u306fhit-for-pass\u3067\u3059\u3002<br \/>\nTTL\u3092\u540c\u6642\u306b\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u4ee5\u524d\u3088\u308a\u6307\u5b9a\u3057\u3084\u3059\u304f\u306a\u3063\u305f\u306e\u3067\u4fbf\u5229\u304b\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u3053\u306e\u8fba(HFP\u7b49)\u308f\u304b\u308a\u3065\u3089\u3044\u3068\u304a\u3082\u3046\u306e\u3067\u52d5\u304d\u306e\u89e3\u8aac\u8a18\u4e8b\u3092\u305d\u306e\u3046\u3061\u304b\u304d\u307e\u3059\u30fb\u30fb<\/p>\n<p><strong>vsl query\u3067vxid\u306e\u6307\u5b9a\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f<\/strong><br \/>\nvxid(x-varnish\u30ec\u30b9\u30dd\u30f3\u30b9\u30d8\u30c3\u30c0)\u306f\u30ea\u30af\u30a8\u30b9\u30c8\u6bce\u306b\u767a\u884c\u3055\u308c\u308b\u306e\u3067\u5f53\u7136\u306a\u304c\u3089\u4e8b\u524d\u306b\u308f\u304b\u308a\u307e\u305b\u3093\u3002<br \/>\n\u30d8\u30eb\u30b9\u30c1\u30a7\u30c3\u30af\u306a\u3069\u306fvxid=0\u3067\u5b9f\u884c\u3055\u308c\u308b\u306e\u3067\u305d\u308c\u306e\u7d5e\u8fbc\u3050\u3089\u3044\u306b\u3057\u304b\u4f7f\u3048\u306a\u3044\u306e\u304b\u3068\u3044\u3046\u3068\u305d\u3046\u3067\u306f\u306a\u304f<br \/>\nvarnishncsa\u306a\u3069\u306elog\u7cfb\u30aa\u30d7\u30b7\u30e7\u30f3\u306e-d\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u5f37\u529b\u306b\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<br \/>\nvarnish\u306e\u30ed\u30b0\u306f\u30e1\u30e2\u30ea\u4e0a(VSM)\u306b\u4fdd\u5b58\u3055\u308c\u308b\u306e\u3067\u3059\u304c\u3001\u3053\u308c\u306f\u30ea\u30f3\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u305f\u3081\u53e4\u3044\u30ed\u30b0\u3082\u591a\u5c11\u6b8b\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n-d\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u6b8b\u3063\u3066\u3044\u308b\u30ed\u30b0\u306e\u5148\u982d\u304b\u3089\u51fa\u529b\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u305f\u3081\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u884c\u3063\u305f\u5f8c\u306b\u53d6\u5f97\u3057\u305fvxid\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067varnish\u306e\u6319\u52d5\u306e\u78ba\u8a8d\u3092\u884c\u3046\u3053\u3068\u304c\u5bb9\u6613\u306b\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><strong>fallback director\u306bstickey\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f<\/strong><\/p>\n<pre class=\"brush: plain; \">\n\r\nnew fb = directors.fallback(sticky = true);\r\n\n<\/pre>\n<p>fallback\u306edefault\u306e\u6319\u52d5\u3067\u306f\u512a\u5148\u5ea6\u306e\u9ad8\u3044\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u304csick\u306b\u306a\u3063\u305f\u5834\u5408\u306f\u5f53\u7136fallback\u3057\u307e\u3059\u3002<br \/>\n\u4eca\u56de\u306estickey\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3068\u3053\u306e\u512a\u5148\u5ea6\u306e\u9ad8\u3044\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u304chealthy\u306b\u306a\u3063\u305f\u3068\u304d\u306e\u6319\u52d5\u304c\u5909\u308f\u308a\u307e\u3059\u3002<br \/>\n\u6307\u5b9a\u304c\u306a\u3044\u5834\u5408\u306f\u512a\u5148\u5ea6\u306e\u9ad8\u3044\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u304c\u9078\u629e\u3055\u308c\u307e\u3059\u304c\u3001\u6307\u5b9a\u304c\u3042\u308b\u5834\u5408\u306f\u305d\u306e\u307e\u307e\u4eca\u7e4b\u3044\u3067\u308b\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u7d9a\u3051\u307e\u3059\u3002<br \/>\n\u3053\u306e\u52d5\u4f5c\u306f\u9806\u7e70\u308a\u884c\u308f\u308c\u3001\u4e00\u756a\u512a\u5148\u5ea6\u306e\u4f4e\u3044\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u304csick\u306b\u306a\u3063\u305f\u5834\u5408\u306f\u518d\u5ea6\u5148\u982d\u304b\u3089\u8a55\u4fa1\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><strong>\u8d77\u52d5\u6642\u306bvmod\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u884c\u3046\u3088\u3046\u306b\u3057\u307e\u3057\u305f<\/strong><br \/>\n\u3053\u308c\u306fVarnish\u306e\u8d77\u52d5\u3057\u3066\u3044\u308b\u3068\u304d\u306bvmod\u306e\u5dee\u3057\u66ff\u3048\u304c\u884c\u308f\u308c\u3066\u3001\u305d\u306e\u5f8c\u306e\u64cd\u4f5c(reload\u306a\u3069)\u3067\u304a\u304b\u3057\u304f\u306a\u308b\u3053\u3068\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u4f7f\u3046vmod\u306b\u3064\u3044\u3066\u306f\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u53d6\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><strong>IP\u30a2\u30c9\u30ec\u30b9\u540c\u58eb\u306e\u6bd4\u8f03\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f<\/strong><br \/>\n<strong>vmod_std\u306bgetenv\u3068late_100_continue\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f<\/strong><\/p>\n<h4>\u4ed5\u69d8\u5909\u66f4<\/h4>\n<p><strong>vcl_dir\u306fvcl_path\u306b\u5909\u66f4\u3055\u308c\u307e\u3059(\u8d77\u52d5\u30d1\u30e9\u30e1\u30fc\u30bf)<\/strong><br \/>\n<strong>vmod_dir\u306fvmod_path\u306b\u5909\u66f4\u3055\u308c\u307e\u3059(\u8d77\u52d5\u30d1\u30e9\u30e1\u30fc\u30bf)<\/strong><br \/>\n<strong>req.ttl\u306f\u5ec3\u6b62\u4e88\u5b9a\u3067\u3059<\/strong><br \/>\n<strong>beresp.storage_hint\u306f\u5ec3\u6b62\u4e88\u5b9a\u3067\u3059<\/strong><br \/>\n\u5b8c\u5168\u306b\u540c\u3058\u3082\u306e\u3067\u306f\u306a\u3044\u306e\u3067\u3059\u304cberesp.storage\u3067\u4ee3\u66ff\u53ef\u80fd\u3067\u3059\u3002<br \/>\n<strong>\u30ec\u30b9\u30dd\u30f3\u30b9\u30b3\u30fc\u30c9\u30921000\u4ee5\u4e0a\u3067\u3082\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f<\/strong><br \/>\n\u3053\u308c\u306f\u3042\u304f\u307e\u3067\u3082VCL\u4e2d\u3067\u4f7f\u3046\u305f\u3081\u306e\u3082\u306e\u3067\u3001\u5b9f\u969b\u306b\u30ec\u30b9\u30dd\u30f3\u30b9\u3055\u308c\u308b\u3068\u304d\u306f1000\u4ee5\u4e0a\u306e\u6841\u306f\u524a\u3089\u308c\u307e\u3059\u3002<br \/>\n\u8981\u306freturn(synth(1000))\u3068\u304b\u3067\u6307\u5b9a\u3057\u3066\u304a\u3044\u3066\u3001vcl_synth\u3067\u51e6\u7406\u3059\u308b\u306e\u306b\u4f7f\u3046\u611f\u3058\u3067\u3059\u3002<br \/>\n<strong>DURATION\u578b\u3092BOOL\u5024\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f<\/strong><br \/>\n0\u4ee5\u4e0b\u306ffalse\u3067\u305d\u308c\u4ee5\u5916\u306ftrue\u3067\u3059<br \/>\n<strong>TIME\u578b\u306bDURATION\u3092\u52a0\u7b97\u30fb\u6e1b\u7b97\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f<\/strong><br \/>\n<strong>REAL\u578b\u306bINT\u3092\u52a0\u7b97\u30fb\u6e1b\u7b97\u3067\u304d\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f<\/strong><\/p>\n<h4>\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u8ffd\u52a0<\/h4>\n<p><strong>ban_cutoff\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f(\u8d77\u52d5\u30d1\u30e9\u30e1\u30fc\u30bf)<\/strong><br \/>\n<strong>req.storage\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f<\/strong><br \/>\n\u3053\u308c\u306frequst body\u3092\u4fdd\u5b58\u3059\u308b\u306e\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<br \/>\n\u672a\u6307\u5b9a\u306e\u5834\u5408\u306fTransient\u304c\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<h4>\u30d0\u30b0\u4fee\u6b63<\/h4>\n<p>\u57fa\u672c\u7684\u306b\u306f4.1.4\/4.1.5\u3067\u4fee\u6b63\u3055\u308c\u305f\u3082\u306e\u304c\u5927\u304d\u3044\u3082\u306e\u3060\u3063\u305f\u306e\u3067\u5272\u611b\u3057\u307e\u3059\u3002<\/p>\n<div class='wp_social_bookmarking_light'>        <div class=\"wsbl_hatena\"><a href='\/\/b.hatena.ne.jp\/add?mode=confirm&url=http%3A%2F%2Fblog.xcir.net%2F%3Fp%3D2493&title=Varnish5.1.1%E3%81%8C%E3%83%AA%E3%83%AA%E3%83%BC%E3%82%B9%E3%81%95%E3%82%8C%E3%81%BE%E3%81%97%E3%81%9F' title='\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='http:\/\/blog.xcir.net\/wp-content\/plugins\/wp-social-bookmarking-light\/public\/images\/hatena.gif' alt='\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0' title='\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0' width='16' height='12' class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_hatena_users\"><a href='\/\/b.hatena.ne.jp\/entry\/http:\/\/blog.xcir.net\/?p=2493' title='\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af - Varnish5.1.1\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='\/\/b.hatena.ne.jp\/entry\/image\/http:\/\/blog.xcir.net\/?p=2493' alt='\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af - Varnish5.1.1\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f' title='\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af - Varnish5.1.1\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f'   class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_facebook\"><a href='http:\/\/www.facebook.com\/share.php?u=http%3A%2F%2Fblog.xcir.net%2F%3Fp%3D2493&t=Varnish5.1.1%E3%81%8C%E3%83%AA%E3%83%AA%E3%83%BC%E3%82%B9%E3%81%95%E3%82%8C%E3%81%BE%E3%81%97%E3%81%9F' title='Facebook \u306b\u30b7\u30a7\u30a2' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='http:\/\/blog.xcir.net\/wp-content\/plugins\/wp-social-bookmarking-light\/public\/images\/facebook.png' alt='Facebook \u306b\u30b7\u30a7\u30a2' title='Facebook \u306b\u30b7\u30a7\u30a2' width='16' height='16' class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_linkedin\"><a href='\/\/www.linkedin.com\/shareArticle?mini=true&url=http%3A%2F%2Fblog.xcir.net%2F%3Fp%3D2493&title=Varnish5.1.1%E3%81%8C%E3%83%AA%E3%83%AA%E3%83%BC%E3%82%B9%E3%81%95%E3%82%8C%E3%81%BE%E3%81%97%E3%81%9F' title='LinkedIn \u306b\u30b7\u30a7\u30a2' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='http:\/\/blog.xcir.net\/wp-content\/plugins\/wp-social-bookmarking-light\/public\/images\/linkedin.png' alt='LinkedIn \u306b\u30b7\u30a7\u30a2' title='LinkedIn \u306b\u30b7\u30a7\u30a2' width='16' height='16' class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"http:\/\/blog.xcir.net\/?p=2493\" data-text=\"Varnish5.1.1\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f\" data-lang=\"ja\">Tweet<\/a><\/div><\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>5.0.0\u306e\u5f8c\u7d99\u306e5.1.1\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f\u3002 [changelog] [\u30ea\u30ea\u30fc\u30b9\u6587] [changes] [Upgrading] \u307e\u305f\u3001\u4eca\u56de\u304b\u3089\u30d1\u30c3\u30b1\u30fc\u30b8\u304cpackagecloud\u3067\u63d0\u4f9b\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002(p <a href='http:\/\/blog.xcir.net\/?p=2493' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[5,74,32],"class_list":["post-2493","post","type-post","status-publish","format-standard","hentry","category-3","tag-varnish","tag-varnish5-1-1","tag-32","category-3-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"http:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/2493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2493"}],"version-history":[{"count":24,"href":"http:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/2493\/revisions"}],"predecessor-version":[{"id":2528,"href":"http:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/2493\/revisions\/2528"}],"wp:attachment":[{"href":"http:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2493"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}