ASF Bugzilla â Bug 46949 Apache httpd serves sometimes content from another thread Last modified: 2017-05-09 15:45:01 UTC
ASF Bugzilla â Bug 46949 Apache httpd serves sometimes content from another thread Last modified: 2017-05-09 15:45:01 UTC
ãã¾ã¾ã§ãªãã¼ã¹ãããã·ã®è¨å®ãããããã£ã¦ããªãã¦ããã§ã«åãã¦ãããµã¼ãã®è¨å®ãè¦ããè¦ã¾ãã§ä½¿ãåãã¦ãããã¡ããã¨ç解ãããã¨æã£ã¦ãããã¥ã¢ã«ãèªã¿ç´ããããã£ã¨ããã£ããè¨å®ã®æ¹æ³ (How) ãããã£ããã¨ä»¥ä¸ã«ããªãããæ¸ãå¿ è¦ããããã¨ããçç± (Why) ãç解ã§ããã®ãå¬ãããä¹ ãã¶ãã«ãããã£ãï¼ãã¨å«ã³ãããªã£ããæåãå¿ããªããã¡ã«ãæãåºããããã«ãæ¸ãã¦ããã mod_proxy - Apache HTTP ãµã¼ã ãã¼ã¸ã§ã³ 2.2 ã Apache ã®ãããã·é¢é£ã®ããã¥ã¢ã«ã mod_proxy ã使ããã¨ã«ãªãã 大äºãªãã£ã¬ã¯ãã£ãã¯ã ProxyPass 㨠ProxyPassReverse ã®ãµãã¤ã ProxyPass ããããªãã¼ã¹ãããã·ãããä¸ã§ã®ã»ã¨ãã©ãã¹ã¦ã®ãã¨ããã£ã¦ããããå®ã¯è¦æ £ãã (ã³ãããæ £ãã) è¨å®ã§ã¯ãã®ãã£ã¬ã¯
社å ã®ãµã¼ãã¹ã§ã¯ãããã³ãã¨ã³ãã«ãªãã¼ã¹ãããã·å ¼ãã¼ããã©ã³ãµç¨éã¨ãã¦ãApache2.2ã使ã£ã¦ãããã¨ã¯ããã¾ã«ã¡ããã¡ããæ¸ãã¦ããéãã§ããããã®ããã¯ã¨ã³ãã«ããã¢ããªã®éçºã¡ã³ãã¼ã«URLæååãã¨ã³ã³ã¼ãããã¨404ã¨ã©ã¼(Not Found)ãè¿ãããããã«ãªã£ãã¨ç¸è«ãåãã¾ããã æ£ç´ããã®å ´ã§åå ãããããªãã£ãã®ã§ãè²ã 調ã¹å§ããã¨ã Apacheã§ã¯ãAllowEncodedSlashesãã£ã¬ã¯ãã£ãã£ã¤ã¼ã®ããã£ã¦ãå ¬å¼ããã¥ã¡ã³ãããå¼ç¨ããã¨ã AllowEncodedSlashes ãã£ã¬ã¯ãã£ãã¯ç¬¦å·åããããã¹åé¢æå (/ 㯠%2Fãããã«ã·ã¹ãã ã«ãã£ã¦ã¯ \ ã«å¯¾å¿ãã %5C)ãåå¨ãã URLã®ä½¿ç¨ã許å¯ãããã©ããã決å®ãã¾ããé常ã¯ãã®ãããªURL㯠404 (Not found) ã¨ã©ã¼ã§æå¦ããã¾ããã ãããªã ã¨ãããã¨
2007å¹´06æ04æ¥22:49 ã«ãã´ãªApache httpd mod_proxy_balancerã®stickysessionã¯å¤§æåå°æåãåºå¥ãã ä½äºããªãã£ãããã«è¨äºåéã ã§ãä½ãå°ã£ããã¨ããã¨ãapache httpd-2.2.4ã«æ·»ä»ã®mod_proxy_balancerã®æåã mod_proxy_balancerã«ã¤ãã¦ã¯ãã¡ããè¦ã¯mod_proxyç³»ã®å種ã¢ã¸ã¥ã¼ã«ã§proxyå ããã©ã³ã·ã³ã°ã§ããããã§ããªãmod_proxy_balancerèªä½ã¯ããªãæ±ç¨æ§ã®ããã¢ã¸ã¥ã¼ã«ãªãã ãã©ãä»åå°ã£ãç¨éã¯mod_proxy_ajpã¨ã®çµã¿åãããã¤ã¾ãmod_jk(2)ã®ä»£ç¨ã¨ãã¦ä½¿ã£ãã¨ãã®ãã¨ã ãã¨ãã°web層ãapache(+mod_ajp +mod_proxy_balancer)ã®1å°ãap層ãtomcatã®2å°æ§æã«ããã¨ãããã¤statefu
Apache 2.2.0 ã®ãã¼ããã©ã³ã¹æ©è½(mod_proxy_balancer)ã使ãããªã Apache 2.2ãã§ã¾ããã mod_dbdã¨ããmod_proxy_balancerã¨ãæ°ã«ãªãæ°æ©è½ã¦ããçãã§ãã ã²ãã½ãããã®æ㫠誰ãå ¥ãã¦ã¿ã人ãã¾ããï¼ ã¨æã£ãã®ã§mod_proxy_balancerã試ãã¦ã¿ã¾ããã è¶ ç°¡åã§ãã mod_proxyã¨mod_proxy_balancerãåèã«ãã¾ããã æ¢ã«æ¥æ¬èªããã¥ã¡ã³ãå®åï¼ ä»¥ä¸ããé§ã足ã§ãã¾ãã»ãã¥ãªãã£çã«ãããããªãè¨å®ä¾ãå¤ã ããã¾ãã ã¨ãããããããªè¨å®ãä»è¾¼ãã§ã¿ã¾ãã ProxyPass /lb balancer://TEST stickysession=sesid <Proxy balancer://TEST> #1 BalancerMember http://i.yappo.jp lo
JSPãServletãªã©ã®J2EEã§éçºãè¡ãéã«ãåç´ã«éçºç°å¢ã¨ãã¦ç°å¢æ§ç¯ããéã«ã¯tomcatã ãã§ãååãªå ´åããããã©ãå®éã«éç¨ããã«ã¯apacheã¨tomcatãé£æºããã¦åããã®ãæ®éã ã¨æãã é£æºã£ã¦ããã®ãä¹±æ´ã«èª¬æããã¨ããã¼ã80ã§tomcatãåããçºã®è¨å®ã ã¨æãã°è¯ãï¼ããããªãã¨http://localhost:8080ãªãã¦å½¢ã§ã¢ã¯ã»ã¹ããªãã¨JSP/Servletãåããªãã£ã¦ããããµããã¨ã«ãªãï¼ã 以åã®apacheï¼2.0ã¨ãã以åï¼ã§ã¯mod_jkããã³mod_jk2ã¨ããã³ãã¯ã¿ï¼ã¢ã¸ã¥ã¼ã«ï¼ã使ç¨ãã¦é£æºãè¡ã£ã¦ãããã ãã©ã2.2以éã§ã¯æ¹å¼ãå¤ãã£ãããã ã 以åã¾ã§ã®mod_jkã¯jakartaããDLã¨ããã¦ä½¿ç¨ãã¦ããã®ã ãã2.2ããã¯mod_proxy_ajpã¨ããããã©ã«ãã§çµã¿è¾¼ã¾ãã¦ããã³ãã¯ã¿ï¼ã¢ã¸ã¥ã¼ã«ï¼ã使ç¨ã
Apache2.2ã«æè¼ããã¦ããmod_proxy_balancerããã®ã¢ã¸ã¥ã¼ã«ã使ãã¨ãApacheã®è¨å®ã ãã§ç°¡åã«ãã¼ããã©ã³ãµãå°å ¥ã§ãã¾ããããããè² è·åæ£ç³»ã®ãã¹ãã«ã¯ãµã¼ããè¤æ°å°å¿ è¦ã«ãªãã¾ãããVMware Serverã使ãã°PC1å°ã§ããã¼ããã©ã³ãµã®åä½ç¢ºèªãã§ãã¾ãããã¡ããããã©ã¼ãã³ã¹ã®ãã¹ãã¯é£ããã§ãããå人ã§ç¡æã®ã½ããã ãã§ããã ãã®ãã¨ãã§ãããªãã¦ãããæ代ã«ãªã£ãããã§ãã VMware Serverã§é¯ä½ã ã¾ãã¯VMware Serverã§ãµã¼ããããã¤ãç¨æãã¾ããä»å㯠Fedora6 㨠CentOS5 ã§ä½ã£ã¦ã¿ã¾ãããVMwareã®è¨å®ã¯ãã®ããããåèã«ããã¼ã«ã«ã§ãã¹ãããã ããªã®ã§ããããã¯ã¼ã¯ã¯å ¨ã¦NATã§æ§æãã¾ãã ã¦ãã¦ã©ã Unoh Labs: VMwareã¨CentOSã§ã¦ã§ãéçºã®ç°å¢ããã£ãã¨æ´ããæé æ¸
并åå½±ç念ï¼ä¸å½æµ·åæ¤å¯¼å¼ å¨ä¼çå°å¨å代表代表äºåç»åæè¿æè¿åææ¥è§å æ¬å±å ¨åæå¤åãè£çé¢çæ°æ°æ°ï¼å¼åå¼å¹ã å ä¸ç§èï¼èªåå¨å¹´è§£ç²¤èä¼ ç»èåï¼æ´å¯å³éå£ã读æ¤èªä¸çå¤ç¨åä¸ç§èã 段大ä¸é³ç«ç¿»çï¼è°é©æé£æè°å³ä»¥çæ¤ç²ãè¡ï¼éé 许水èæ½æ²¹ãåæ·»å è±ãå°ï¼å¶å å ¥æ 檬ï¼å³å¯è±è±ä¸ç¢æä¸ï¼å¾èï¼ä¸æ²¹å¼é ã浪å±ç°çé»å¤å »æ®æ¶²æ²¡æéåºè£é£åççãä½ç¾å´å¤æ²¹åºå¨åä¸åéå°ä¹å½åï¼ä¸å½æµ·åæ¤æ¾ç¤ºææ°æ°æ®ï¼åº¦åä¸è°éå°é¢æ油产æºææ®éåå£ï¼æè¿å»è½ç¶æåç¾å½æºéã 大å¦å¦é¨æ伯强认ç 究ä¸å¿ä¸»ä»»ç»æµè½æºä¸ºï¼èªåå¨å¹´è§£åæ²¹åºæ¬å¥½å¸åºé¢è¶ï¼çç¶éå¤äºè¾ç´§å¼ æç³æ²¹å½é ä¾éã读æ¤èªä¸ç 对äºæ¥è¯´æ²¹æ°éæä¸å¸å ¬å¸ï¼è°é©æé£æå©å¥½ä¹æ¯éç£ ï¼æ°æ¿æ²¹ä»·èµä»·å¼æ涨æºéä¸æ²¹ååæ ¼ä¸åæï¼çä¼åæ²¹ä¸å©æ¶¦å¯æå产åç产ã 8æ以æ¥ï¼æµªå±ç°æéå¢é¿å°äº¤æå¿åç°è¯¥å¹³ã并åå«å¨é¨å¬ä¸¤å¸è®®ææ¥ä¸é²å¼ä¼ï¼ä¸å½æµ·åæ¤å°æ±ä¸å¹³é³æ±æ¸æ¸¯ä»»
ããã«ã¡ã¯ sato ã§ãã ãã³ãã£ã¼ã§ã¯é«ä¾¡ãªãã¼ãã¦ã§ã¢ãã©ã³ãµãªã©ãè³¼å ¥ãããã¨ã¯ã§ããªãã§ããã apache2.2 ãã mod_proxy_balancerã¨ãã apacheã¢ã¸ã¥ã¼ã«ã® ã½ããã¦ã§ã¢ãã©ã³ãµã 追å ãããã®ã§ããã©ãèµã§ã使ç¨ãã¦ãã¾ããã ä»ã®ã¨ãã proxy ãµã¼ããããã«ããã¯ã«ãªããã¨ã¯ãªãã§ãã æ³å®æ§æã¯ä»¥ä¸ã¨ããapache㯠2.x ã使ç¨ãã¾ããã proxy1 +------web1 +------web2 ... +------webN ã»åºæ¬è¨å® httpd.conf LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_balancer_module modules/mod_proxy_balancer.so ProxyPass / ba
mod_proxy_balancerã§ä¸ã大è¦æ¨¡ãµã¼ãã¼éç¨ããã¨ãã®åæ - (1) mod_proxy_balancerã®è¨å®ç·¨ Apache2.2ããããã¼ããã©ã³ã·ã³ã°ããã¦ãããmod_proxy_balancer ã¨ããã¢ã¸ã¥ã¼ã«ãæ¨æºæ·»ä»ã«ãªãã¾ããã ãã®ã¢ã¸ã¥ã¼ã«ããã®ååã®éããApacheã¬ãã«ã§HTTPãªã¯ã¨ã¹ããããã¯ã¨ã³ãã®ãµã¼ãã¼ã«æ¯ãåãããã¨ã§ãã¼ããã©ã³ã·ã³ã°ããã¦ãããã¢ã¸ã¥ã¼ã«ã§ãã Apacheã®å ¬å¼ããã¥ã¡ã³ãã試ãã«å ¥ãã¦ã¿ã人ã®Blogãªã©ã¯æ£è¦ããã¾ãããå®éã®ç¾å ´ã§éç¨ãã¦ããäºä¾ã¨ããã®ã¯ã¾ã ç¡ãããã§ãã ããã§ãå®éã«ãã¼ã¯æã«over 500 request/secã§mod_proxy_balancerãªãµã¼ãã¼ãéç¨ãã¦ããçµé¨ããµã¾ããã¤ã¾ãããç¹ãªã©ãå ¬éãã¦ããããã¨æãã¾ãã ã¾ããmod_proxy_balancerã®
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}