{"id":1252,"date":"2012-08-21T21:39:55","date_gmt":"2012-08-21T12:39:55","guid":{"rendered":"http:\/\/blog.xcir.net\/?p=1252"},"modified":"2012-08-21T21:39:55","modified_gmt":"2012-08-21T12:39:55","slug":"varnish3-0-3%e3%81%8c%e5%85%ac%e9%96%8b%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=1252","title":{"rendered":"Varnish3.0.3\u304c\u516c\u958b\u3055\u308c\u307e\u3057\u305f"},"content":{"rendered":"<p>Varnish3.0.3\u304c\u516c\u958b\u3055\u308c\u307e\u3057\u305f\u3002<br \/>\n\u4eca\u56de\u306e\u5909\u66f4\u306f\u591a\u304f\u306e\u30d0\u30b0\u30d5\u30a3\u30c3\u30af\u30b9\u3068\u30c4\u30fc\u30eb\u7cfb\u306e\u6a5f\u80fd\u62e1\u5145\u3068\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u6574\u5099\u3067\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.varnish-cache.org\/releases\/varnish-cache-3.0.3\">\u516c\u5f0f\u30ea\u30ea\u30fc\u30b9\u30ce\u30fc\u30c8 varnish-cache-3.0.3<\/a><\/p>\n<h3>\u30d0\u30b0\u30d5\u30a3\u30c3\u30af\u30b9<\/h3>\n<p>\u30fb\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u3068\u6b63\u898f\u8868\u73fe\u306e\u8a55\u4fa1\u306b\u304a\u3044\u3066\u30af\u30e9\u30c3\u30b7\u30e5\u306e\u8981\u56e0\u3068\u306a\u308b\u30d0\u30b0\u3092\u8907\u6570\u4fee\u6b63\u3057\u307e\u3057\u305f\u3002<br \/>\n\u30fbESI\u3068GZIP\u306b\u304a\u3044\u3066\u58ca\u308c\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u5374\u3059\u308b\u30b1\u30fc\u30b9\u304c\u5b58\u5728\u3059\u308b\u554f\u984c\u3092\u4fee\u6b63\u3057\u307e\u3057\u305f\u3002<br \/>\n\u30fbESI\u306eremove\u30bf\u30b0\u5185\u306bHTML\u306e\u30b3\u30e1\u30f3\u30c8\u304c\u3042\u308b\u30b1\u30fc\u30b9\u306b\u304a\u3044\u3066\u4e0d\u9069\u5207\u306a\u524a\u9664\u3092\u884c\u306a\u3063\u3066\u3044\u305f\u306e\u3092\u4fee\u6b63<br \/>\n\u30fbban lurker\u306e\u30b9\u30ea\u30fc\u30d7\u3059\u308b\u6761\u4ef6\u306e\u5909\u66f4\uff08\u56de\u53ce\u3057\u305f\u969b\u306f\u8a2d\u5b9a\u5024\u30fb\u56de\u53ce\u3057\u306a\u304b\u3063\u305f\u5834\u5408\u306f1\u79d2\uff09<br \/>\n\u30fb\u591a\u304f\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u306e\u8981\u56e0\u306b\u306a\u308b\u30d0\u30b0\u306e\u4fee\u6b63<br \/>\n\u30fb\u305d\u306e\u4ed6\u3044\u308d\u3044\u308d\u4fee\u6b63<\/p>\n<h3>\u30c4\u30fc\u30eb\u7cfb\u306e\u6a5f\u80fd\u62e1\u5145<\/h3>\n<h4>varnishstat<\/h4>\n<p>\u30fbjson\u51fa\u529b\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u8ffd\u52a0(-j)<\/p>\n<h4>varnishtest<\/h4>\n<p>\u30fbresp.body\u3067\u30ec\u30b9\u30dd\u30f3\u30b9\u30dc\u30c7\u30a3\u306e\u8a55\u4fa1\u304c\u53ef\u80fd\u306b<\/p>\n<h4>varnishncsa<\/h4>\n<p>\u30fbVCL\u4e2d\u306b&#8221;Key:Value&#8221;\u306e\u5f62\u5f0f\u3067\u30ed\u30b0\u3092\u51fa\u529b\u3059\u308b\u3068%{VCL_Log:Key}x\u3067\u53d6\u5f97\u53ef\u80fd\u306b<br \/>\n[code=&#8217;plain&#8217;]<br \/>\n\u25a0VCL<br \/>\n  sub vcl_recv{<br \/>\n  std.log(&#8220;hoge:mage&#8221;);<br \/>\n}<\/p>\n<p>[root@localhost ~]# varnishncsa -F &#8220;%h %l %u %t \\&#8221;%r\\&#8221; %s %b \\&#8221;%{Referer}i\\&#8221; \\&#8221;%{User-agent}i\\&#8221; \\&#8221;%{VCL_Log:hoge}x\\&#8221;&#8221;<br \/>\n192.168.1.199 &#8211; &#8211; [21\/Aug\/2012:08:46:27 +0900] &#8220;GET http:\/\/192.168.1.199:6081\/ HTTP\/1.0&#8221; 200 5 &#8220;-&#8221; &#8220;Wget\/1.12 (linux-gnu)&#8221; &#8220;mage&#8221;<\/p>\n<p>[\/code]<\/p>\n<p>\u30fb%{format}t\u306e\u5bfe\u5fdc<br \/>\n[code=&#8217;plain&#8217;]<br \/>\n[root@localhost ~]# varnishncsa -F &#8220;%h %l %u %t \\&#8221;%r\\&#8221; %s %b \\&#8221;%{Referer}i\\&#8221; \\&#8221;%{User-agent}i\\&#8221; \\&#8221;%{%Y%m%d%H%M%S}t\\&#8221;&#8221;<br \/>\n192.168.1.199 &#8211; &#8211; [21\/Aug\/2012:08:51:54 +0900] &#8220;GET http:\/\/192.168.1.199:6081\/ HTTP\/1.0&#8221; 200 5 &#8220;-&#8221; &#8220;Wget\/1.12 (linux-gnu)&#8221; &#8220;20120821085154&#8221;<br \/>\n[\/code]<\/p>\n<p>\u30fbformart\u6307\u5b9a\u4e2d\u306b\\t\u3068\\n\u306e\u6307\u5b9a\u304c\u53ef\u80fd\u306b<br \/>\n[code=&#8217;plain&#8217;]<br \/>\n[root@localhost ~]# varnishncsa -F &#8220;%h AAA\\tBBB\\nCCC&#8221;<br \/>\n192.168.1.199 AAA       BBB<br \/>\nCCC<br \/>\n[\/code]<\/p>\n<h4>cli<\/h4>\n<p>\u30fbbackend.list\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f<br \/>\n\u3000\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059<br \/>\n[code=&#8217;plain&#8217;]<br \/>\n\u25a0\u5b9a\u7fa9<br \/>\ndirector default random{.retries = 5;<br \/>\n  {.weight = 5;.backend={.host=&#8221;127.0.0.1&#8243;;.port=&#8221;81&#8243;;}}<br \/>\n  {.weight = 5;.backend={.host=&#8221;127.0.0.1&#8243;;.port=&#8221;82&#8243;;}}<br \/>\n}<br \/>\n\u25a0Admin<br \/>\nbackend.list<br \/>\n200<br \/>\nBackend name                   Refs   Admin      Probe<br \/>\ndefault[0](127.0.0.1,,81)      1      healthy    Healthy (no probe)<br \/>\ndefault[1](127.0.0.1,,82)      1      healthy    Healthy (no probe)<br \/>\n[\/code]<\/p>\n<p>\u30fbbackend.set_health\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f<br \/>\n\u3000\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306e\u72b6\u614b\u3092\u5f37\u5236\u7684\u306b\u5909\u66f4\u3067\u304d\u307e\u3059<br \/>\n[code=&#8217;plain&#8217;]<br \/>\n\u25a0\u5b9a\u7fa9<br \/>\nbackend default {<br \/>\n  .host = &#8220;127.0.0.1&#8221;;<br \/>\n  .port = &#8220;81&#8221;;<br \/>\n}<\/p>\n<p>\u25a0\u72b6\u614b\u3092sick\u306b\u5909\u66f4<br \/>\nbackend.set_health default sick<br \/>\n[\/code]<br \/>\n[code=&#8217;plain&#8217;]<br \/>\n\u25a0\u5b9a\u7fa9<br \/>\ndirector default random{.retries = 5;<br \/>\n  {.weight = 5;.backend={.host=&#8221;127.0.0.1&#8243;;.port=&#8221;81&#8243;;}}<br \/>\n  {.weight = 5;.backend={.host=&#8221;127.0.0.1&#8243;;.port=&#8221;82&#8243;;}}<br \/>\n}<\/p>\n<p>\u25a0\u72b6\u614b\u3092sick\u306b\u5909\u66f4(\u4e00\u3064\u3060\u3051)<br \/>\nbackend.set_health[0] sick<\/p>\n<p>\u25a0\u72b6\u614b\u3092sick\u306b\u5909\u66f4(\u5168\u90e8)<br \/>\nbackend.set_health sick<\/p>\n<p>[\/code]<\/p>\n<h3>\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u5909\u66f4<\/h3>\n<p>\u30fbhttp_range_support (BOOL default:ON)<br \/>\n\u3000range\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u30b5\u30dd\u30fc\u30c8\u3067\u3059\u304cEXPERIMENTAL\u304b\u3089\u6b63\u5f0f\u306b\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\n\u3000\u305f\u30603.0.0\u304b\u3089\u30c7\u30d5\u30a9\u30eb\u30c8\u3067ON\u306b\u306a\u3063\u3066\u3044\u305f\u306e\u3067\u3001\u7279\u306b\u6c17\u306b\u3059\u308b\u3053\u3068\u306f\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u30fbsend_timeout (sec default:600)<br \/>\n\u3000\u9001\u4fe1\u6642\u306e\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u6642\u9593\u304c60\u79d2\u304b\u3089600\u79d2\u306b\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002<br \/>\n\u3000idle_send_timeout\u3067\u30a2\u30a4\u30c9\u30eb\u306e\u8a2d\u5b9a\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u5f71\u97ff\u3067\u5897\u3048\u3066\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u30fbdiag_bitmap (bitmap default:0)<br \/>\n\u3000ban-lurker\u306e\u30c7\u30d0\u30c3\u30b0\u7528\u306e\u6307\u5b9a\u304c\u5897\u3048\u307e\u3057\u305f\uff080x00080000\uff09<\/p>\n<p>\u30fbredhat\u7528\u306esysconfig\u3067VARNISH_MIN_THREADS\u304c1\u304b\u308950\u306b<br \/>\n\u3000\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u304c\u3088\u304f\u306a\u308a\u307e\u3057\u305f<\/p>\n<h3>\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u8ffd\u52a0<\/h3>\n<h4>\u901a\u4fe1\u306b\u95a2\u308f\u308b\u30d1\u30e9\u30e1\u30fc\u30bf<\/h4>\n<p>\u30fbidle_send_timeout (sec default:60)<br \/>\n\u3000\u9001\u4fe1\u6642\u306b\u30a2\u30a4\u30c9\u30eb\u72b6\u614b\uff08\u30c7\u30fc\u30bf\u306e\u9001\u4fe1\u304c\u3067\u304d\u306a\u304f\u306a\u3063\u305f\uff09\u306b\u306a\u3063\u305f\u5834\u5408\u306e\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u6642\u9593\u3067\u3059<\/p>\n<h4>\u5185\u90e8\u3067\u306e\u6b63\u898f\u8868\u73fe\u306e\u547c\u3073\u51fa\u3057\u306b\u3064\u3044\u3066\u306e\u5236\u9650<\/h4>\n<p>\u30fbpcre_match_limit (1\uff5eUINT_MAX default:10000)<br \/>\n\u3000\u547c\u3073\u51fa\u3057\u56de\u6570\u306e\u5236\u9650<\/p>\n<p>\u30fbpcre_match_limit_recursion (1\uff5eUINT_MAX default:10000)<br \/>\n\u3000\u518d\u8d77\u56de\u6570\u306e\u5236\u9650<\/p>\n<h3>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u6574\u5099<\/h3>\n<h3>\u305d\u306e\u4ed6\u5909\u66f4<\/h3>\n<p>\u30fb<a href=\"http:\/\/repo.varnish-cache.org\/redhat\/varnish-3.0\/el6\/\">EL6\u7528RPM\u306e\u7528\u610f<\/a><br \/>\n\u30fbDNS\u30c7\u30a3\u30ec\u30af\u30bf\u30fc\u306b\u304a\u3044\u3066\u30dd\u30fc\u30c8\u306e\u6307\u5b9a\u304c\u306a\u3044\u5834\u5408\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u306780\u3092\u4f7f\u3046\u3088\u3046\u306b\u306a\u3063\u305f<br \/>\n\u30fblibvarnishapi\u306e\u5909\u66f4<br \/>\n\u30fbABI\u304c\u5909\u308f\u3063\u305f\u306e\u3067VMOD\u306e\u30ea\u30d3\u30eb\u30c9\u304c\u5fc5\u8981<br \/>\n\u30fb\u5185\u90e8\u95a2\u6570\u306e\u5b9a\u7fa9\u304c\u5909\u308f\u3063\u3066\u308b\u306e\u3067\u4e00\u90e8\u306e\u30a4\u30f3\u30e9\u30a4\u30f3C\u3084VMOD\u304c\u52d5\u304b\u306a\u304f\u306a\u308b\u53ef\u80fd\u6027\u30a2\u30ea(HTC_Read\u304c\u500b\u4eba\u7684\u306b\u75db\u3044\uff09<\/p>\n<p>\u591a\u304f\u306e\u30d0\u30b0\u4fee\u6b63\u3092\u542b\u3093\u3067\u3044\u308b\u305f\u3081\u9069\u7528\u3059\u308b\u306e\u304c\u826f\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Varnish3.0.3\u304c\u516c\u958b\u3055\u308c\u307e\u3057\u305f\u3002 \u4eca\u56de\u306e\u5909\u66f4\u306f\u591a\u304f\u306e\u30d0\u30b0\u30d5\u30a3\u30c3\u30af\u30b9\u3068\u30c4\u30fc\u30eb\u7cfb\u306e\u6a5f\u80fd\u62e1\u5145\u3068\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u6574\u5099\u3067\u3059\u3002 \u516c\u5f0f\u30ea\u30ea\u30fc\u30b9\u30ce\u30fc\u30c8 varnish-cache-3.0.3 \u30d0\u30b0\u30d5\u30a3\u30c3\u30af\u30b9 \u30fb\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u3068\u6b63 <a href='http:\/\/blog.xcir.net\/?p=1252' 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,46,32],"class_list":["post-1252","post","type-post","status-publish","format-standard","hentry","category-3","tag-varnish","tag-varnish3-0-3","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\/1252","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=1252"}],"version-history":[{"count":16,"href":"http:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/1252\/revisions"}],"predecessor-version":[{"id":1268,"href":"http:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/1252\/revisions\/1268"}],"wp:attachment":[{"href":"http:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1252"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}