????????????????nginx+php??fastcgi????????php-fpm.conf?????е????????????????????????nginx?phpcgi?????????????????????unix socket????????fastcgiЭ????????Ч????????127.0.0.1?????????????????08?????????????????Dell 2960??16G??棩????????????裬????????????900qps???????6000qps???????????fastcgiЭ????????unix socket???????????????spawn-fcgi????????????????????phpcgi??????????php-fpm?е?????????????????????????????

???????nginx??php-fpm??????????????????????????fastcgi_keepalive??????????nginx?fastcgi???????????????????Ч???

????nginx+php-fpm??????????????????壬nginx??status????php-fpm??status??????????????nginx????????????????php-fpm??status??????????????php-fpm??????????????????????????????????????nagios???????????????????????“??????”??

????php-fpm.conf???????л??м???????????????????????????????????????? pm.max_requests???????php-slow log???????slow log ?????php?????????????????????????????У?php???????????????rsyslog???д??????з?????????????????????php??????????

????php???????????????????£??п??????????????????????????????????????redis???????????????????????????????sysctl.conf?????timestamps=1 ???? tw_reuse/tw_recycle?????????ж????????????????????????????????????haproxy??????????????

??????????漰??????????????php????????????????????????????????php-fpm??????????php????????????ó????????????????php-fpm??????????????php???????д??????

???????????????MySQL????????MHA+keepalived??????????????????????????????????????????5.6???°?MySQL???????ü?????????????????MySQL??????????????????????в??????MHA???????????????????MHA???л???????MySQL binlog????????У??????????????????????????????????е?????磺????????????л?????????????????????????????????????????06???????sina?????????Trust DMM?????????? DNS??MON???????д?????????MySQL??????????????????????????????????л??????binlog???????????????????????????????????????????????????????????????????????鷳??????????????ù?sina???????????

??????????????????DBA??????????????e???????鰱???????SQL????????MySQL??????????????????????????????????????е?????????????????????????Ч??????????????????????????????????????????DBA??????????????percona????????????????????????????????????????

????MySQL????????????????numa????£?????????????????Ч???????numactl???????е???????????percona??MySQL?汾????????? memlock?????MySQL??Innodb????????????????????swap??

????MySQL?????????????????????洢???治??μ??????????????Innodb???棬??????д???????????????Myisam???棬?????????????????á?????????????????????????????????Myisam?????????????????Myisam???????????????????????????????????£???????????Ч?????????myisam_use_mmap????????????MySQL??myisam??data????mmap??????У??????????Ч??????????mysiam??????????

????????????????????????鷢?????????????????????????????“delete from table”???”update table set xxx=yyyy”????where??????????????????y????е?????????????????????????????????DBA??????????????????????????????? sql_safe_updates=1????????????????дmy.cnf?е????????mysql?????console???????á?

?????????????????Redis???DB????????????????IDC?????????????????????????Redis???????????????????????滻????ж????????????? Redis2.8?°汾psync??????????????????????????????twemproxy?????????????php???????????????unix socket??php???phpredis???????????????Ч????????????????temwproxy???к?????????????????????hash??cache???????????Ч?????cache???????????????redis?????????????????????й????redis??

????????????IDC?????洢??Cache??????????????????????CDN???????????4???????????????1.5G????????????????????IDC?洢????+SQUID disk cache?洢??????????????IDC??????????棬???????SQUID disk cache?????????HA??????????Varnish cache??????????????????????????work around??????squid cache??????????????????????????????????????varnish??????????????????????????????????????????????varnish???????????£????Щ?????????????????????NFILES / VARNISH_MAX_THREADS / nuke_limit ???

???????????????????????????????????????????????飬????????????rsyslog?????????????rsyslog???????????????ó?????????·???ο?6??

?????????Щ??????????????????????????????????????Щ????????????????

?????????????????????λ????????????????????ж?????????????????????????????????????????????????????????????棬?????????????Σ??????????????????????????????????????????????????????????????????????????ε????????????????£????????????????Σ???Щ????????Щ???????

??????????????????????????????С?????????????????????????????????????????????????????????????????Щ????? ????????????С????????????  ????????????????????????飬??????????????????????????????????????????????????????????????????????????????????????“???????????”???????????

???????????????????????Ч????Щ??????????????????????????????????????????????????????????????????10w?????????0??10w???????????????????????ε?????????????100w??????/???????????