Alexey Akulovichã¯ãè² è·ã®é«ãPHPãããžã§ã¯ãã®ã©ã€ããã¹ã«ã€ããŠèª¬æããŸãã ããã¯Highload ++ 2016ã®åŸ©å·åã§ãã
ç§ã®ååã¯ã¬ã·ã£ã§ããPHPã§æžããŠããŸãã
幞ããªããšã«ãã¬ããŒãã¯ããã«ã€ããŠã§ã¯ãããŸããã ã¬ããŒãã¯ããããã¯ãŒã¯éçºã®å顧ã«é¢ãããã®ã§ã-ãããžã§ã¯ããã©ã®ããã«éçºããããã ã©ã®ãœãªã¥ãŒã·ã§ã³ããã£ããã³ã§ãããããŸãã¯ç§ãã¡ã®è² è·ã«éåžžã«ç¹æã§ããããç§ãã¡ã¯ã¹ãã¬ã¹ãçµéšããŠããä»ã®ãããžã§ã¯ãã§äœ¿çšã§ãããã®ã䜿çšããŸããã
å§ããŸãããã
äœã«ã€ããŠè©±ããã
1ã€ã®ã¬ããŒãã§ãã¹ãŠã®ããšã話ãããšã¯äžå¯èœã§ãããããç§ã«ãšã£ãŠæãèå³æ·±ããšæããããããã¯ãéžæããŸããã ããã¯ãããŒã¿ããŒã¹ãšãã®ã¹ãã¬ãŒãžãžã®ã¢ã¯ã»ã¹ãéçºããããšãPHPãæé©åããããšã®åé¡ããããŠãã®çµæãšããŠç§ãã¡ãäœã«ãªã£ãã®ãããšããåé¡ã§ãã
å°ããªãªããããã¯ãšããŠïŒæåéã1ãæåãVKontakteã¯ITå°é家åãã§ã¯ãªã10æã«ãªããŸããããHighloadã10æã§ãããã®ãããªèšå¿µæ¥ã«ããã°ã©ã ã«ã¬ããŒããåãå ¥ãããããšããäºå®ã¯éåžžã«æ¥œãããã®ã§ãã
ããããã¹ãŠå§ãŸã£ãæ¹æ³
ããã¯å ã®ã¹ããŒã ã§ã¯ãããŸãããããããã¯ãŒã¯ã¯ããã«å®çŸããŸããã è² è·ãšäººæ°ã®å¢å€§ã«äŒŽããNginxã«ããã³ããããããªã¯ãšã¹ããåŠçããApacheã«éä¿¡ããsmod PHPãèµ·åããŠãæšæºã©ã³ãã§ããMySQLãŸãã¯Memcachedã«ã¢ã¯ã»ã¹ãããšãã«ããã®ãããªå žåçãªã©ã€ã ã¹ã¿ãã¯ãååŸããŸããã åºçºç¹ãšããŠã圌ããå§ããŸãããã
ãã®ãããè² è·ãå¢å€§ããŠããŸãã
ç¹°ãè¿ãã®ãŠãŒã¶ãŒãªã¯ãšã¹ããNginxãšåããã·ã³ã«æ¥ãããšãå¿ èŠãšããããŒã«ã«ããŒã¿ãæããªãNginxã«è² è·ãããã£ãŠããå Žåã¯ãååãªæ°ããããŸããã§ããã
Apacheã®çŸåšã®ã¯ã©ã¹ã¿ãŒãµã€ãºã«å¯ŸããŠè² è·ãååã§ãªãå ŽåãããŒã«ã«ã»ãã·ã§ã³ãããŒã«ã«ãã£ãã·ã¥ãåãApacheãšåãPHRãžã®ãªã¯ãšã¹ããå¿ èŠãšããããŒã¿ã䜿çšããªããããžã§ã¯ãã§ã¯ãããã«å€ãã®ãã·ã³ãé 眮ãããã¹ãŠãæ©èœããŸãã æšæºåè·¯ã
MySQLããã³Memcachedã®å Žåãããã¯ãã¹ãŠã®Apacheãå¿ èŠãšããå€éšããŒã¿ãŠã§ã¢ããŠã¹ãªã©ã§ãããå¥ã®ãã·ã³ãé ä¿¡ããã ãã§ã¯æ©èœããŸããããã£ãšå·§åŠã§è³¢ãããšãããå¿ èŠããããŸãã
ããã§ã¯ãããŒã¿ããŒã¹ã®éçºãšäžè¬çãªæ¡åŒµæ¹æ³ããå§ããŸãããã 䜿çšã§ããæåã®ãæãåçŽãªãæãäžè¬çãªæ¹æ³ã¯åçŽã¹ã±ãŒãªã³ã°ã§ãããã匷åãªããŒããŠã§ã¢ãããå€ãã®ããã»ããµããã£ã¹ã¯ã䜿çšããããæç¹ã§ããã§ååã§ãã éçã¯ããã€ãã®å žåçãªæ§æã§ããããéã®ããã«ãéã®ããã«ãããè²·ãäœè£ããããŸãã ç¡éã«æé·ããããšã¯äžå¯èœã§ãã
誰ãããã£ãŠããããæ£ãããªãã·ã§ã³ã¯ãæ°Žå¹³ã¹ã±ãŒãªã³ã°ã§ãã ãã匷åãªéçãäœãããšãããããããå ã®éçãããããã«åŒ·åãªéçãäœããšãè² è·ãåæ£ããŸãã ããã«ã¯ãããŒã¿ã1ã€ã®å Žæã§ã¯ãªã1ã€ã®ãã¹ã±ããã«ä¿åãããããšãèæ ®ã«å ¥ããããã«ãã³ãŒãã®å€æŽãå¿ èŠã§ãããäœããã®ã¢ã«ãŽãªãºã ã«åºã¥ããŠäœããã®æ¹æ³ã§å¡ãã€ã¶ãããŸãã
ãã®ããããªãããã®æ¹æ³ã§æ°Žå¹³æ¹åã«ã¹ã±ãŒãªã³ã°ãè©Šã¿ãããã«ãããŒã¿ã®äžè²«æ§ãšãã³ãŒãã¬ãã«ã§ã®ã¹ãã¬ãŒãžã®å Žæãšæ¹æ³ããã®ç¬ç«æ§ãæžããå¿ èŠããããŸãã æãç°¡åãªããšã¯ãå€éšããŒãçµåãããã³1ãæã§ã¹ãã¬ãŒãžãå¿ èŠãšãããã®ä»ã®ãã®ã®æåŠã§ãã
å¥ã®ãªãã·ã§ã³ãšããŠã1ã€ã®ãµãŒããŒã«è€æ°ã®ã¿ã°ãé 眮ããªãå Žåãããããç°ãªããµãŒããŒã«é åžããŸã-éåžžã®ãœãªã¥ãŒã·ã§ã³ã§ãã ããã¯ããµãŒããŒããšã«æ倧1ã€ã®ããŒãã«ã®ç²åºŠã§å®è¡ã§ããŸãã
ããã§ååã§ãªãå Žåã¯ããã¬ãŒãèªäœãããŒãã«åå²ããããããåå²ããŠãåããŒã¹ãå¥ã ã®ãã·ã³ã«ä¿ç®¡ããŸãã ããã«ã¯ã³ãŒãã®ã»ãšãã©ã®åŠçãå¿ èŠã§ããéåžžã®éžæãã¬ãŒããå®è¡ããããšãã§ããŸãããããŒããšã«ãã®ããŒãã«ã®ãã©ã°ã¡ã³ãããåã·ã£ãŒããéžæããã©ãããäžéå±€ããŸãã¯ã³ãŒãå ã§ä¿æããå¿ èŠããããŸãã
ãã®æç¹ã§ããããªãæé·ã®åé¡ãéèŠã«ãªããŸãããµãŒããŒã®æ°ãäžåºŠå¢ãããå Žåããããããããå¢ããå¿ èŠããããŸãã ããšãã°ããã·ã³ã®æ°ã8ãã16ã«å¢ãããã³ã«ããããã®ã·ã£ãŒãå ã®ããŒã¿ã®ãã©ã³ã¹ãåãçŽããšãã«ããšã³ãžã³éãMySQLéã®èšå€§ãªæ°ã®ããŒã¿ç§»è¡ãçºçããå¯èœæ§ãé«ããªããŸãã ãã·ã³éã®ãã®å·šå€§ã§æ³¢ã®ãããªããŒã¿ã®èŒžè¡ãé¿ããããã«ãä»®æ³ã·ã£ãŒããããã«äœæããããšããå§ãããŸããã€ãŸãã8åã®ã·ã£ãŒãã¯ãªããã8000åãããšããŸããããæåã®1,000åã¯æåã®ãµãŒããŒã«ä¿åããã 2çªç®ã®ãµãŒããŒã§æ°åãªã©
ã·ã£ãŒãã®æ°ãå¢ããå¿ èŠãããå Žåã1000åãŸãã¯500åã®ã·ã£ãŒããããã«ã¯è»¢éããŸãããã1ã€ã®å°ããªã·ã£ãŒãããéå§ã§ããŸãã 圌ãã¯ã·ã£ãŒããåãããŸãããããã ãã§ã-ããã¯æ°ãããã·ã³ã§åäœãããã§ã«å°ãããŒããããŠãããããäžæ¹ã¯å°ãã¢ã³ããŒããããŠããŸãã ãã®è»¢éã®ç²åºŠã¯ãäœè£ãããããããããžã§ã¯ãã«ãã£ãŠãã§ã«æ±ºå®ãããŠããŸãã ã·ã£ãŒãã®ååãäžåºŠã«è»¢éãããšãéåžžã®ç§»è¡ã¹ããŒã ã«æ»ããŸãïŒããã蚱容ãããå ŽåïŒã
ãšã³ãžã³ãã©ã®ããã«åå²ããŠããããã¯ãªã¬ãŒã·ã§ãã«ããŒã¿ããŒã¹ã§ãããæ®éçã§ã¯ãŒã«ã§ãããããã©ãŒãã³ã¹ã®ããŒã¯ããããããå€ãã®ããã©ãŒãã³ã¹ãå¿ èŠãªãã®ããã£ãã·ã¥ãããŸãã éåžžã®ãã£ãã·ã¥ã«ã€ããŠïŒããã£ãã·ã¥ã«è¡ããŸããã§ãããããŒã¿ããŒã¹ã«è¡ããŸããããç§ãã¡ã¯è©±ãããŸããã
ã¯ãŒã¯ããŒããç¹ã«ãã£ãã·ã³ã°ã®åé¡ã«å¯ŸåŠããã®ã«åœ¹ç«ã€ãããèå³æ·±ããã®ã«ç§»ããŸãããã
æåã®ãªãã·ã§ã³ã¯ããã£ãã·ã¥ãäºåäœæããã¿ã¹ã¯ã§ãã ããã€ãã®çš®é¡ã®ã³ãŒãã競åããå Žåã倧éã«ååšããå Žåã«ãããŒã¿ããŒã¹ã«ããŒã¿ãåæã«éä¿¡ãããšäŸ¿å©ã§ãã ãã人ãèªåã®å£ã«æçš¿ãæçš¿ãããšããŸããããããã«é¢ããæ å ±ã¯ãã£ãŒãã§å人ã«éä¿¡ãããŠããŸãã ãããè¡ããšãããŒãã圢æãããã¹ãŠã®ã³ãŒããããã«ãã£ãã·ã¥ã«çªå ¥ããŸãããã£ãã·ã¥ã«ãã®æçš¿ã¯ãªããã³ãŒãã¯ããŒã¿ããŒã¹ã«éãããŸãããããã¯ããŸãè¯ããããŸããã å€æ°ã®ã³ãŒããåæã«ããŒã¿ããŒã¹ã«å¿ã³èŸŒã¿ãŸãã
äœãã§ããŸããïŒ æçš¿ãäœæããåŸ-ããŒã¿ããŒã¹ã§ãæçš¿ã衚瀺ããããã£ãŒãã«ã¡ãã»ãŒãžãéä¿¡ããåŸã«ã®ã¿ãããã«ãã£ãã·ã¥ã«ãšã³ããªãäœæã§ããŸãã ããŒã圢æã³ãŒãããã£ãã·ã¥ã«æ ŒçŽãããŸã-ã¬ã³ãŒãããããŸãã åºå°ã«ã¯ããè¡ããŸãããåºå°ã¯äœ¿çšãããŸããã ãã£ãã·ã¥ã«ååãªã¡ã¢ãªãããå Žåãåèµ·åããŸããã èªã¿åãã®ããã«ããŒã¿ããŒã¹ã«ã¢ã¯ã»ã¹ããããšã¯äžåãªãããã¹ãŠããã£ãã·ã¥ããååŸãããŸãã
ããŒã¿ããŒã¹ã®è² è·ãæžãããã1ã€ã®ãªãã·ã§ã³ã¯ãæéåãã®ãã£ãã·ã¥ã䜿çšããããšã§ãã ããã¯ãã«ãŠã³ã¿ãŒã®åæåŠçã§ããããããé·ãä¿åãããããŒã¿ã§ãã ãã€ã³ãã¯äœã§ããïŒ å Žåã«ãã£ãŠã¯ãããžãã¹ããžãã¯ã¯ææ°ã®ããŒã¿ãæäŸããªããããããŸããããããŒã¿ããŒã¹ãžã®ãã®æ è¡ã§ä¿åããŸãã ãŠãŒã¶ãŒã®ãããã£ãŒã«åçãèããŠã¿ãŸããã-ãŠãŒã¶ãŒããããæŽæ°ããå Žåãããã«ãã£ãã·ã¥ãåãåãããšãã§ããŸããããŒã¿ããŒã¹ããæŽæ°ãããããæ°ç§ã§ããã¯ã°ã©ãŠã³ãã§æŽæ°ã§ããŸãã
3çªç®ã®ãªãã·ã§ã³ã¯ãããã«å€§ããªè² è·ã«é¢é£ä»ããããŠããŸãã ãããã£ãŒã«ã«å人ãšã®ãããã¯ããããšæ³åããŠãã ããã ã¢ãã¿ãŒãšååãååŸãããå Žåã¯ãããŒã¿ããŒã¹ã«6åã¢ã¯ã»ã¹ããããããã®ããŒã¿ãååŸããå¿ èŠããããŸãããã®æ è¡ã®åŸãåä¿¡ããããŒã¿ããã£ãã·ã¥ã«ä¿åããã ãã§ããã°ãã»ãŒåæã«ããŒã¿ãæŽæµãããŸãã
ãã®è² è·ãäœããã®æ¹æ³ã§åæžããããã«ããããã¡ã€ã«ãã£ãã·ã¥ã«ããŒã¿ãåæã«ä¿åããã®ã§ã¯ãªããæ°ç§ãã©ã¹ãŸãã¯ãã€ãã¹ããããšãã§ããŸãã åæã«ïŒç§ãã¡ãåã³æ¥ããšããã»ãšãã©ã®å ŽåãããŒã¿ã¯ãŸã ãã£ãã·ã¥ã«æ®ã£ãŠããŸãã ã¹ãã¬ãŒãžã®ã©ã³ãã æ§ã®ç¯å²ã§ãTTLæéã®è² è·ãåæ£ããŸãã
å¥ã®æ¹æ³ã¯ãããã«å€§ããªè² è·ãããããšãåºå°ã«å°çãããšãã§ããã圌女ã¯ã§ããŸããã§ããã 2çªç®ã®ãªã¯ãšã¹ããå°çããå Žå-ãã£ãã·ã¥ã«ããŒã¿ãååšããªãå ŽåãããŒã¿ããŒã¹ã«å床ã¢ã¯ã»ã¹ããŸãããããŸã§ã¯ã§ããŸããã§ãããã åã³ã§ããŸãã ãèœäžåéšéã®è² è·ã«ããæªåããæ¶æ» ããå¯èœæ§ããããŸãã
ãããé²ãããã«ãããŒã¿ããŒã¹ã«ã¢ã¯ã»ã¹ããå¿ èŠã®ãªããã©ã°ããã£ãã·ã¥ã«ä¿åããããšãã§ããŸãã ãªã¯ãšã¹ãã¯ãã£ãã·ã¥ã«å°çãããã£ãã·ã¥ã«ãšã³ããªã¯ãããŸãããããããŒã¿ããŒã¹ã«ç§»åããªãããã§ãã¯ããã¯ã¹ããããã³ãŒãã¯ããŒã¿ããŒã¹ã«ç§»åãããã³ãŒããã©ã³ãã«æ²¿ã£ãŠããã«å®è¡ãããäžå¯èœã§ããããã«ããªã¯ãšã¹ãã¯ããŒã¿ããŒã¹ã«ç§»åããŸãã-ãããã¿ã€ã ã¢ãŠããæåŸ ãããã³ãã¹ãŠã¯ãããžãã¹ããžãã¯ã§èš±å¯ãããŠããå Žåã¯åé¡ãããŸããã èœã¡ãªãã§ãã ããããã ããç¹å®ã®è² è·ãªãã§å°ãªããšãããã€ãã®çããäžããŠãã ããã
ãããã«ãããã·ã¹ãã ã«ãã£ãã·ã³ã°ãå°å ¥ãããŠããå Žåããã®ãã£ãã·ã³ã°ã¯æ°žç¶çãªã¹ãã¬ãŒãžã·ã¹ãã ãã€ãŸãããŒã¿ããŒã¹ã·ã¹ãã ã«çµ±åãããŸããã æ€èšŒã®åé¡ããããŸã-ã³ãŒããããŸãèšè¿°ãããŠããªãå Žåããã£ãã·ã¥ããå€ãããŒã¿ãååŸãããããã£ãã·ã¥ã«äœãåé¡ãããå¯èœæ§ããããŸãã ããã«ã¯ãã¹ãŠãããæ£ç¢ºãªããã°ã©ãã³ã°ææ³ãå¿ èŠã§ãã
è² è·ãå¢å€§ãããšãã«äœããã¹ããããããŠã·ã£ãŒãã§ããªã
ãã®ãããžã§ã¯ãã«ã¯ãMySQLãã¯ã©ãã·ã¥ã«è³ããŸã§å¯ŸåŠã§ããªããªã£ãç¶æ³ããããŸããã Memcachedã¯éè² è·ã«ãªã£ãŠããããã倧éã«åèµ·åããå¿ èŠããããŸããã ãã¹ãŠãããŸãæ©èœãããæé·ããå ŽæããããŸããã§ããããã®æç¹ã§ä»ã®ãœãªã¥ãŒã·ã§ã³ã¯ååšããŠããŸããã§ãã-ããã¯2007-2008ã§ããã
ãã®ãããªè² è·ã§ãããžã§ã¯ãã¯ã©ã®ããã«é²ã¿ãŸãããïŒ
åäœããªãMemcachedããå°ãªããšããã®ãããªè² è·ã«èãããœãªã¥ãŒã·ã§ã³ã«æžãæããŠããããªã³ãšãªããç¹°ãè¿ãããšã決å®ãããŸããã ã¿ãŒã²ãã£ã³ã°ãªã©ã«é¢é£ãããšã³ãžã³ãç»å ŽããŸããã æ±çšã¹ãŒããŒãœãªã¥ãŒã·ã§ã³ããè² è·ã転éããŸãããæ±çšæ§ããããããæ©èœã¯ã»ãšãã©ãªããããŠãããŒãµã«ãœãªã¥ãŒã·ã§ã³ãããåªãããçã調æŽãããå°ããªãœãªã¥ãŒã·ã§ã³ã«éåžžã«é«éã«åäœããŸããã ããã«ããããã®ãœãªã¥ãŒã·ã§ã³ã¯ããããžã§ã¯ãã§äœ¿çšãããèŠæ±ã®è² è·ãšçš®é¡ã«å¿ããŠããã®çšéã«åãããŠæ£ç¢ºã«èª¿æŽãããŸãã
ããã¯çŸåšäœ¿çšãããŠãããšã³ãžã³ã®çããªã¹ãã§ãã
å®éã«ã¯ããããã®å€ãããããŸãããã¥ãŒããªã¹ãããªãã³ãããŸããŸãªãšã³ãžã³ã§åäœãããšã³ãžã³ããããŸãã ãªã¹ããšã³ãžã³ãäœãã®ãªã¹ããåŠçããŠãããšããŸãããã 圌ã¯ä»ã«äœãç¥ããããªã¹ãã«åãçµãã§ããŸãããããŸããã£ãŠããŸãã
ã©ã®ããã«èŠããŸãããïŒ
ãã®ç¬éãå€éšããŒã¿ãžã®2ã€ã®ã³ãã¯ã¿ããããŸããã Memcachedãžã®ã³ãã¯ã¿ããããMySQLãžã®ã³ãã¯ã¿ããããŸããã ãšã³ãžã³ãšã®çžäºäœçšã®ãããã³ã«ã«ã¯ãMemcachedãããã³ã«ãéžæããããšã³ãžã³ã¯Memcachedã®ãµããããŸããã åæã«ããã¹ãŠããã§ã«ã·ã£ãŒãåãããŠãããåãã¿ã€ãã®ã·ã£ãŒãã®ã°ã«ãŒããã¯ã©ã¹ã¿ãŒã«çµåãããŸããã ã³ãŒãã®ããžãã¹ããžãã¯ã®ã¬ãã«ã§ã®ã¯ã©ã¹ã¿ãŒå šäœãžã®ã¢ã¯ã»ã¹ã
次ã®ããã«ãªããŸããã
ã€ãŸããããã®ååã®ã¯ã©ã¹ã¿ãŒãžã®æ¥ç¶ãèš±å¯ããŸãããšãããšããªã¯ãšã¹ãã®äžéšã§ãã®æ¥ç¶ã䜿çšããã ãã§ãã
å察ã«ãéåžžã¯Memcachedã®ã¯ã©ã¹ã¿ãŒãšãšã³ãžã³ã®ã¬ãã«ããŸãã¯Memcachedã®ãµããããåèšèšããããšã³ãžã³ã®å Žåããªã¯ãšã¹ãã¯æ¬¡ã®ããã«ãªããŸãã
æšæºãœãªã¥ãŒã·ã§ã³ãéåžžã®ãã£ãã·ã¥ã
ç¬èªã®ãããã³ã«ãå¿ èŠãšããããå ·äœçãªãœãªã¥ãŒã·ã§ã³ãããå Žåããã®ãããªåºããã§ã³ã¹ããå¿ èŠããããŸããã
åçŽãªããŒãäœæããã ãã§ãªããããŒã«è¿œå ã®ãã©ã¡ãŒã¿ãŒãçž«ãä»ããŸãããšã³ãžã³ã¯ãã®ããŒã解æããè¿œå ã®èŠæ±ãã©ã¡ãŒã¿ãŒãšããŠäœ¿çšã§ããŸãã ããã¯ãæšæºãããã³ã«ããµããŒãããäœãããçŽããªãããã«å¿ èŠã§ãããããšã³ãžã³ã¯ããã€ãã®è¿œå ãã©ã¡ãŒã¿ãŒãåãããšãã§ããŸããã
å€æ°ã®ãã©ã¡ãŒã¿ãŒãå¿ èŠãšããããã«è€éãªãšã³ãžã³ã®å Žåãã¯ãšãªã¯æ¬¡ã®ããã«ãªããŸãã
ããã¯ãã§ã«è€éãªèŠæ±ã§ã-ç¹å¥ãªåºåãæåããªãã·ã§ã³ã®ãããã¯ããããŸãã ãããããã¹ãŠããŸããããŸããã ãããèªåã®æã§ã¯ãªããäœããã®çš®é¡ã®ã©ãããŒã䜿çšããŠãã®ãããªãªã¯ãšã¹ããäœæããå Žåãããã¯ããªãè¯ãããšã§ãã
ã©ã®ããã«èŠããŸãããïŒ
ã³ãŒãã¯ã¯ã©ã¹ã¿ãŒã«çŽæ¥ç§»åããŸããã ããããžãã³ãŒãã«ä¿åããå¿ èŠã¯ãããŸããããããã·ã¯ãããè¡ããŸãã-ãããã¯ã³ãŒãã䜿çšããŠåãµãŒããŒã§åäœããç¹å¥ãªãšã³ãžã³ã§ããã ã€ãŸãããã¹ãŠã®ã³ãŒãæ¥ç¶ã¯ããŒã«ã«ãšã³ãžã³ã«å¯ŸããŠè¡ããããããã·ã¯ã¯ã©ã¹ã¿ãŒã¹ãã¬ãŒãžããããžãèæ ®ããŠç®¡çè ã«ãã£ãŠæ¢ã«æ§æãããŠãããããå€åºå ã§å€æŽãããå¯èœæ§ããããŸãã ã¯ã©ã¹ã¿ãŒã®å Žæãã¯ã©ã¹ã¿ãŒå ã«ããããŒã¹ã®æ°ãã¯ã©ã¹ã¿ãŒã§ã©ã®ãããªäœæ¥ãè¡ãããŠãããã¯æ°ã«ããŸããã§ããããããã¯åé¡ã§ã¯ãããŸããã ãããã·ã«æ¥ç¶ãããšããããã·ãæ©èœããŸãã åæã«ãå€éšããŒã¿ãå¿ èŠãªå Žåã1ã€ã®ã¯ã©ã¹ã¿ãŒã¯ãããã·ãä»ããŠå¥ã®ã¯ã©ã¹ã¿ãŒã«ç§»åã§ããŸãã
ã¯ã©ã¹ã¿ãŒå ã®ã·ã£ãŒããéžæããæ¹æ³
2ã€ã®ãªãã·ã§ã³ããããŸãïŒ ããã·ã¥ã«åºã¥ããŠããŒå šäœãéžæããããæ°åã§ã¯ãªãæåã®æ°åãã€ãŸãããŒæååã®æ°åãæ¢ãã次ã®æäœã®ããŒãšããŠäœ¿çšããŸã -å°äœãã¢ãžã¥ãããŸãã æšæºçãªå€ããå°ãªãããœãªã¥ãŒã·ã§ã³ã
ããããã®æ¹æ³ã§åäœããäžè¬çãªãœãªã¥ãŒã·ã§ã³ã¯ãTwitterã®twemproxyã§ãã 誰ããè©Šããããšã¯ãªãããMemcachedãŸãã¯Redisã®å€§èŠæš¡ãªã€ã³ã¹ããŒã«ã䜿çšããŠããå Žåã¯ã䟿å©ã«ãªããã©ããã確èªã§ããŸãã
ããã¯ãã¹ãŠçºå±ããæé·ããŸããããããæç¹ã§ãç§ãã¡ãæŒã蟌ãããšããæéæ°ã®ããŒã ãšãã圢ã§ãããã³ã«ã®å¶éãçããŸããã ãã©ã¡ãŒã¿ãå€æ°ãããããã®è€éãªã¯ãšãª-ããªãæ··éããŠãããããŒã®é·ãã«ã¯250ãã€ãã®å¶éããããæååãæ°å€ãšãããã©ã¡ãŒã¿ããããŸããã ããã¯ããŸãå¿«é©ã§ã¯ãªããããã¹ããããã³ã«ã®å¶éãããããã€ããªãããã³ã«ããããŸããã§ããã 圌ã¯ãå¿çã®ãµã€ãºãã¡ã¬ãã€ãåäœã§å¶éããã¹ããŒã¹ãæ¹è¡ããã®ä»ãã¹ãŠã®ãã€ããªããŒã¿ããšã¹ã±ãŒãããå¿ èŠãçããŸããã
ããã«ããããã€ããªãããã³ã«ãžã®ç§»è¡ã決å®ãããŸããã
æãè¿ãé¡äŒŒäœã¯protobufã§ãã ããã¯ãäºåå®çŸ©ãããã¹ããŒã ãæã€ãããã³ã«ã§ãã ãããã¯ãmsgpackãªã©ã®ãããªã¹ããŒãã¬ã¹ãããã³ã«ã§ã¯ãããŸããã
äºåã«ã¹ããŒã ã«æžã蟌ãŸãããããã·ã®ããã«æ§æã«ä¿åãããŸãã ããã«åºã¥ããŠã¯ãšãªãå®è¡ã§ããŸãã ãšã³ãžã³ã¯ããã®ã¹ããŒã ãžã®æ®µéçãªç§»è¡ãéå§ããŸããã Memcachedãããã³ã«ã®åé¡ã®è§£æ±ºã«é¢é£ããåé¡ã«å ããŠã ããããæçšãªå©ç¹ãåŸãããŸãããããšãã°ãTCPãããã³ã«ããUDPãããã³ã«ã«åãæ¿ããããããµãŒããŒãžã®æ¥ç¶æ°ãå€§å¹ ã«ç¯çŽãããŸããã ãšã³ãžã³ãäžæãã30äžã®æ¥ç¶ããšã³ãžã³ãããã¯ããŠçµ¶ããä¿æããå Žåããšã³ãžã³ã¯ããŸãå·ãããããŸããã ããããUDPãã±ããã§ããããã¹ãŠãã¯ããã«åªããŠããå Žåã¯ãã¯ããã«åªããŠããŸãã ãã·ã³éã®æ¥ç¶ã®æå·åãããã¯å人çã«ã¯æã楜ããããšã§ã-éåæçžäºäœçšã
éåžžãåãPHPãä»ã®å€ãã®èšèªã§éåžžã®ã¯ãšãªã¯ã©ã®ããã«æ©èœããŸããïŒ
å€éšããŒã¿ããŒã¹ã«ãªã¯ãšã¹ããéä¿¡ããŠåŸ æ©ããå®è£ ã«å¿ããŠã¯ãŒã«ãŒãã¹ã¬ããããŸãã¯ããã»ã¹ããããã¯ããŸãã ãã®å ŽåãããŒã«ã«ãããã·ã«ãªã¯ãšã¹ããéä¿¡ããŸããããã¯éåžžã«é«éã§ãããåäœããŸãã å®è¡ã®ã¹ã¬ããã¯ãããã¯ãããŸããããããã·èªäœã¯éåæã§ãã³ãŒããå¥ã®ã¯ã©ã¹ã¿ãŒã«ç§»åããå¿çãåŸ ã£ãŠåä¿¡ãããã°ããã®éããŒã«ã«ã¡ã¢ãªã«æ ŒçŽããŸãã
ã³ãŒãå ã®å¿çæ§æãžã®åçãå¿ èŠãªå Žåããã§ã«ä»ã®èŠæ±ãããã€ãäœæããããããåŸ æ©ããŠå®äºããŸããã ãããã·ã«è¡ããŸãããããã§ãã®ãªã¯ãšã¹ãã«å¯Ÿããçãããã ããããããŒã«ã«ã¡ã¢ãªããã³ããŒããã ãã§ããã¹ãŠãè¿ éãã€éåæã«åäœããŸãã ããã«ãããã·ã³ã°ã«ã¹ã¬ããPHPã§ããªã䞊ååãããã³ãŒããèšè¿°ã§ããŸã ã
ãšã³ãžã³ã«ç§»è¡ããåŸããMySQLã¯ãŸã ãããŸããïŒ ãšã³ãžã³ã¯ãã§ã«å€ãã®ç°ãªã£ãŠããŸãã ããã€ãã®å Žæã§ã¯ããããã®å€ãããããŸãããããã¯äž»ã«å éšç®¡çè ã«é¢é£ãããã®ã§äœ¿çšãããå€éšããã¢ã¯ã»ã¹ã§ããªãç¡è² è·ã€ã³ã¿ãŒãã§ã€ã¹ãåããŠããŸãã ããã¯åäœããŸã-觊ããªãã§ãã ãããããã¯çã«åããŸãã å£ããŠå€§äžå€«ã§ã¯ãããŸããã
æ®å¿µãªããããŸã æžãçŽãããŠããªããã®ããããŸã-ãããã¯ã¹ãã¬ã¹ãçµéšããªãã®ã§ãæéãããã°ãã€ãæžãçŽããŸãã ããã¯ã次ã®ãããªãã¬ãŒãåã«ã€ãªãããŸãã
ã æ£çŽãªãšããããããæåŸã®ã¿ãã¬ããã«ãªããŸããã ãã®å¹ŽãŸãã¯ãã®å¹Žã«äœæãããŸããã 圌女ã¯è² è·ãæããŸããã圌女ã¯ããã§ããç§ãã¡ã¯ããã«èããŠå€§äžå€«ã§ãã ç§ã¯ãã®ãããªãã®ãçãããããããéºç©ãšããŠåãé€ãããã®ã§ããããŸã MySQLããããŸãã
ã§ã¯ãPHPã«ã€ããŠå°ã話ããŸãããã
説æãããŠããç¹å®ã®ãšã³ãžã³ããããŸãã ããŠãPHPã§ã®ç掻æ¹æ³ã«ã€ã㊠ã
PHPã¯é ãã®ã§ã誰ã«ã説æããå¿ èŠã¯ãããŸãããåçãªåä»ãã匱ãããã§ãã
ãŸãã圌ã¯éåžžã«äººæ°ããããŸãã ãã®èšèªã§äœæããããããžã§ã¯ãã¯ãã³ãŒããéåžžã«è¿ éã«èšè¿°ã§ãããããPHPã®ãã©ã¹ã§ãã ã³ãŒãããŒã¹ã®ãµã€ãºã¯ãã§ã«æžãæããããã»ã©çŸå®çã§ã¯ãªãã®ã§ããã®èšèªã§çããŠããŸãã ç§ãã¡ã¯ãã®å©ç¹ã掻çšãããã€ãã¹ãå¹³æºåããããšããŸãã
åãããžã§ã¯ãã¯ç¬èªã®æ¹æ³ã§ãPHPã®å¶éãåé¿ããããšããŸãã 誰ããPHPãæžãçŽããŠããã誰ããPHPèªäœã«èŠåŽããŠããŸãã
ç§ãã¡ã®å³æ¹
PHPã§æ¯ç§100äžã®ãªã¯ãšã¹ããåŠçããæ¹æ³ã¯ïŒ 100500å°ã®ãµãŒããŒããªãå Žåã ãŸããã
éã®éãç¡éã§ãªãå Žåãã»ãšãã©äžå¯èœã§ãã
VKontakteãããžã§ã¯ãã§ã¯ãã¯ãŒã¯ããŒãã®éçºãè¡ãããŸãããPHPããC ++ãžã®ãã©ã³ã¹ã¬ãŒã¿ãŒãäœæããããã¹ãŠã®ãµã€ãã³ãŒãããã£ãã·ã¥ãããã³ãŒãã«å€æãããŸãã 圌ã¯äœãããŸããïŒ PHPã®ãã¹ãŠã®ãµããŒããã€ãŸããKPHPã®ç»å Žæã«ãããžã§ã¯ãã§äœ¿çšãããŠããèšèªã®ã¬ãã«ã¯å®è£ ãããŠããŸããã ãã以éãããã€ãã®ããšãç»å ŽããŸããããäžè¬çã«ã¯å€ãã³ãŒãã®ã¬ãã«ã§æ©èœããŠããŸãã ãã以æ¥ãã»ãšãã©ç»å ŽããŠããŸããã
äœãè¡ãããŠããŸããïŒ ãã¹ãŠã®ã³ãŒãã¯åœŒã«ãããŒããã£ã¹ããããŸã-éçã¢ãã©ã€ã¶ãŒãããã圌ã¯åãæšæž¬ããããšããå€æ°ã®äœ¿çšãåæããŸãã å€æ°ãåžžã«æååãšããŠäœ¿çšãããå Žåã¯ãã³ãŒãå ã«stdæååãå«ãŸããŠããå¯èœæ§ãé«ããªããŸãã æ°å€ã®é åãšããŠäœ¿çšãããå Žåãintã®ãã¯ãã«ã«ãªããŸãã ããã«ãããã·ã¹ãã ã³ã³ãã€ã©ã¯çµæã®ã³ãŒããéåžžã«é©åã«æé©åã§ããŸãã
åæšè«ããã®ããããªäºçŽ°ãªããšïŒå€æ°ãéåžžã«å¥åŠã«äœ¿çšãããŠããããšããã©ã³ã¹ã¬ãŒã¿ãŒãèŠããšïŒå¥ã®åãæå®ãããŠããé¢æ°ã«æž¡ãããããå¥ã®åã®é åã«æž¡ãããïŒãèŠåãã¹ããŒã§ããŸããæ°é®®ãªã³ãŒããåéããéçºè ã¯ãããã«äœããã®çããããããšã«æ°ä»ãã§ããããæ£ããã³ãŒããããã«ããããã³ã³ãã€ã©ã«ãšã£ãŠã¯åãªã誀æ€ç¥ã§ãããã©ããã確èªãã䟡å€ããããŸãã
ãµã€ããKPHPã«ç¿»èš³ããããšããéçã³ãŒãåæã®ããã«å€æ°ã®ãšã©ãŒãèŠã€ãããŸããã
ãªã«ïŒ PHPã³ãŒãããC ++ã³ãŒããååŸããè¿œå ã®ã©ã€ãã©ãªã§ã³ã³ãã€ã«ããéåžžã®HTTPãµãŒããŒãã€ããªãçšæããŸãããã¢ããã¹ããªãŒã ãšããŠNginxã®èåŸã§å®è¡ãããã ãã§ãè¿œå ã®ã¬ã€ã€ãŒãApacheãªã©ã®ã©ãããŒãªãã§åäœããŸãã
ããã¯ãããŸãããè»ãå¿ èŠã§ãããããã®ããã»ã¹ãå§ãŸããåå²ç¹ããããŸãããåé¡ã§ã¯ãããŸããã
å°çšã®ãšã³ãžã³ããããKPHPãšã³ãžã³ã«å€æããPHPã³ãŒãããããŸãã
ç§ãã¡ã®çãæ¹ïŒäººçã®äŸïŒ
- éåžžã®iniãjsonãymlãªã©ã®ãã¡ã€ã«ã§æ§æã¹ãã¬ãŒãžã䜿çšããã®ã¯èª°ã§ããïŒ
- ãããŠã誰ãã³ãŒãã®æ§æã䜿çšããŸããïŒãŸãã¯ããœãŒã¹ã³ãŒãã«ä¿åããã¬ãã«ã§ã³ãŒãã䜿çšããŸããïŒããå°ãªãã
- ãŸããèŠæ±ã«å¿ããŠçŸåšã®æ§æãéä¿¡ã§ããå€éšæ§æã¹ãã¬ãŒãžã·ã¹ãã ã䜿çšããŠããã®ã¯èª°ã§ããïŒãã£ãšã
ç§ãã¡ã®ãªãã·ã§ã³ã¯3çªç®ã®ãªãã·ã§ã³ã§ããå€éšã¹ãã¬ãŒãžã䜿çšãããšãã©ã®ããã«ãªããŸããïŒ Memcachedã«äŒŒãŠããŸããMemcachedãããã³ã«ãå«ãŸããŠããŸããããã¹ã¿ãŒãšã¹ã¬ãŒãã«åãããŠããŸãã
ãã¹ã¿ãŒã¯æžã蟌ã¿ããŒãã§ãããã¹ã¬ãŒãã¯ã³ãŒãã䜿çšãããåãµãŒããŒã§ããŒã«ã«ã«å®è¡ããããšã³ãžã³ã§ããæ§æãåãåããšãã³ãŒãã¯åžžã«ããŒã«ã«ã¬ããªã«ã«éãããããã«ã³ãŒãããããŸã-ãã¹ã¿ãŒãããã¹ãŠã®ã¹ã¬ãŒãã«é åžãããŸããåæã«ãã¹ã¬ãŒãã«ã¯ããŒã¿ã®é³è åã«å¯Ÿããä¿è·ããããŸããããŒã¿ããã§ã«å€ãå Žåãã³ãŒãã¯éå§ããããèšå®ã§éèŠãªããšãå€æŽãããå¯èœæ§ããããŸããå€ãèšå®ãè¡ããããããããªãã»ããè¯ãã§ãããã
ããã«ãããæ§æã®èªã¿åããã»ãŒç¡éã«ã¹ã±ãŒãªã³ã°ã§ããŸããã€ãŸããåãµãŒããŒã§ç¬èªã®å人æ§æãååŸããŸããåæã«ãã¯ãšãªäŒæã®é«éæ§ã¯ãåäœãããã¹ãŠã®ãã·ã³ã§æ°ç§ã®ã»ãã®äžç¬ã§ãã
次ã®ãªãã·ã§ã³ã
誰ããã®ãããªãªã¯ãšã¹ããäœãããããããšãã§ããããèšãããšãã§ããŸãïŒMemcachedãžã®å®æçãªãªã¯ãšã¹ããããã¯ãµã€ãã«å¯ŸããŠå®è¡ãããå®æ°ããŒãæã¡ãäœããã®å€æ°ã§ã¯ãªããåãããšã ãšããŸããããæ¬åœã«æªãããšãèµ·ããå¯èœæ§ã¯ãããŸããïŒãµã€ãå šäœãé 眮ããŸãã
éãè² è·ã§ãã¹ãŠã®ããããããããã1ã€ã®å¹³å¡ãªãªã¯ãšã¹ãããã¹ãŠãå£ãããšãã§ããã®ã¯ãªãã§ããïŒã·ã£ãŒãã£ã³ã°ã¢ã«ãŽãªãºã ã«é¢ä¿ãªããå®æ°ããŒã¯ããã·ã¥ã«ãã£ãŠç¡å¹ã«ãããŸãã-æåã®çªå·ãååŸããŸããäœããã®æ¹æ³ã§ãåãã¯ã©ã¹ã¿ãŒã®åãã·ã£ãŒãã«èœã¡ããªã¯ãšã¹ãã®ããªã¥ãŒã å šäœãããã«è¡ããŸãããšã³ãžã³ãæªããªãã転åããããæžéãå§ããŸããè² è·ã¯ãããã·ã«ãã£ãŠä»ã®ãã·ã³ã«åæ£ãããŸãããäžè¬ã«ãã®ã·ã£ãŒãã«ãšã£ãŠã¯æªããªãããã¥ãŒãèç©ãããããã·ã¯æªããªããŸã-ã¿ã€ã ã¢ãŠããããããã®ã·ã£ãŒãã®ãªã¯ãšã¹ããåŠçããããã®è¿œå ã®ãªãœãŒã¹ãããããããã·ã¯ãªã³ã¯ã§ããããããããã·ãæªããªãããµã€ããã¯ã©ãã·ã¥ããŸããµã€ãå šäœã®ãªã³ã¯ãããã¯é£ããã§ãããéåžžã«äžå¿«ã§ãã
ããã«ã€ããŠäœãã§ããŸããïŒ
æåã«ããã®ãããªã³ãŒããéåžžã®è§£æ±ºçãæžããªãã§ãã ããã
ãããããã®ãããªã³ãŒããæžãããšãã§ããªãããããããšãã¯ã©ãããã°ããã§ããããïŒ
ãã®ããã«ãããŒã®ã·ã£ãŒãã£ã³ã°ã䜿çšãããŸã-ããšãã°ãåºåžã®ã«ãŠã³ãã«é¢é£ãããã®ã®ããã«-ããã€ãã®ã«ãŠã³ã¿ãŒã®å¢åãèšå®ããŸããã€ã³ã¯ãªã¡ã³ãã1ã€ã®ã«ãŠã³ã¿ãŒã§ã¯ãªã1äžã®ããŒã§å¡ãã€ã¶ãããšãã§ããŸããã«ãŠã³ã¿ãŒå€ãååŸããå¿ èŠãããå Žåã¯ããã¹ãŠã®ããŒãè€æ°ååŸããŠã³ãŒããè¿œå ããã ãã§ãã Nçªç®ã®ã·ã£ãŒãã«è² è·ãåæ£ããŸããããå°ãªããšãèœã¡ãŠããŸããã
è² è·ãããã«å€§ãããããŒããã以äžã¹ã±ãŒãªã³ã°ã§ããªãå ŽåããŸãã¯æãã§ããªãå Žå-è¶ æ£ç¢ºãªå€ã¯å¿ èŠãããŸãããããšãã°ã1/10ã®ç¢ºçã§ã«ãŠã³ã¿ãã€ã³ã¯ãªã¡ã³ãããå€ãèªã¿æ»ããªãããçµæã®å€ãåã«ä¹ç®ããŸããã®ç¢ºçä¿æ°ãèšç®ããåã ã®ããããã«ãŠã³ãããå Žåã«åŸãããå€ã«è¿ãå€ãååŸããŸããç¹å®ã®å°æ°ã®è»ã«è² è·ãåæ£ããŸããã
å¥ã®ãªãã·ã§ã³-ãµã€ãã®é床ãäœäžãå§ããŸããã
äžè¬çãªMemcachedã®ã¯ã©ã¹ã¿ãŒã®è² è·ãå¢å ããŠããããšãããããŸããããã¯ããã¹ãŠãäžåã«ãã£ãã·ã¥ããã·ã£ãŒãã®éãŸãã§ãããããã©ãããŸããïŒèª°ã®ããã§ããïŒ
ãã®å Žåãäžè¬çãªã¯ã©ã¹ã¿ãŒã§å šäœã®è² è·ãå¢å€§ããŠãããããäžæã§ããæ確ã§ã¯ãããŸããããªããŒã¹ãšã³ãžãã¢ãªã³ã°ã®ã³ãããã«å¯ŸåŠããå¿ èŠããããŸããå€æŽã®å±¥æŽã確èªããŠãã ããã
ããã§äœãã§ããŸããïŒãŠãããŒãµã«ã¯ã©ã¹ã¿ãŒã¯ãç¹å®ã®å°ããªæçã«åå²ã§ããŸããç«ã®åéã®åçã欲ããã®ã§ãçžå¯Ÿçã«èšãã°ãå°ããªã¯ã©ã¹ã¿ãŒã1ã€ã«ããŠãã ãããããã ãã䜿çšããäžå€®ã®ã¯ã©ã¹ã¿ãŒã«ã¯è² è·ããããªãã§ãã ããããã®ã¯ã©ã¹ã¿ãŒã®è² è·ã倧ãããªããšãããã圌ã§ããããšãããããŸããã©ã®æ©èœãããŒããããããç¥ã£ãŠãããšåæã«ããã®ã¯ã©ã¹ã¿ãŒã®è² è·ã¯ä»ã®å šå¡ã«åœ±é¿ããŸãããã€ãŸããããšãå®å šã«ã¯ã©ã¹ã¿ãŒå šäœã«èœã¡ããšããŠããä»ã®ã¯ã©ã¹ã¿ãŒã§ã¯èª°ãæ°ä»ããªãã§ãããã
å¥ã®ãªãã·ã§ã³ã
åã®è³ªåã«ã€ããŠ-ãèœã¡ãªãã£ãããããšãã°ãããšãã°ã¡ãã»ãŒãžã®äžéšã該åœãã人ãã·ãŒã«ä»ãã®ãããªãèŠãå Žåã圌ããã®ç«ãå人ã®PMã«éããªããã°ãåé¡ãããããšããç¥ããŸããããŸããé³æ¥œã®èŽåããã¥ãŒã¹ãã£ãŒãã®èŠèŽãªã©ã«ãæåããŸããããã¯ãµã€ãã®ãã®éšåã§åäœããŸãããäœãå£ããŠãããã«äŸåããŸããã
3çªç®ã®ãªãã·ã§ã³ã
PHPãã500çªç®ã®ãšã©ãŒããããšä»®å®ããŸããã€ãŸããNginxã®ããã³ããã¢ããã¹ããªãŒã ã®KPHPãããšã©ãŒãååŸãããšããŸãããã¹ããããŠããªãæ°ããæ©èœãå±éããŸãããã©ããã
ãµã€ãå šäœãåŠçããå ±éã®KPHPã¯ã©ã¹ã¿ãŒãããå Žå-æ確ã§ã¯ãããŸããã
KPHPãã¯ã©ã¹ã¿ãŒã«åå²ããŠããå ŽåïŒAPIçšãå£çšãªã©ã«åããŠèããŠã¿ãŠãã ããããŸããããããåé¡ã§ãããšããããšãããããŸããã©ã®ã¡ãœããã°ã«ãŒããç£èŠãã誰ã責任ãè² ã£ãŠããã®ããææ¡ããŠããŸããããã«ãããã倧èŠæš¡ãªåé¡ã§ã¯ãªãããã¹ãŠãæ¬åœã«å£ããŠããã1åéãã®ã±ãŒã¹ãåäžã®é害ã§ããå ŽåãNginxã§ã¯å¥ã®KPHPãµãŒããŒã«ãªã¯ãšã¹ããå床éä¿¡ããæ©äŒããããŸããã»ãšãã©ã®å Žåãããã1åéãã®åé¡ã§ããå Žåãç¹°ãè¿ããªã¯ãšã¹ããæž¡ããããã°ããåŸ æ©ããåŸããã®äººã¯æ£ããé©åã«åŠçãããå¿çãåãåããŸãã
çµè«
åãããžã§ã¯ãã¯ãæé·ãšãšãã«äœããã®è² è·ãçµéšããŠãããçŸæç¹ã§é©åãšæããã決å®ãäžããŠããŸãã䜿çšå¯èœãªãœãªã¥ãŒã·ã§ã³ããéžæããå¿ èŠããããŸããããœãªã¥ãŒã·ã§ã³ããªãå Žåã¯ç¬èªã«å®è£ ããå¿ èŠããããŸãããããã®ãœãªã¥ãŒã·ã§ã³ãšæŠãããã«ã³ãã¥ããã£ã§äœ¿çšãããŠããæšæºçãªäžè¬çãªã¢ãããŒããè¶ ããŠãã ããããããããããžã§ã¯ãå ã§ãã¹ãŠãããŸãããã°ããã¹ãŠãååã§ããå Žåãã³ãã¥ããã£ããã®ããã€ãã®æ¢æã®ãœãªã¥ãŒã·ã§ã³ããã¹ãæžã¿ããã¹ãæžã¿ã®ã¢ã€ãã¢ã䜿çšããããšããå§ãããŸãããªãå Žåã¯ã誰ããèªåã§æ±ºå®ããŸãã
ã¬ããŒãå šäœã®ãã€ã³ãã¯ãã¬ããŒãããããžã§ã¯ãã®ãã¹ãŠã®éšåã«åºããããšã§ãã
ãããããé¡ãããŸãã
ã¬ããŒãïŒVKontakteã®äŸã«é¢ããæé·ãããžã§ã¯ãã®ã¢ãŒããã¯ãã£ã