Google ã®ã¦ã§ããã°å ¬éãã¼ã«ã使ã£ã¦ãããã¹ããåçãåç»ãå ±æã§ãã¾ãã
Google ã®ã¦ã§ããã°å ¬éãã¼ã«ã使ã£ã¦ãããã¹ããåçãåç»ãå ±æã§ãã¾ãã
ã¯ããããã¯åããã¤ãè¯ãè¦ãApacheã¨Nginxã®æ§è½å·®ã«è¦ãã¾ãã大ä½ãApacheã¯Nginxã®75%ç¨åº¦ã®æ§è½ã«è½ã¡çãã¾ããæ°åãã¤ãã®éçã³ã³ãã³ãã«å¯¾ãããªã¯ã¨ã¹ãå¦çã¯Nginxã®å¾æåéã ã¨æã£ã¦ããã®ã§ã大ä½ãããªãã®ã§ãã ããã§ãçé¢ç®ã«event_mpmã®ãã¥ã¼ãã³ã°ãè¡ã£ã¦ã¿ã¾ãããã§ã幾度ã¨ãªããã³ãã試ããçµæå°ãåºãããéçã³ã³ãã³ãã«å¯¾ããåææ¥ç¶æ°100ç¨åº¦ã«å¯¾ãã¦æé«ã®ããã©ã¼ãã³ã¹ã示ãevent_mpmã®è¨å®ã¯ä»¥ä¸ã®ããã«ãªãã¾ããã [program lang=âapacheâ escaped=âtrueâ] StartServers 4 MinSpareThreads 4 MaxSpareThreads 4 ThreadsPerChild 2 MaxRequestWorkers 2 MaxConnectionsPerChild 0 [/p
人éã¨ã¦ã§ãã®æªæ¥ï¼æ§ï¼ ãã¦ã§ãã®æ´å²ã¯äººé¡ã®æ´å²ã®ç¹°ãè¿ããã¨ãã観ç¹ããè²ã åå¼·ãã¦ãã¾ãã2014å¹´ã¾ã§ã®äººéã¨ã¦ã§ãã®æªæ¥ã®æ§ããã°ã§ãã ä¹ ã ã®Apache HTTP Server 2.4.1ã¨ããå®å®çããªãªã¼ã¹ãããã®ã§ãæ©éãã³ããã¼ã¯è©ä¾¡ãè¡ããä»åã¯event_mpmã®Experimentãã¨ãã¦ãæ´ãã¦ããã©ã«ãMPMã«ãªã£ãã®ã§ããã使ã£ã¦ã¿ããã æ¥æ¬ä¸ï¼ã²ãã£ã¨ããã¨ä¸çä¸ï¼æ©ãApache 2.4.1 event_mpmã®ã¬ãã¥ã¼ãæèãã¦ã¿ãã ã¯ããã« å人çã«ããevent_mpmãæ¡ç¨ããããã¨ã«æã注ç®ãã¦ãããevent_mpmã¯éåæåã®IOå¦çããã¦ãã¦ãnginxã«è¿ãã¢ã¼ããã¯ãã£ãã¨ã£ã¦ãããå³å¯ã«ã¯ãnginxã®éåæã¨æ¯ã¹ãå ´åãnginxã¯å¾¹åºçã«ãã³ããããã³ã°ï¼accept4ã使ãçï¼ãã¦workerã¹ã¬ããã§æ¬¡ã ã¨ä¸¦åå¦çã
ãã£ããæ¦è¦ ãã¼ã¯ã§3000req / sec æ¯åã³ã³ãã³ãæ´æ°è¦æ± ã³ã³ãã³ãæ´æ°ã®éã¯ä»æãããã¼ã¿ãapiçµç±ã§åãåã ã³ã³ãã³ãæ´æ°ã«ã¯TheSchwartzãä½¿ç¨ ãªã³ã³ãã³ããè²ã ãã¦ãããã°ã å°ãããã«æ¸ãæè¡ã¯å¤§åãå¨å²ã®ã®ã¼ã¯ãªæ¹ã ã«ãµãã¼ããã¦ããã£ããã®ã§ãåèªèº«ãä½ãããããã§ã¯ãªããæ®å¿µãããã æ§æ internet -> www(squid -> apache) -> app(memcached -> app) -> db ããã³ãã¨ã³ã wwwãµã¼ããapacheã¨squidãåããã¦ãããapacheããªã¯ã¨ã¹ããåããsquidã®ãã£ãã·ã¥ãæãã°ãããè¿ããç¡ããã°ããã¯ã¨ã³ãã®appãµã¼ãã¸proxyã ããã¯ã¨ã³ã appãµã¼ããmemcachedã¨ã¢ããªãåããã¦ããã ããããåé·åãã¦ããã©ããªã¯ã¨ã¹ãæ°ã®å²ã«å°æ°ã¯å°ãªãã æè¡ãã
15:59 | å æ¥ãéå¶ãã¦ãããµã¤ãcocoã®ç»åãµã¼ããæ§ç¯ãã¾ãããæ¨ä»ã¯VPSã500åç¨åº¦ã§åããããæ§ã«ãªããä¸äººWEBãµã¼ãã¹å±ã«ã¯æ¬å½ã«ããæ代ã«ãªãã¾ãããä»åãé¸å®å¯¾è±¡ã«ããã®ã¯ã以ä¸3ã¤ã®æ¥è ã§ããServersManï¼åæ0å / æé¡490å / ã¡ã¢ãª256M / HDD 10Gï¼S@@Sesï¼åæ3000å / æé¡450å / ã¡ã¢ãª512M / HDD 50Gï¼SAKURA Internetï¼åæ0å / æé¡980å / ã¡ã¢ãª512M / HDD 20Gï¼æéãã¹ããã¯ã«ã¤ãã¦ã2010/12/19æç¹ã®ãã®ãè¨è¼ãã¾ããããã£ã³ãã¼ã³é©ç¨ãä¿éã¹ããã¯ãªã©ç´°ãã注æç¹ãããã¾ãã®ã§ã詳ããã¯å社ãµã¤ãã§ã確èªä¸ãããã·ãã¥ã¬ã¼ã·ã§ã³å¦çæ°å¤ç®æ¨ã¯ãæé1åã¢ã¯ã»ã¹ã¨ãã¾ãããããã¯ã1ãã¼ã¸å½ãã50ç»åæ²è¼ã ã£ãã¨ããã¨ã200ä¸PVããã©ã¦ã¶ã
ç®ç ããã³ããHTTPãªã¯ã¨ã¹ããåãã¦ãããã¯ã¨ã³ãã®ã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã«reverse proxyãããããªæ§æã«ããã¦ãæå®ç§æ°ä»¥å ã«ä½ãããã®ã¬ã¹ãã³ã¹ãè¿ãããã 200ãè¿ããªãå ´åã¯ãå¦çãæã¡åã£ã¦500ãè¿ãããã èæ¯ ããã³ãã§ApacheãNginxãreverse proxyã¨ãã¦ä½¿ã£ã¦ããå ´åãããã¯ã¨ã³ããç¡å¿çã«ãªã£ã¦ãã¾ãã¨ãã¯ã©ã¤ã¢ã³ãã«ã¬ã¹ãã³ã¹ãè¿ãã®ã¯ããã©ã«ãã§æ°åãæ°ç¾ç§å¾(Apacheã®Timeoutã®ããã©ã«ãã¯300ç§ãNginxã®proxy_read_timeoutã®ããã©ã«ãã¯60ç§)ã«ãªã£ã¦ãã¾ãã¾ãã é常ã®Webãµã¼ãã¹ã§ã¯ãã®ãªã¼ãã¼ã®ã¿ã¤ã ã¢ã¦ãã§ãããã®ããããã¾ããããæ°ç§ä»¥å ã«(ã¨ã©ã¼ã§ãããã®ã§)ã¬ã¹ãã³ã¹ãè¿ããã¨ãæ±ããããç°å¢ãåå¨ãã¾ãã(æè¿ãç¹ã«å¤ãã®ã§ã¯ãªãã§ãããã:P) ãã¡ããããã¯ã¨ã³ãã
ä»äºã§ç»åãã£ãã·ã¥ãµã¼ãã¼ãæ§ç¯ããæã®ã¡ã¢ã大è¦æ¨¡äºä¾ã®è¨å®ä¾ãæ¤ç´¢ãã¦ããã¾ãè¦ã¤ãããªãã£ãã®ã§åããããªå¢éã®èª°ãã®åèã«ãªãã°ã ãã¼ã¯æã®ãã©ãã£ãã¯ã¯æ°Gbps ç»åç·å®¹éã¯æ°åTB ããã¯ã¨ã³ãã®storageãè¤æ°ç¨®é¡ è¦æ¨¡ã¨ã¢ã¯ã»ã¹éã¨ã¢ã¯ã»ã¹ãããç»åã®ç¨®é¡ãå¤ãã®ã§ãsquidã§disk cacheã使ç¨ããã¨COSSçã使ç¨ãã¦ãdiskIOã§è©°ã¾ãçºãå ¨ã¦on memory cacheãcache容éã確ä¿ããçºã«å¿ ç¶çã«cacheãµã¼ãã¼ã®å°æ°ãæ°åå°ã 1. squidãsiblingæ§æã§ä¸¦åã«ä¸¦ã¹ã cache_peer 10.0.1.1 sibling 80 3130 no-query no-digest proxy-only cache_peer 10.0.1.2 sibling 80 3130 no-query no-digest proxy-o
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}