NanoB ã¨ããã¦ã§ãã¢ããªã±ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯æ¸ãã
MENTA (http://d.hatena.ne.jp/tokuhirom/20081112/1226460761) ã¯äºåã³ã³ãã¤ã«åã ãã©ããã£ãã·ã¥æ¹å¼ã§ã©ãã¾ã§ããã©ã¼ãã³ã¹ãåºãããã¨åæã«ãCGI ã§æé WAF ãä½ããã¨æãã¨ãã³ã³ããã¼ã©æ¯ã« index.cgi ãçæããã®ãä¸çªéãã ããã¨ããã®ã¯ãåæãå¾ãããã¨ããã ãããã¨ããããã§ãapache ã®ãªã¯ã¨ã¹ãã«å¿ãã¦ãcgi ãåçã«çæï¼æ´æ°ããã¦ã§ãã¢ããªã±ã¼ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯ãä½ã£ã¦ã¿ã¾ãããããã¾ã§ãè©ä¾¡ç®ç (ï¼ãã¿) ãªã®ã§ãååã NanoB ã¨ããããæ°ã®ãªããã®ã
çµè«ï¼ ããå¤ã MENTA ã«å¯¾ã㦠13% å¢ã®é度 (156.67 reqs/s vs. 138.27 reqs/s)
åã£ãææ³ã¨ãã¦ã¯ã以ä¸ã®ã¨ããã
- CGI çæ CGI ããcache ãã£ã¬ã¯ããªä»¥ä¸ã«ã³ã³ããã¼ã© CGI ãåçã«çæ
- % chown www:www cache
- åå㯠cache ãããã³ã³ããã¼ã© CGI ããªãã®ã§ã ErrorDocument ãã£ã¬ã¯ãã£ã㧠CGI çæ CGI ãå¼ã³åºã
- çæãããã³ã³ããã¼ã©ã¯ãèªåã®ã½ã¼ã¹ã³ã¼ãã®æ´æ°æå»ãæ¯å確èª
ãªã¼ãã¼ãããã¯æå¾ã® stat(2) å¼ã³åºãï¼åãªã®ã§ãã»ã¼ç¡è¦ãã¦ãããç¯å²ã ã¨æãã¾ãã
ã½ã¼ã¹ã³ã¼ã㯠http://coderepos.org/share/browser/lang/perl/NanoB/ ã«ç½®ãã¦ããã¾ãããcacheãã¨ããåã®ãã£ã¬ã¯ããªãæã£ã¦ãchown www:www cache ãã¦ãããcache/start.cgi ãå®è¡ããã° (ãã®æç¹ã§ cgi ã¯åå¨ããªããã¨ã«æ³¨æ) ãåãåºãã¾ãã