{"id":2708,"date":"2018-04-09T00:22:45","date_gmt":"2018-04-08T15:22:45","guid":{"rendered":"http:\/\/blog.xcir.net\/?p=2708"},"modified":"2018-04-09T01:08:36","modified_gmt":"2018-04-08T16:08:36","slug":"varnish6-0-0%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":"https:\/\/blog.xcir.net\/?p=2708","title":{"rendered":"Varnish6.0.0\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f"},"content":{"rendered":"<p>Varnish6.0.0\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f\u3002[<a href=\"https:\/\/github.com\/varnishcache\/varnish-cache\/blob\/varnish-6.0.0\/doc\/changes.rst\">changelog<\/a>] [<a href=\"https:\/\/varnish-cache.org\/releases\/rel6.0.0.html#rel6-0-0\">\u516c\u5f0f\u306e\u30ea\u30ea\u30fc\u30b9\u6587<\/a>] [<a href=\"https:\/\/packagecloud.io\/varnishcache\/varnish60\">\u30d1\u30c3\u30b1\u30fc\u30b8DL<\/a>] [<a href=\"https:\/\/varnish-cache.org\/releases\/index.html\">\u30bd\u30fc\u30b9DL<\/a>]<br \/>\n\u4eca\u56de\u306e\u30ea\u30ea\u30fc\u30b9\u306f\u30e1\u30b8\u30e3\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3068\u3044\u3046\u3053\u3068\u3067\u6a5f\u80fd\u8ffd\u52a0\u3084\u7d2f\u7a4d\u30d0\u30b0Fix\u306a\u3069\u6765\u3066\u3044\u307e\u3059\u3002<br \/>\n\u76ee\u7389\u6a5f\u80fd\u306fUnixDomainSocket(UDS)\u5bfe\u5fdc\u3067\u3001\u500b\u4eba\u7684\u306b\u6ce8\u76ee\u3057\u3066\u3044\u308b\u306e\u304cshard director\u306b\u304a\u3051\u308blazy\u30e2\u30fc\u30c9\u8ffd\u52a0\u3067\u3059\u3002<br \/>\n\u307e\u305f\u65b0\u3057\u3044VCL\u30d0\u30fc\u30b8\u30e7\u30f3(4.1)\u3082\u8ffd\u52a0\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u65e2\u5b58\u304c\u4f7f\u3048\u306a\u304f\u306a\u3063\u305f\u308f\u3051\u3067\u306f\u306a\u3044\u306e\u3067\u5f71\u97ff\u306f\u5c11\u306a\u3044\u3067\u3057\u3087\u3046\u3002<br \/>\n\u306a\u304a\u3001\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u5834\u5408\u306f\u3044\u304f\u3064\u304b\u6ce8\u610f\u304c\u5fc5\u8981\u306a\u70b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>\u73fe\u72b6\u3067\u9069\u7528\u3059\u308b\u5834\u5408\u306f\u5341\u5206\u306b\u6ce8\u610f\u691c\u8a0e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u74b0\u5883<\/h3>\n<p><strong>http\/2\u74b0\u5883<\/strong><br \/>\nh2\u5229\u7528\u6642\u306b\u30b9\u30ec\u30c3\u30c9\u304c\u30ea\u30fc\u30af\u3057\u3066\u3044\u308b\u3088\u3046\u306a\u52d5\u304d\u3092\u3057\u3066\u3044\u307e\u3059\u3002(<a href=\"https:\/\/github.com\/varnishcache\/varnish-cache\/issues\/2623\">#2623<\/a>)<br \/>\n\u6700\u521d\u306f\u81ea\u5206\u306e\u30c6\u30b9\u30c8\u7528\u74b0\u5883\u3060\u3051\u304b\u306a\u3068\u8003\u3048\u3066\u3044\u305f\u3093\u3067\u3059\u304c\u3001\u4ed6\u306b\u8e0f\u3093\u3067\u308b\u4eba\u3092\u78ba\u8a8d\u3057\u305f\u306e\u3067\u73fe\u72b6\u306e\u307e\u307e\u3067h2\u3092\u6709\u52b9\u306b\u3059\u308b\u306e\u306f\u304b\u306a\u308a\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<br \/>\nh2\u3092\u4f7f\u3044\u305f\u3044\u306e\u3067\u3042\u308c\u3070\u3001\u304d\u3061\u3093\u3068\u691c\u8a3c\u3057\u3066\u81ea\u74b0\u5883\u3067\u8d77\u304d\u306a\u3044\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3064\u3064\u884c\u3046\u304b\u3001\u65e2\u5b58\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u307e\u307e\u3067\u4f7f\u3044\u3064\u3064Fix\u3092\u5f85\u3064\u3068\u826f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u305f\u3060\u3057h1\u306e\u307f\u306e\u5834\u5408\u306f\u73fe\u72b6\u554f\u984c\u306a\u3044\u305f\u3081\u3001h2\u3092\u4f7f\u308f\u306a\u3044\u306e\u3067\u3042\u308c\u3070\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3092\u3057\u3066\u3082\u826f\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><strong>\u516c\u5f0f\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u5bfe\u8c61\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5c11\u306a\u304f\u306a\u3063\u305f<\/strong><br \/>\n\u516c\u5f0f\u3067\u63d0\u4f9b\u3057\u3066\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u5bfe\u8c61OS\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059<br \/>\n&#8211; RHEL7(CentOS7)<br \/>\n&#8211; Debian9<br \/>\n&#8211; Ubuntu16.04<br \/>\nUbuntu14.04\u3084RHEL6\u306f\u5bfe\u8c61\u5916\u3068\u306a\u308a\u307e\u3057\u305f\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<br \/>\n\u305f\u3060\u3001\u3053\u308c\u306f\u3042\u304f\u307e\u3067\u5bfe\u8c61\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u7d5e\u3063\u305f\u3068\u3044\u3046\u3060\u3051\u306a\u306e\u3067\u3001\u81ea\u524d\u3067pkg-varnish-cache\u3092\u5229\u7528\u3057\u3066\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f5c\u3063\u3066\u9069\u7528\u306f\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p><strong>VMOD\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u5834\u5408<\/strong><br \/>\nVMOD\u5074\u3067\u5bfe\u5fdc\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u5909\u66f4\u304c\u5165\u3063\u3066\u3044\u308b\u305f\u3081\u3001\u3044\u308d\u3093\u306aVMOD\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u5bfe\u5fdc\u72b6\u6cc1\u3092\u78ba\u8a8d\u3057\u305f\u307b\u3046\u304c\u826f\u3044\u3067\u3059\u3002<br \/>\n\u5fc5\u8981\u306a\u5909\u66f4\u306f\u305f\u3044\u3057\u305f\u3053\u3068\u306a\u3044\u306e\u3067\u3001\u30e1\u30f3\u30c6\u3055\u308c\u3066\u308b\u3082\u306e\u306b\u3064\u3044\u3066\u306f\u5bfe\u5fdc\u3055\u308c\u308b\u3093\u3058\u3083\u306a\u3044\u304b\u306a\u3068\u304b\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001VSM\u306b\u76f4\u63a5\u3064\u306a\u3050\u30a2\u30d7\u30ea\u306b\u3064\u3044\u3066\u306f5.2.0\u306e\u3068\u304d\u306eVSM\/VUT\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u5909\u66f4\u306b\u5bfe\u5fdc\u3067\u304d\u3066\u3044\u308c\u3070\u307b\u307c\u52d5\u304f\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u4e00\u90e8\u5b9a\u6570\u3068\u623b\u308a\u5024\u306e\u578b\u304c\u5909\u308f\u3063\u305f\u3082\u306e\u304c\u3042\u308b\u305f\u3081\u305d\u3053\u3092\u4f7f\u3063\u3066\u3044\u3066\u904b\u304c\u60aa\u3044\u3068\u8e0f\u3080\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<hr\/>\n<h2>VCL<\/h2>\n<p>vcl\u3092\u8a18\u8ff0\u3059\u308b\u969b\u306b\u306f\u3001\u5148\u982d\u306b\u300cvcl 4.0;\u300d\u3068\u8a18\u8ff0\u3057\u3066\u3044\u305f\u304b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u4eca\u56de\u300cvcl 4.1;\u300d\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002<br \/>\n\u65e2\u5b58\u306e4.0\u304c\u4f7f\u3048\u306a\u304f\u306a\u3063\u305f\u308f\u3051\u3067\u306f\u306a\u3044\u305f\u3081\u3001\u305d\u306e\u307e\u307e\u52d5\u304b\u3059\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3057\u3001\u5927\u62b5\u306e\u5834\u5408\u306f\u5148\u982d\u884c\u3060\u30514.1\u306b\u66f8\u304d\u63db\u3048\u3066\u3082\uff08\u5927\u62b5\u306e\u5834\u5408\u306f\uff09\u52d5\u304f\u3067\u3057\u3087\u3046\u3002<br \/>\n\u3042\u3068\u3067\u7d39\u4ecb\u3059\u308bUDS\u306f4.1\u306e\u307f\u3067\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u8a18\u6cd5\u304c\u5fc5\u8981\u306a\u306e\u3067\u3001\u3082\u3057\u4f7f\u3046\u5834\u5408\u306f4.1\u306b\u5909\u66f4\u3057\u307e\u3057\u3087\u3046\u3002<br \/>\n\u307e\u305finclude\u3067\u3059\u304c\u89aa\u306eVCL\u30d0\u30fc\u30b8\u30e7\u30f3\u3088\u308a\u5c0f\u3055\u3044\u5834\u5408\u306f\u53ef\u80fd\u3067\u3059\u3002<br \/>\n\u3064\u307e\u308a<\/p>\n<table>\n<tr>\n<th>parent vcl ver<\/th>\n<th>child vcl ver<\/th>\n<th>result<\/th>\n<\/tr>\n<tr>\n<td>4.0<\/td>\n<td>4.0<\/td>\n<td>OK<\/td>\n<\/tr>\n<tr>\n<td>4.0<\/td>\n<td><strong>4.1<\/strong><\/td>\n<td>NG<\/td>\n<\/tr>\n<tr>\n<td><strong>4.1<\/strong><\/td>\n<td>4.0<\/td>\n<td>OK<\/td>\n<\/tr>\n<tr>\n<td><strong>4.1<\/strong><\/td>\n<td><strong>4.1<\/strong><\/td>\n<td>OK<\/td>\n<\/tr>\n<\/table>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u3002<br \/>\nVCL\u306e\u8a18\u8f09\u306e\u4ed5\u65b9\u306f\u74b0\u5883\u305d\u308c\u305e\u308c\u3060\u3068\u304a\u3082\u3046\u306e\u3067\u306a\u3093\u3068\u3082\u3044\u3048\u306a\u3044\u306e\u3067\u3059\u304c\u3001<br \/>\ndefault.vcl\u3092\u8d77\u70b9\u3068\u3057\u3066\u3001include\u3057\u3066\u3044\u304f\u3084\u308a\u65b9\u3067\u3042\u308c\u3070default.vcl\u3092\u4e00\u65e64.1\u306b\u3057\u3066\u304a\u304f\u3068\u826f\u3044\u306e\u304b\u306a\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u3068\u306f\u3044\u3048\u30014.0\u304b\u30894.1\u3078\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306f\u305d\u3093\u306a\u306b\u96e3\u3057\u304f\u306a\u3044\u306e\u3067\u3084\u3063\u3066\u3057\u307e\u3063\u305f\u307b\u3046\u304c\u3044\u3044\u3093\u3058\u3083\u306a\u3044\u304b\u306a\u3068\u306f\u601d\u3044\u307e\u3059\u3002<\/p>\n<h2>VCL\u5909\u66f4\u70b9<\/h2>\n<p>4.0\u3067\u306e\u5909\u66f4\u70b9\u30684.1\u3067\u306e\u5909\u66f4\u70b9\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u307e\u305a\u306f\u5171\u901a\u306e\u5909\u66f4\u70b9\u304b\u3089<\/p>\n<h3>\u5909\u66f4\u70b9(4.0\/4.1\u5171\u901a)<\/h3>\n<p><strong>return(fetch)\u304cvcl_hit\u3067\u4f7f\u3048\u306a\u304f\u306a\u308a\u307e\u3057\u305f<\/strong><br \/>\n\u500b\u4eba\u7684\u306b\u306f\u307e\u3060\u6b8b\u3063\u3066\u3044\u305f\u306e\u304b\u3068\u3044\u3063\u305f\u611f\u3058\u3067\u3059\u304c\uff08\u7d50\u69cb\u524d\u304b\u3089deplicated\u306b\u306a\u3063\u3066\u305f\uff09<br \/>\nreturn(miss)\u3092\u4f7f\u3044\u307e\u3057\u3087\u3046<\/p>\n<p><strong>req.storage \/ hash_ignore_busy \/ hash_always_miss\u3092client\u30b9\u30ec\u30c3\u30c9\u5074\u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/strong><\/p>\n<p><strong>obj.storage\u304c\u8ffd\u52a0\u3055\u308c\u3001vcl_hit\/vcl_deliver\u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f<\/strong><\/p>\n<p><strong>restart\u6642\u306e\u52d5\u4f5c\u304c\u5909\u308f\u308a\u307e\u3057\u305f<\/strong><br \/>\nreq.restarts,xid\u4ee5\u5916\u306e\u3059\u3079\u3066\u306ereq\u5909\u6570\u306f\u7dad\u6301\u3055\u308c\u307e\u3059\u3002<br \/>\nrestart\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u52d5\u4f5c\u306e\u78ba\u8a8d\u3092\u3057\u305f\u307b\u3046\u304c\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p><strong>vcl_recv\u3067\u3082return(restart)\u304c\u547c\u3079\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f<\/strong><\/p>\n<h3>\u5909\u66f4\u70b9(4.1\u306e\u307f)<\/h3>\n<p><strong>backend\u306e\u5b9a\u7fa9\u306b.path\u304c\u8ffd\u52a0<\/strong><br \/>\n\u3042\u3068\u3067\u89e6\u308c\u308bUDS\u3067\u4f7f\u3046\u30d1\u30b9\u3067\u3059\u3002<br \/>\n.host\u3068\u540c\u6642\u306b\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u306f\u51fa\u6765\u307e\u305b\u3093\u3002<\/p>\n<p><strong>local.socket\u306e\u8ffd\u52a0<\/strong><br \/>\n\u63a5\u7d9a\u306b\u5229\u7528\u3057\u305f\u30bd\u30b1\u30c3\u30c8\u306e\u540d\u524d\u3092\u8fd4\u3057\u307e\u3059\u3002<br \/>\n-afoo=:81\u3068\u540d\u524d\u304c\u6307\u5b9a\u3055\u308c\u3066\u308b\u5834\u5408\u306ffoo\u3092\u8fd4\u3057\u307e\u3059\u304c\u3001\u3082\u3057\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u81ea\u52d5\u7684\u306b\u3064\u3051\u3089\u308c\u305f\u540d\u524d\uff08a0,a1\uff09\u304c\u8fd4\u5374\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><strong>local.endpoint\u306e\u8ffd\u52a0<\/strong><br \/>\n\u63a5\u7d9a\u306b\u5229\u7528\u3057\u305f\u30bd\u30b1\u30c3\u30c8\u306e\u5b9a\u7fa9\u3092\u8fd4\u3057\u307e\u3059\u3002<br \/>\n-afoo=:81\u306e\u5834\u5408\u306f:81\u304c\u8fd4\u5374\u3055\u308c\u307e\u3059<\/p>\n<p><strong>sess.xid\u306e\u8ffd\u52a0<\/strong><br \/>\n\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u30e6\u30cb\u30fc\u30af\u306aID(xid)\u3092\u8fd4\u3057\u307e\u3059\u3002<br \/>\n\u4eca\u307e\u3067\u4f7f\u7528\u3057\u3066\u3044\u305freq.xid\/bereq.xid\u306f\u305d\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3001\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u793a\u3059\u3082\u306e\u3067\u3057\u305f\u3002<br \/>\n\u3057\u304b\u3057Keepalive\u3084HTTP\/2\u3067\u306f1\u30bb\u30c3\u30b7\u30e7\u30f3\u4e2d\u306b\u8907\u6570\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u542b\u307e\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; \">\n\r\n*   &lt;&lt; Session  &gt;&gt; 433160262\r\n-   Begin          sess 0 PROXY\r\n-   SessOpen       ***\r\n-   Proxy          ***\r\n-   Link           req 423002616 rxreq\r\n-   Link           req 423002617 rxreq\r\n-   Link           req 423002618 rxreq\r\n-   Link           req 423002619 rxreq\r\n-   Link           req 423002620 rxreq\r\n-   ReqAcct        72 22 94 1251 6 1257\r\n-   End\r\n\n<\/pre>\n<p>\u3053\u308c\u306f\u3068\u3042\u308bHTTP\/2.0\u3067\u306e\u30ed\u30b0\u306e\u629c\u7c8b\u3067\u3059\u304c\u3001\u3053\u308c\u304c\u793a\u3057\u3066\u3044\u308b\u306e\u306f<br \/>\nxid:433160262\u306e\u30bb\u30c3\u30b7\u30e7\u30f3(sess.xid)\u306bxid:423002616\uff5e423002620\u306e\u30ea\u30af\u30a8\u30b9\u30c8(req.xid)\u304c\u3076\u3089\u4e0b\u304c\u3063\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<br \/>\n\u4eca\u56desess.xid\u304cvcl\u4e2d\u304b\u3089\u7c21\u5358\u306b\u53d6\u308c\u308b\u3053\u3068\u3067\u3001\u7570\u306a\u308b\u30ea\u30af\u30a8\u30b9\u30c8\u4e2d\u3067\u3082\u540c\u4e00\u30bb\u30c3\u30b7\u30e7\u30f3\u3067\u3042\u308b\u3053\u3068\u304c\u308f\u304b\u308b\u306e\u3067\u3001\u306a\u306b\u304b\u306b\u4f7f\u3048\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u3067\u3059\uff08\u3071\u3063\u3068\u601d\u3044\u3064\u304b\u306a\u3044\u3067\u3059\u304c\u30fb\u30fb\uff09<\/p>\n<p><strong>resp.do_esi\u306e\u8ffd\u52a0<\/strong><br \/>\nberesp.do_esi\u306e\u6307\u5b9a\u3067\u30d5\u30a7\u30c3\u30c1\u6642\u306b\u30d1\u30fc\u30b9\u3057\u305f\u5834\u5408\u3067\u3082\u7121\u52b9\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\nvcl_deliver\/vcl_synth\u3067\u547c\u3073\u51fa\u3057\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p><strong>(req|bereq|beresp).proto\u304creadonly<\/strong><br \/>\n\u305d\u3093\u306a\u306b\u5909\u66f4\u3059\u308b\u3053\u3068\u3082\u306a\u304b\u3063\u305f\u3068\u601d\u3044\u307e\u3059\u304c.proto\u304creadonly\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><strong>req.esi\u304c\u524a\u9664\u3055\u308c\u305f<\/strong><br \/>\n\u307e\u3041\u4f7f\u3046\u4eba\u306f\u305d\u3093\u306a\u306b\u3044\u306a\u3044\u304b\u3068\u30fb\u30fb\u30fbberesp.do_esi\u3092\u4f7f\u3044\u307e\u3057\u3087\u3046<\/p>\n<p><strong>beresp.storage_hint\u304c\u524a\u9664\u3055\u308c\u307e\u3057\u305f<\/strong><br \/>\nberesp.storage\u3067\u4ee3\u7528\u3067\u304d\u307e\u3059\u3002<br \/>\n\u4f8b\u3048\u3070\u4eca\u307e\u3067<\/p>\n<pre class=\"brush: plain; \">\n\r\nset beresp.storage_hint = &quot;foo&quot;;\r\n\n<\/pre>\n<p>\u3068\u3057\u3066\u3044\u305f\u306e\u3067\u3042\u308c\u3070<\/p>\n<pre class=\"brush: plain; \">\n\r\nset beresp.storage = storage.foo;\r\n\n<\/pre>\n<p>\u3068\u5909\u66f4\u3059\u308c\u3070\u3088\u3044\u3067\u3059\u3002<\/p>\n<p><strong>beresp.backend.ip\u304c\u304c\u524a\u9664\u3055\u308c\u307e\u3057\u305f<\/strong><\/p>\n<p><strong>IP\u30a2\u30c9\u30ec\u30b9\u304c0.0.0.0:0\u306e\u3082\u306e\u306fUDS\u7d4c\u7531\u306e\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002<\/strong><\/p>\n<hr\/>\n<h3>Unix Domain Socket(UDS)\u5bfe\u5fdc<\/h3>\n<p>\u4e0a\u4e0b\u6d41\u3069\u3061\u3089\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3053\u308c\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u9ad8CPS\u74b0\u5883\u306b\u304a\u3044\u3066\u3001\u7279\u306b\u540c\u4e00\u30b5\u30fc\u30d0\u306b\u7f6e\u3044\u3066\u308b\u3053\u3068\u304c\u307b\u3068\u3093\u3069\u3060\u3068\u601d\u308f\u308c\u308bTLS\u7d42\u7aef\u3092\u884c\u3046\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3068\u306e\u901a\u4fe1\u3092\u3088\u308a\u52b9\u7387\u7684\u306b\u884c\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\uff08\u4e0a\u6d41\u5074\uff09<\/p>\n<p>\u306a\u304a\u3001\u4eca\u56de\u306e\u4f8b\u3067\u306fNginx\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u3084\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><strong>LISTEN\u5074\u3067UDS\u3092\u4f7f\u3046\u5834\u5408<\/strong><br \/>\n\u8d77\u52d5\u30d1\u30e9\u30e1\u30fc\u30bf\u306e-a\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u6307\u5b9a\u3092\u3057\u307e\u3059<\/p>\n<pre class=\"brush: plain; \">\n\r\n-a \/var\/run\/varnish-uds.sock,user=vcache,group=varnish,mode=666\r\n\n<\/pre>\n<p>\u4eca\u56de\u306fproxy\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u305b\u3093\u304c\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002(PROXY\u3092\u8ffd\u52a0\u3057\u307e\u3057\u3087\u3046)<br \/>\n\u307e\u305f\u4eca\u56de\u306f\u304a\u624b\u8efd\u306bNginx\u3068\u3064\u306a\u3050\u305f\u3081\u306b666\u306b\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u9069\u5207\u306a\u8a2d\u5b9a\u306b\u3059\u308b\u3079\u304d\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>Nginx\u5074<\/p>\n<pre class=\"brush: plain; \">\n\r\nupstream backend {\r\n    server unix:\/var\/run\/varnish-uds.sock;\r\n}\r\nserver {\r\n        listen 80 default_server;\r\n        listen [::]:80 default_server;\r\n        location \/ {\r\n            proxy_pass http:\/\/backend;\r\n        }\r\n...\r\n}\r\n\n<\/pre>\n<p>\u3053\u308c\u3060\u3051\u3067\u3059\u3002<br \/>\n\u306a\u304a\u3001LISTEN\u5074\u3067UDS\u3092\u4f7f\u3046\u5834\u5408\u306fVCL4.1\u304c\u5fc5\u9808\u3067\u3059\u3002<br \/>\n\u304c\u3001\u73fe\u72b6\u8a66\u3057\u3066\u308b\u9650\u308a\u3067\u306f\u8d77\u70b9\u3068\u306a\u308bvcl(default.vcl)\u304c4.1\u3067\u3042\u308c\u3070include\u5148\u306f4.0\u3067\u3082\u5e73\u6c17\u306a\u52d5\u304d\u3092\u3057\u3066\u3044\u307e\u3059\u3002\u3000<br \/>\n\u3057\u304b\u3057\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u4e0a\u306f<\/p>\n<blockquote><p>When UDS listeners are in use, VCL >= 4.1 will be required for all VCL programs loaded by Varnish.<\/p><\/blockquote>\n<p>\u3068\u8a18\u8ff0\u3055\u308c\u3066\u304a\u308a\u3001\u3082\u3057\u304b\u3057\u305f\u3089\u585e\u304c\u308c\u308b\u53ef\u80fd\u6027\u3082\u3042\u308a\u307e\u3059\u306e\u3067\u3001UDS\u3092\u4f7f\u3046\u5834\u5408\u306f\u3059\u3079\u3066\u306eVCL\u30924.1\u306b\u3059\u308b\u306e\u304c\u7121\u96e3\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u306a\u304a\u3001UDS\u306f\u5f53\u7136\u306a\u304c\u3089IP\u30a2\u30c9\u30ec\u30b9\u306f\u306a\u304f\u3001UDS\u7d4c\u7531\u306e\u30a2\u30af\u30bb\u30b9\u306f0.0.0.0:0\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\u3002<br \/>\n\u306a\u306e\u3067\u3001client.identity(\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306fclient.ip\u304c\u4f7f\u308f\u308c\u308b)\u3092\u4f7f\u3063\u3066\u632f\u308a\u5206\u3051\u3092\u884c\u3046\u5834\u5408\u306f\u5e38\u306b\u540c\u4e00backend\u304c\u9078\u629e\u3055\u308c\u308b\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<br \/>\n\u9069\u5207\u306b\u4fee\u6b63\u3092\u5165\u308c\u308b\u304b\u3001\u305d\u3082\u305d\u3082\u4e0a\u6d41\u306fPROXY\u30d7\u30ed\u30c8\u30b3\u30eb\u304c\u4f7f\u3048\u308b\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306b\u3059\u308b\u306a\u3069\u306e\u5bfe\u7b56\u304c\u5fc5\u8981\u3067\u3057\u3087\u3046\u3002<\/p>\n<p><strong>\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u5074\u3067UDS\u3092\u4f7f\u3046\u5834\u5408<\/strong><br \/>\n\u3059\u3054\u304f\u5358\u7d14\u3067\u3059<br \/>\nNginx\u5074<\/p>\n<pre class=\"brush: plain; \">\n\r\nserver {\r\n  listen unix:\/var\/run\/nginx-uds.sock;\r\n  access_log off;\r\n  root \/var\/www\/html;\r\n  index index.html index.htm index.nginx-debian.html;\r\n}\r\n\n<\/pre>\n<p>Varnish\u5074<\/p>\n<pre class=\"brush: plain; \">\n\r\nvcl 4.1;\r\nbackend default {\r\n    .path = &quot;\/var\/run\/nginx-uds.sock&quot;;\/\/\u7d76\u5bfe\u30d1\u30b9\r\n}\r\n\n<\/pre>\n<p>\u3053\u308c\u3060\u3051\u3067\u3059\u3002<br \/>\n\u7279\u306b\u96e3\u3057\u304f\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u304c\u30011\u70b9\u6ce8\u610f\u306a\u306e\u304cbackend\u5185\u3067\u306e.path\u30d7\u30ed\u30d1\u30c6\u30a3\u306fvcl4.1\u306e\u307f\u306a\u306e\u30674.0\u3060\u3068\u51fa\u6765\u307e\u305b\u3093\u3002<br \/>\n\u306a\u304aListen\u306e\u6642\u3068\u9055\u3044\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306e\u307f\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f4.0\u6df7\u5728\u3067\u3082\u52d5\u304d\u307e\u3059\u3002\u3068\u306f\u3044\u30484.1\u306e\u66f8\u304d\u63db\u3048\u306f\u96e3\u3057\u304f\u306a\u3044\u306e\u3067\u66f8\u304d\u63db\u3048\u305f\u307b\u3046\u304c\u7121\u96e3\u3067\u3057\u3087\u3046\u3002<\/p>\n<hr\/>\n<h2>\u305d\u306e\u4ed6\u65b0\u6a5f\u80fd\u30fb\u5909\u66f4<\/h2>\n<h3>varnishncsa<\/h3>\n<p><strong>\u5236\u5fa1\u6587\u5b57\u30fb\u30d0\u30a4\u30ca\u30ea\u3092\u542b\u3080\u53ef\u80fd\u6027\u304c\u3042\u308b\u30bf\u30b0\u306e-F\u3092\u62d2\u5426\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f<\/strong><br \/>\n\u5bfe\u8c61\u306fH2RxHdr H2RxBody H2TxHdr H2TxBody Debug HttpGarbage Hash\u3067\u3059\u304c\u3001\u305f\u3076\u3093\u4f7f\u3063\u3066\u308b\u4eba\u306f\u3044\u306a\u3044\u304b\u306a\u3068<\/p>\n<h3>\u8d77\u52d5\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u5909\u66f4<\/h3>\n<p><strong>esi_iovs\u306e\u8ffd\u52a0<\/strong><br \/>\nESI\u51e6\u7406\u3067\u4f7f\u3046iovec\u69cb\u9020\u4f53\u306e\u5272\u308a\u5f53\u3066\u6570\u3067\u3059\u304c\u901a\u5e38\u306e\u5834\u5408\u306f\u3044\u3058\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\nESI\u3092\u4f7f\u3063\u3066\u3044\u3066\u3069\u3046\u3057\u3066\u3082tune\u3057\u305f\u3044\u5834\u5408\u306fsystemcall\u3067writev\u306e\u5b9f\u4f7f\u7528\u6570\u3092\u307f\u306a\u304c\u3089\u8abf\u6574\u3059\u308b\u3068\u3088\u3044\u3067\u3057\u3087\u3046<br \/>\n\u307e\u305f\u3053\u306e\u5024\u3092\u5909\u66f4\u3059\u308b\u5834\u5408\u306fworkspace_thread\u3092\u540c\u6642\u306b\u8abf\u6574\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3067\u3057\u3087\u3046\uff08\u5272\u308a\u5f53\u3066\u5143\u304cworkspace_thread\u304b\u3089\u306a\u306e\u3067\uff09<\/p>\n<p><strong>h2\u95a2\u9023\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u8ffd\u52a0<\/strong><br \/>\nh2_header_table_size<br \/>\nh2_max_concurrent_streams<br \/>\nh2_initial_window_size<br \/>\nh2_max_frame_size<br \/>\nh2_max_header_list_size<br \/>\n\u3053\u306e\u3042\u305f\u308a\u306fh2\u306eRFC\u3092\u8aad\u3093\u3067\u3082\u3089\u3048\u308c\u3070\u308f\u304b\u308b\u304b\u306a\u3063\u3066\u611f\u3058\u3067\u3059\u3002<br \/>\n\u3061\u306a\u307f\u306bh2_max_concurrent_streams\u306f100\u306a\u3093\u3067\u3059\u304c\u3001chrome\u306e\u30b9\u30c8\u30ea\u30fc\u30e0\u306f\u30c7\u30d5\u30a9\u30671000\u306a\u306e\u3067\u3001\u305d\u306e\u3042\u305f\u308a\u3067\u6c17\u306b\u306a\u308b\u4eba\u3082\u3044\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u3067\u3059\u3002\uff08\u3068\u306f\u3044\u3048\u305d\u3093\u306a\u306b\u5f04\u308b\u5fc5\u8981\u306a\u3044\u3068\u601d\u3044\u307e\u3059\uff09<\/p>\n<p><strong>feature_bit\u306e\u8ffd\u52a0(http_dete_postel)<\/strong><\/p>\n<p>\u65e5\u4ed8\u306e\u5f62\u5f0f\u306f<a href=\"https:\/\/tools.ietf.org\/html\/rfc7231#section-7.1.1.2\">rfc7231#section-7.1.1.2<\/a>\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u308b\u3093\u3067\u3059\u304c\u3001\u305f\u307e\u306b\u3053\u308c\u306b\u6e96\u62e0\u3057\u306a\u3044\u3084\u3093\u3061\u3083\u306aDate,Last-Modified,Expires\u3092\u8fd4\u3057\u3066\u304f\u308b\u30b5\u30fc\u30d0\u304c\u3044\u307e\u3059<\/p>\n<pre class=\"brush: plain; \">\n\r\nFri, 2 Mar 2018 14:26:02 GMT  (\u307e\u3061\u304c\u3044)\r\nFri, 02 Mar 2018 14:26:02 GMT (\u305f\u3060\u3057\u3044)\r\n\n<\/pre>\n<p>\u3053\u306e\u9593\u9055\u3044\u306e\u30d1\u30bf\u30f3\u3092\u8a31\u5bb9\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059<br \/>\n\u6709\u52b9\u306b\u3057\u305f\u3044\u5834\u5408\u306f-p feature=+http_dete_postel\u306b\u3057\u307e\u3059\u3002<br \/>\n\u500b\u4eba\u7684\u306b\u306f\u30aa\u30ea\u30b8\u30f3\u5074\u76f4\u3057\u305f\u307b\u3046\u304c\u3088\u3044\u304b\u306a\u30fc\u3068\u306f\u601d\u3044\u307e\u3059\u304c\u30fb\u30fb\u30fb<\/p>\n<p><strong>cli_buffer\u306e\u524a\u9664<\/strong><br \/>\n\u307e\u3041\u4ee5\u524d\u304b\u3089\u30a2\u30ca\u30a6\u30f3\u30b9\u3042\u3063\u305f\u306e\u3067\u30fb\u30fb\u30fb<\/p>\n<h3>\u30ab\u30a6\u30f3\u30bf\u306e\u8ffd\u52a0<\/h3>\n<p><strong>cache_hit_grace<\/strong><br \/>\n\u305d\u306e\u307e\u3093\u307e\u3067\u3059\u304cgrace\u72b6\u614b\u3067\u30ec\u30b9\u30dd\u30f3\u30b9\u3067\u304d\u305f\u4ef6\u6570\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u7a3c\u3050\u5834\u5408\u306f\u4e00\u65e6\u53e4\u3044\u72b6\u614b\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8fd4\u3057\u3064\u3064\u88cf\u3067\u66f4\u65b0\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u884c\u3046\u306e\u3092\u91cd\u8996\u3057\u307e\u3059\u304c\uff08\u3046\u307e\u304f\u3044\u3051\u3070\u30ad\u30e3\u30c3\u30b7\u30e5\u66f4\u65b0\u6642\u306b\u9045\u304f\u306a\u3089\u306a\u3044\uff09<br \/>\n\u3053\u306e\u30ab\u30a6\u30f3\u30bf\u3092\u898b\u3066\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3092\u884c\u3046\u3053\u3068\u304c\u51fa\u6765\u308b\u304b\u306a\u3068\u3082\u601d\u3044\u307e\u3059\u3002\u3000<\/p>\n<p><strong>n_lru_limited<\/strong><br \/>\nnuke_limit\u306b\u9054\u3057\u305f\u4ef6\u6570\u3092\u793a\u3057\u307e\u3059\u3002<br \/>\n\u5f53\u7136\u3067\u3059\u304c\u30b9\u30c8\u30ec\u30fc\u30b8\u304c\u3044\u3063\u3071\u3044\u306e\u72b6\u614b\u3067\u65b0\u3057\u3044\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u884c\u304a\u3046\u3068\u3059\u308b\u5834\u5408\u306f\u53e4\u3044\u3082\u306e\u3092\u62bc\u3057\u51fa\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\uff08LRU\u3067\u3059\uff09<br \/>\nVarnish\u3067\u306f\u3053\u306e\u51e6\u7406\u3092Nuke\u3068\u547c\u3093\u3067\u3044\u307e\u3059\u304c\u3001\u5b9f\u306f\u3053\u306e\u51e6\u7406\u306b\u306fnuke_limit\u3068\u3044\u3046\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u3042\u308a\u3001\u4e00\u3064\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u78ba\u4fdd\u3059\u308b\u305f\u3081\u306bNuke\u3057\u3066\u826f\u3044\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eLimit\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30b5\u30a4\u30ba\u304c\u3060\u3044\u305f\u3044\u4f3c\u305f\u3088\u3046\u306a\u3068\u3053\u308d\u306a\u3089\u30c7\u30d5\u30a9\u30eb\u30c8\u5024(50)\u3067\u3082\u554f\u984c\u306a\u3044\u306e\u3067\u3059\u304c\u3001\u5e73\u574750KB\u306e\u3068\u3053\u308d\u306b10MB\u306e\u3067\u304b\u3044\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u305f\u307e\u306b\u3084\u3063\u3066\u304f\u308b\u3068\u304b\u3060\u3068\u8db3\u308a\u306a\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u5f53\u7136Limit\u3092\u8d85\u3048\u305f\u5834\u5408\u306f\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u78ba\u4fdd\u3067\u304d\u306a\u3044\u305f\u3081\u30a8\u30e9\u30fc(503)\u3068\u306a\u308b\u306e\u3067\u3059\u304c\u3001\u554f\u984c\u306f\u30b9\u30c8\u30ea\u30fc\u30e0\u3092\u3057\u3066\u3044\u308b\u5834\u5408\u3067\u3059\u3002<br \/>\n\u30b9\u30c8\u30ea\u30fc\u30e0\u3067\u30ec\u30b9\u30dd\u30f3\u30b9\u3092\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u5f53\u7136\u306a\u304c\u3089\u30aa\u30ea\u30b8\u30f3\u304b\u3089\u5e30\u3063\u3066\u304d\u305f\u30ec\u30b9\u30dd\u30f3\u30b9\u30b3\u30fc\u30c9(200)\u3092\u8fd4\u3057\u3066\u3057\u307e\u3063\u3066\u3044\u308b\u306e\u3067503\u3092\u8fd4\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002<br \/>\n\u305d\u306e\u305f\u3081200\u306a\u306e\u306b\u30ec\u30b9\u30dd\u30f3\u30b9\u30dc\u30c7\u30a3\u304c\u4e2d\u9014\u534a\u7aef\u306a\u30b5\u30a4\u30ba\u306b\u306a\u308b\u3068\u3044\u3046\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3059\u304c\uff08\u5272\u3068ml\u3068\u304b\u898b\u3066\u308b\u3068\u305d\u308c\u3063\u307d\u3044\u554f\u3044\u5408\u308f\u305b\u591a\u3044\uff09<br \/>\n\u3053\u306e\u30ab\u30a6\u30f3\u30bf\u3092\u898b\u308b\u3053\u3068\u3067\u305d\u306e\u3088\u3046\u306a\u72b6\u614b\u306b\u9665\u3063\u3066\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<br \/>\n\u3068\u308a\u3042\u3048\u305a1\u3067\u3082\u3042\u304c\u308b\u3088\u3046\u3067\u3042\u308c\u3070\u3001nuke_limit\u3092\u5f15\u304d\u4e0a\u3052\u308b\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u898b\u76f4\u3057\u3092\u3059\u308b\uff08\u30b5\u30a4\u30ba\u3042\u3052\u308b\u3068\u304b\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u30b5\u30a4\u30ba\u6bce\u306b\u5206\u3051\u3066\u3057\u307e\u3046\u3068\u304b\uff09\u3068\u304b\u3059\u308b\u3068\u826f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h3>vmod_directors<\/h3>\n<p>shard director\u306b\u304b\u306a\u308a\u306e\u4fee\u6b63\u304c\u5165\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n<strong>shard_param<\/strong><br \/>\n\u65b0\u3057\u304fshard_param\u3068\u3044\u3046\u30af\u30e9\u30b9\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u57fa\u672c\u7684\u306b\u4eca\u307e\u3067\u306eshard\u306e\u5404\u7a2e\u30d1\u30e9\u30e1\u30fc\u30bf(rampup\u3068\u304b)\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u304a\u308a\u3001\u5358\u7d14\u306b\u5916\u51fa\u3057\u306b\u3055\u308c\u305f\u3082\u306e\u3067\u3059<br \/>\n\u4f7f\u3044\u65b9\u306f<\/p>\n<pre class=\"brush: plain; \">\n\r\nsub vcl_init{\r\n\tnew vd = directors.shard();\r\n\tvd.add_backend(hoge);\r\n\tnew p = directors.shard_param();\r\n\tp.set(by=URL, warmup=0.7);\r\n\tvd.associate(p.use());\r\n}\r\n\n<\/pre>\n<p>\u3084<\/p>\n<pre class=\"brush: plain; \">\n\r\nsub vcl_init{\r\n\tnew vd = directors.shard();\r\n\tvd.add_backend(hoge);\r\n\tnew p = directors.shard_param();\r\n\tp.set(by=URL, warmup=0.7);\r\n}\r\nsub vcl_backend_fetch{\r\n\tset bereq.backend=vd.backend(param=p);\r\n}\r\n\n<\/pre>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u3002<\/p>\n<p><strong>\u30cf\u30c3\u30b7\u30e5\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306b\u3064\u3044\u3066<\/strong><br \/>\n\u4eca\u307e\u3067\u30cf\u30c3\u30b7\u30e5\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u9078\u629e\u3067\u304d\u305f\u306e\u3067\u3059\u304c(SHA256(default),CRC32,RS)<br \/>\n\u3053\u308c\u304cSHA256\u3060\u3051\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u4f34\u3044alg\u3092\u6307\u5b9a\u3067\u304d\u3066\u3044\u305f\u30e1\u30bd\u30c3\u30c9\u306b\u304a\u3044\u3066alg\u5f15\u6570\u304c\u524a\u9664\u3055\u308c\u307e\u3057\u305f\u3002<br \/>\n\u3057\u304b\u3057\u3001\u308f\u3056\u308f\u3056SHA256\u4ee5\u5916\u3092\u4f7f\u3063\u3066\u308b\u4eba\u3082\u5c11\u306a\u3044\u3068\u601d\u3046\u306e\u3067\u305d\u3053\u307e\u3067\u5f71\u97ff\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u5f15\u6570\u304c\u306a\u304f\u306a\u308b\u5f71\u97ff\u3092\u53d7\u3051\u308b\u306e\u306f.reconfigure\u3068.key\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>resolve={now,lazy}\u306e\u8ffd\u52a0<\/strong><br \/>\n\u500b\u4eba\u7684\u306b\u6ce8\u76ee\u3057\u3066\u3044\u308b\u6a5f\u80fd\u3067\u3059\u3002<br \/>\nlazy\u30e2\u30fc\u30c9\u306f\u5b9f\u969b\u306b\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3078\u306e\u63a5\u7d9a\u3092\u4f5c\u308b\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u89e3\u6c7a\u3055\u308c\u308b\u3082\u306e\u3067\u3059\u3002<br \/>\n\u3053\u308c\u304c\u4f55\u304c\u5b09\u3057\u3044\u306e\u304b\u3068\u3044\u3046\u3068\u3001Director\u3092\u5165\u308c\u5b50\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u4f8b\u3048\u3070fallback\u3068\u7d44\u307f\u5408\u308f\u305b\u3066director\u304c\u5168\u6ec5\u3057\u305f\u3089fallback\u3059\u308b\u307f\u305f\u3044\u306a\u306e\u3082\u66f8\u3051\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; \">\n\r\nprobe healthcheck {\r\n    .url =&quot;\/check&quot;;\r\n    .timeout           = 1s;\r\n    .window            = 4;\r\n    .threshold         = 2;\r\n    .interval          = 1s;\r\n}\r\nbackend ws01  {.port=&quot;80&quot;;.host = &quot;XX&quot;;.probe=healthcheck;}\r\nbackend ws02  {.port=&quot;80&quot;;.host = &quot;YY&quot;;.probe=healthcheck;}\r\n\r\nsub vcl_init {\r\n\tnew sdp = directors.shard_param();\r\n\tsdp.set(warmup=0.5, healthy=ALL);\r\n\r\n\tnew sd1 = directors.shard();\r\n\tsd1.associate(sdp.use());\r\n\tsd1.add_backend(ws01);\r\n\tsd1.reconfigure();\r\n\r\n\tnew sd2 = directors.shard();\r\n\tsd2.associate(sdp.use());\r\n\tsd2.add_backend(ws02);\r\n\tsd2.reconfigure();\r\n\r\n\tnew fb = directors.fallback();\r\n\tfb.add_backend(sd1.backend());\/\/lazy\r\n\tfb.add_backend(sd2.backend());\/\/lazy\r\n\r\n}\r\nsub vcl_recv {\r\n\tset req.backend_hint = fb.backend();\r\n\treturn(pass);\r\n}\r\n\n<\/pre>\n<p>\u30b5\u30f3\u30d7\u30eb\u3067shard\u306b\u767b\u9332\u3057\u3066\u308b\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306f\u305d\u308c\u305e\u308c\u4e00\u3064\u3067\u3059\u304c\u611f\u899a\u306f\u63b4\u3093\u3067\u3082\u3089\u3048\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002\uff08\u3064\u3044\u3067\u306bshard_param\u3082\u30b5\u30f3\u30d7\u30eb\u7684\u306b\u5165\u308c\u3066\u307f\u307e\u3057\u305f\uff09<\/p>\n<h3>vmod_std<\/h3>\n<p><strong>std.log\/syslog\u306b\u304a\u3044\u3066workspace\u67af\u6e07\u3057\u305f\u5834\u5408\u3067\u3082fail\u3057\u306a\u3044\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f<\/strong><\/p>\n<h3>vmod_unix<\/h3>\n<p>\u4eca\u56de\u8ffd\u52a0\u3055\u308c\u305fvmod\u3067\u3059<br \/>\n\u63a5\u7d9a\u3057\u3066\u304d\u305f\u30d7\u30ed\u30bb\u30b9\u306euser\/group\/uid\/gid\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<br \/>\n\u53b3\u5bc6\u306b\u30ac\u30fc\u30c9\u3092\u304b\u3051\u305f\u3044\u3068\u304d\u306b\u4f7f\u3046\u3068\u3088\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u3067\u3059\u3002<br \/>\nman vmod_unix\u305d\u306e\u307e\u307e\u3067\u3059\u304c<\/p>\n<pre class=\"brush: plain; \">\n\r\nsub vcl_recv {\r\n      # Return &quot;403 Forbidden&quot; if the connected peer is\r\n      # not running as the user &quot;trusteduser&quot;.\r\n      if (unix.user() != &quot;trusteduser&quot;) {\r\n              return( synth(403) );\r\n      }\r\n\r\n      # Require the connected peer to run in the group\r\n      # &quot;trustedgroup&quot;.\r\n      if (unix.group() != &quot;trustedgroup&quot;) {\r\n              return( synth(403) );\r\n      }\r\n\r\n      # Require the connected peer to run under a specific numeric\r\n      # user id.\r\n      if (unix.uid() != 4711) {\r\n              return( synth(403) );\r\n      }\r\n\r\n      # Require the connected peer to run under a numeric group id.\r\n      if (unix.gid() != 815) {\r\n              return( synth(403) );\r\n      }\r\n}\r\n\n<\/pre>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u3059<\/p>\n<h3>vmod_proxy<\/h3>\n<p>\u4eca\u56de\u8ffd\u52a0\u3055\u308c\u305fvmod\u3067\u3059<br \/>\n<a href=\"https:\/\/www.haproxy.org\/download\/1.8\/doc\/proxy-protocol.txt\">Proxy Protocol v2<\/a>\u306b\u306fType-Length-Value(TLV)\u3068\u3044\u3046\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u4f8b\u3048\u3070\u3069\u3093\u306aCipher\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u304b\u307f\u305f\u3044\u306a\u60c5\u5831\u3092\u57cb\u3081\u8fbc\u3080\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<br \/>\n\u6b8b\u5ff5\u306a\u304c\u3089Hitch\u306falpn(PP2_TYPE_ALPN)\u3057\u304b\u57cb\u3081\u8fbc\u3093\u3067\u6765\u306a\u3044\u3088\u3046\u306a\u306e\u3067\u3001\u30d5\u30eb\u6a5f\u80fd\u3092\u4f7f\u3044\u305f\u3044\u5834\u5408\u306fHAProxy\u306e\u6bd4\u8f03\u7684\u65b0\u3057\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u4f7f\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c<br \/>\n\u4f55\u304b\u3057\u3089\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3066\u30ed\u30b0\u306b\u51fa\u529b\u3057\u305f\u3044\u5834\u5408\u306f\u6709\u7528\u3060\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001\u6b8b\u5ff5\u306a\u304c\u3089\u53d6\u308c\u308b\u5024\u306f\u56fa\u5b9a\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u30ab\u30b9\u30bf\u30e0TLV\u306e\u7bc4\u56f2\u3078\u306f\u73fe\u72b6\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093\u3002\uff08NLB\u306e<a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/elasticloadbalancing\/latest\/network\/load-balancer-target-groups.htm\">VPC\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8ID<\/a>\u3068\u304bl\uff09<br \/>\n\u3068\u306f\u3044\u3048\u30b3\u30fc\u30c9\u3092\u898b\u308b\u9650\u308a\u3067\u306f\u5bfe\u5fdc\u306f\u5bb9\u6613\u306a\u306e\u3067p-r\u3057\u3066\u307f\u308b\u306e\u3082\u304a\u3082\u3057\u308d\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u3067\u3059\u3002<br \/>\n\u4f7f\u3044\u65b9\u306f\u5358\u7d14\u3067<\/p>\n<pre class=\"brush: plain; \">\n\r\nvcl 4.1;\r\nimport proxy;\r\nimport std;\r\nsub vcl_recv{\r\n\tif(proxy.alpn() == &quot;http\/1.1&quot;){\r\n\t\t\/\/\u30d7\u30ed\u30c8\u30b3\u30eb\u306f\u307e\u3041req.proto\u3067\u53d6\u308c\u308b\u3093\u3067\u9069\u5207\u3067\u306f\u306a\u3044\u304b\u3082\u3067\u3059\u304c\u30b5\u30f3\u30d7\u30eb\u3068\u3057\u3066\r\n\t\t...\r\n\t}\r\n}\r\n\n<\/pre>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u3059<\/p>\n<h3>VSL<\/h3>\n<p><strong>ReqAcct\u306e\u30d0\u30a4\u30c8\u6570\u304c\u6b63\u78ba\u306b\u306a\u308a\u307e\u3057\u305f<\/strong><br \/>\n\u30d7\u30ed\u30c8\u30b3\u30eb\u306e\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9\u5206(chunked\u306e\u3068\u304b)\u306f\u4eca\u307e\u3067\u5165\u3063\u3066\u307e\u305b\u3093\u3067\u3057\u305f\u304c\u3001OS\u304b\u3089\u5831\u544a\u3055\u308c\u308b\u5024\u3092\u4f7f\u3046\u3088\u3046\u306b\u5909\u66f4\u3057\u305f\u306e\u3067\u6b63\u78ba\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h3>\u30d0\u30b0\u4fee\u6b63<\/h3>\n<p>\u591a\u304f\u306e\u30d0\u30b0\u4fee\u6b63\u304c\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u305d\u306e\u4e2d\u3067\u3082\u7279\u7b46\u3057\u305f\u307b\u3046\u304c\u3088\u3044\u3082\u306e\u306b\u89e6\u308c\u307e\u3059\u3002<br \/>\n<strong>max_restarts\u306e\u53d6\u6271\u3044<\/strong><br \/>\nreturn(restart)\u3092\u884c\u3063\u305f\u969b\u306e\u30c1\u30a7\u30c3\u30af\u306e\u4e0d\u5099\u3067\u3001max_restrts\u3067\u6307\u5b9a\u3057\u305f\u56de\u6570\u3088\u308a1\u56de\u5c11\u306a\u3044restart\u3067limit\u306b\u306a\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u4fee\u6b63\u3055\u308c\u3066max_restarts\u306e\u6307\u5b9a\u3057\u305f\u6570return(restart)\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<div class='wp_social_bookmarking_light'>        <div class=\"wsbl_hatena\"><a href='\/\/b.hatena.ne.jp\/add?mode=confirm&url=https%3A%2F%2Fblog.xcir.net%2F%3Fp%3D2708&title=Varnish6.0.0%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='https:\/\/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\/https:\/\/blog.xcir.net\/?p=2708' title='\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af - Varnish6.0.0\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\/https:\/\/blog.xcir.net\/?p=2708' alt='\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af - Varnish6.0.0\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f' title='\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af - Varnish6.0.0\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=https%3A%2F%2Fblog.xcir.net%2F%3Fp%3D2708&t=Varnish6.0.0%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='https:\/\/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=https%3A%2F%2Fblog.xcir.net%2F%3Fp%3D2708&title=Varnish6.0.0%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='https:\/\/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=\"https:\/\/blog.xcir.net\/?p=2708\" data-text=\"Varnish6.0.0\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>Varnish6.0.0\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f\u3002[changelog] [\u516c\u5f0f\u306e\u30ea\u30ea\u30fc\u30b9\u6587] [\u30d1\u30c3\u30b1\u30fc\u30b8DL] [\u30bd\u30fc\u30b9DL] \u4eca\u56de\u306e\u30ea\u30ea\u30fc\u30b9\u306f\u30e1\u30b8\u30e3\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3068\u3044\u3046\u3053\u3068\u3067\u6a5f\u80fd\u8ffd\u52a0\u3084\u7d2f\u7a4d\u30d0\u30b0Fix\u306a\u3069\u6765\u3066\u3044\u307e\u3059\u3002 <a href='https:\/\/blog.xcir.net\/?p=2708' 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,85,32],"class_list":["post-2708","post","type-post","status-publish","format-standard","hentry","category-3","tag-varnish","tag-varnish6-0-0","tag-32","category-3-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/2708","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2708"}],"version-history":[{"count":24,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/2708\/revisions"}],"predecessor-version":[{"id":2733,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/2708\/revisions\/2733"}],"wp:attachment":[{"href":"https:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2708"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2708"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2708"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}