HighLoad ++ã®æ°ãããã¬ã³ã-RAMã®äœ¿çšã«é¢ããå€ãã®ã¬ããŒãã Tarantoolãã©ãããã©ãŒã ã®éçºè ã§ãããã¬ããŒããRAMã®ããŒã¿çšDBMSã®ç¹å¥ãªç¹ãã®èè ã§ããKonstantin Osipovã«äžèšã
MySQLã®ããã©ãŒãã³ã¹ãæ åœããŠããŸããããç¬èªã®DBMSãéçºããããšã«ããã®ã¯ã©ãããŠã§ããïŒ
MySQLã§ã¯ããµãŒããŒéçºããŒã ã®1ã€ãçãã誰ããããã©ãŒãã³ã¹ãæ åœããŸããã
MySQLã¯å€ãã®ç¹ã§å€¢ã®ä»äºã§ããããæ®å¿µãªããšã«ãOracleã«åå ããŠããå€ãã®ããšãå€ãããŸããã
ååã®äœäººããMariaDBã«è¡ãã誰ããèªåã®äŒç€ŸïŒSeveralNinesãFromDualïŒãèšç«ããŸããã ç§ã¯æ±ºããŠãååã«æŽ»çšãããŠããªãããšæããããšã¯ãªããå€ãã®äž»èŠãªéçºè ã®é瀟ã«ãããä»äºã¯äžè¬çã«ç¥è移転ãã©ãœã³ã«å€ãããŸããã è²·åãžã®æµæããŒãããå§ããããšããé¡æã倧äŒæ¥ã«ããé ãææ決å®ã«å¯ŸããåæãããŸããŸãªçç±ã§ç±³åœã«åããŠåºçºããããšããããããæçµçã«ã¯Mail.Ruããã®ç³ãåºããããŸããã
èªåãã©ããžè¡ãã®ãããã£ãŠããã°ãããã«10åèããã§ãããã æã«ã¯ãMail.Ruã®å€éšã§äœ¿çšããäœãæçšãªããšãã§ãããšãã信念ããŸã£ãããªãã£ãããšããããçŸåšã§ãTarantoolã¯ãçæ³çãªDBMSãããã¯ã»ã©é ããã®ã§ãã
TarantoolãåãªãDBMSã§ã¯ãªããã©ãããã©ãŒã ã§ããã®ã¯ãªãã§ããïŒ ãã©ãããã©ãŒã ãå®è¡ããããã®ãããã¯äœã§ããïŒ
æå³ã®ããããšãããã ãã§ãã åŸæ¥ã®DBMSã®å Žåãäœæ¥ã®æé©åãåžžã«ãã£ã¹ã¯ãµãã·ã¹ãã ãåãå ŽåãRAMã®DBMSã®å Žåã¯ããããã¯ãŒã¯ãããã©ãŒãã³ã¹ã®ããã«ããã¯ã«ãªããŸãã 1 KBã®ãªã¯ãšã¹ããµã€ãºã§æ¯ç§100,000ãªã¯ãšã¹ã-ãã§ã«1 GBã«ãŒãã®åž¯åã¯100ïŒ ãã£ã±ãã§ãã ã¡ã¢ãªãæäœããå Žåã1ã€ã®Tarantulaã¯1ã³ã¢ã䜿çšããŠ100,000ãªã¯ãšã¹ãã䜿çšã§ããŸãã ãããŠãçŸä»£ã®åååæ©æ¢°ã§ã¯ãäœåãã®ããšããããŸãã ãããã£ãŠãã¢ããªã±ãŒã·ã§ã³ãµãŒããŒãäœæããŠãèšç®ãã¯ã©ã€ã¢ã³ãäžã ãã§ãªãããŒã¿ã«å¯ŸããŠãè¡ããããã«ããŸãã
2çªç®ã®èæ ®äºé ã¯ãéåžžã«å€ãã®è£œåãåçŽã«äºãã®æ©èœãè€è£œããããšã§ãã ããšãã°ãä»æ¥ã§ã¯å€ãã®äººãMemcacheã®ä»£ããã«å€§æ ¹ã䜿çšããŠããŸããããã¯åã«ãœãªã¥ãŒã·ã§ã³ã®ãåç©åããå°ããããããã§ãã å éšã®ãã¯ãããžãŒã¯ã»ãšãã©åãã§ãã ãã®ãã©ãããã©ãŒã ã䜿çšãããšãè€æ°ã®ãœãªã¥ãŒã·ã§ã³ãäžåºŠã«çœ®ãæããããšãã§ããŸããããšãã°ãæè¿ãMantcachedãã©ã°ã€ã³ãäœæããŠãTarantulaã®Memcachedãã€ããªãããã³ã«ãå®è£ ããŸããã
ããŒãã¹ãšããŠããŠãŒã¶ãŒã¯ä»ã®ãã¹ãŠã®æ©èœïŒãã¹ã¿ãŒè€è£œããã©ã°ã€ã³ã¹ãã¬ãŒãžãšã³ãžã³ãªã©ïŒãåãåããŸãã
ããŒã¿ããŒã¹ã®äžçã¯ã©ãã«åãã£ãŠããŸããïŒ NoSQLã®åŸ©æŽ»ã¯å¿ããããå€ããã®ã§ããïŒ ãªãä»ã§ããïŒ æ¬¡ã«äœãèµ·ãããŸããïŒ
ããã¯è°è«ã®ããã®å€§ããªãããã¯ã§ãããå€ãã®äžŠè¡ãããã¬ã³ããåæã«éçºãããŠããŸãã ããšãã°ããå°éåããåæã«çºçããŸã-éåžžã«é«å質ã§çãç¯å²ã®ã¿ã¹ã¯ã解決ãããããããŒã«ã衚瀺ãããäžè¬åãããŸã-ããæç¹ã§ãã³ãã¥ããã£ã¯åç©åã«é£œããŠ1ã€ã§æ¢ãŸããŸãã
äžè¬çã«ãNoSQLæ代ã¯é ããŠãããšèšãããšæããŸãã ãã¹ãŠã®NoSQLãœãªã¥ãŒã·ã§ã³ã¯SQLãè¿œå ããŸããããããã®ãã¹ãŠããŸã ãããè¡ã£ãŠããããã§ã¯ãããŸããã SQLã®æ¡åŒµæ©èœã¯ãç¹æ®ãªã¿ã€ãã®ããŒã¿ïŒã°ã©ããªã©ïŒã§æ©èœããããã«éçºãããŠããŸãã
äžæ¹ãæšæºã®å®£èšåèšèªããŸã£ãããªãéåžžã«å€§ããªã¿ã¹ã¯å±€ããŸã ãããŸããããã°ããŒã¿ãšç¥èã®æ€çŽ¢ã«é¢é£ãããã¹ãŠã®ãã®ã§ãã 次ã®10幎ã§ãç§ãã¡ã¯ãã®é¢ã§åhaveããã§ãããã
ãéãã®åŸåã®ãã¡ãä»åŸæ°å¹Žéã§ARMãã©ãããã©ãŒã ã¯éåžžã«çå£ã«éçºããããšæããŸããå°ãªããšãCavium補åãScalewayã¯ã©ãŠããã¹ãã£ã³ã°ãããã³å€ãã®ç¹ã§ARMããŒã¹ã®ããªãã©ã€ã³ãç°å¢ã®ã°ããŒãã«ãªãŒãã¡ãŒã·ã§ã³ã«æ³šç®ãã䟡å€ããããŸãã
ããžãã¹ã®åéã§ã¯ãã¯ã©ãŠããã¯ãããžãŒããŠããã¿ã¹ã«ãªãã€ã€ããããšã誰ãããã§ã«ç解ããŠããŸãã ãã³ããŒãšããŠãç§ãã¡ã«ãšã£ãŠããã¯éåžžã«éèŠã§ã-æ¶è²»è ãžã®è£œåã®ãé éãã®æ段ãå€æŽããå¿ èŠããããŸãã
ä»æ¥ãããŸããŸãªäººæ°ã®ãããã£ã¹ããªãã¥ãŒã·ã§ã³ã®ããã±ãŒãžãæäŸããå Žåãææ¥ã¯ããã«å€ãã®ã¯ã©ãŠããã©ãããã©ãŒã ããµããŒãããå¿ èŠããããŸããDockerã®ã€ã¡ãŒãžã ãã§å§ãŸããMicrosoft AzureãŸãã¯Herokuã§ã®ã¯ã³ã¯ãªãã¯ã€ã³ã¹ããŒã«ã§çµãããŸãã é²ã®ããç¶æ³ã¯ãå°èŠæš¡ãªèŸ²æ°ã倧èŠæš¡ãªã¹ãŒããŒããŒã±ããã®æ£ãå©çšã§ããç¶æ³ãšäŒŒããã®ã«ãªããªã¹ã¯ããããŸããããããŸã§ã®ãšããããã§ã¯ãããŸããã
RAMã¯ããå®äŸ¡ã§å¹ççã«ãªãã€ã€ãããããã«ãããRAMã䜿çšããŠããŸããŸãå€ãã®ã¢ããªã±ãŒã·ã§ã³ã®äœæ¥ããŒã¿ã»ãããæ ŒçŽã§ããŸãã ãã¹ãŠã®ããŒã¿ãRAMã«ä¿åãããšãã¢ã¯ã»ã¹ãããããªããããŒã¿ãæäœããã¢ã«ãŽãªãºã ãå€§å¹ ã«ç°¡çŽ åãŸãã¯é«éåã§ããŸãã
ã€ã³ã¡ã¢ãªDBMSã®ç¹å¥ãªç¹ãšããã®ãããªããã°ã©ã ã®åäœã¯ãCãC ++ãJavaã§èšè¿°ãããä»»æã®é«è² è·ã·ã¹ãã ãšã©ã®ããã«ç°ãªããŸããïŒ
ç§ã®ã¬ããŒãã§ã¯ãRAMã«ããŒã¿ãä¿åããããã®ç¹æ®ãªã¢ã«ãŽãªãºã ãšããŒã¿æ§é ã«ã€ããŠèª¬æããŸãã
-劥åã®ãªãã¡ã¢ãªå²ãåœãŠïŒãªãããã¯DBMSã§ã®ã¿å¯èœã§ãã
-ããã·ã¥ãšé£æ³é åïŒé«éã«ããã ãã§ãªãã³ã³ãã¯ãã«ããæ¹æ³
-ãããã¯ããã«åãããŒã¿ã®ç«¶åæŽæ°ãã¡ã¢ãªã«å®è£ ããã«ã¯ã©ãããã°ããã§ããïŒ
ã¡ã¢ãªå ã®DBMSã®ãããã«ããã¯ãã¯ããå€å žçãªãDBMSã®é¡äŒŒç©ãšã¯å€§ããç°ãªããããã·ã³ãã«ããšãšã¬ã¬ã³ã¹ãçãæ®ãããã«å¿ èŠãªæ¡ä»¶ã§ãã æŠãã¯ãã€ããšåœä»€ã®ããã§ãããè€éãªã³ãŒãã¯åã«å¹ççã«æ©èœããããšã¯ã§ããŸããã ã¡ã¢ãªå ã®ãã©ã³ã¶ã¯ã·ã§ã³ãåŠçããããã®ã·ã³ãã«ãªãœãªã¥ãŒã·ã§ã³ããã¬ããªã±ãŒã·ã§ã³ããã©ã³ã¶ã¯ã·ã§ã³äžæ¢äžã®ããŒã«ããã¯ãããªã¬ãŒãããŒã¿ã¹ããŒã ã®å€æŽãªã©ã®ãé«åºŠãªãæ©èœã®ãµããŒããç°¡çŽ åããã³é«éåããæ¹æ³ã説æããŸãã
Dmitry Kalugin-Balashovã¯ã ãã€ã³ã¡ã¢ãªNoSQLããŒã¿ããŒã¹ãè³¢æã«éžæããæ¹æ³ããšããã¬ããŒãã§ãããã¯ãç¶ããŠããŸãã ããã©ãŒãã³ã¹ã®ãã¹ã ã ã Dmitryã¯ãMemcachedãRedisãTarantoolãCouchBaseãªã©ã®NoSQLãœãªã¥ãŒã·ã§ã³ã®ãã¹ããå®æœãããã®ãã¹ãã®çµæãäŒè°ã§çºè¡šããŸãã
Dmitryãäœãéžãã ã®ãã¯ããããŸããããæè¯ã®éžæè¢ã®1ã€ã¯Tarantoolãã©ãããã©ãŒã ãDBMSãããã³1ã€ã®ããã«ã«å ¥ã£ãã¢ããªã±ãŒã·ã§ã³ãµãŒããŒã§ãã Mail.RuããŒã ã¯ãMailãRatingsãCloudsãªã©ã®ãããžã§ã¯ããã©ã®ããã«Tarantoolã«è»¢éããããã«ã€ããŠè©±ããŸãã
Postã®å®è£ ã«ãããäŒç€Ÿã¯100äžãã«ãç¯çŽããããšãã§ããŸãã-Postã®ãã¯ãã«ã«ãã£ã¬ã¯ã¿ãŒã§ããDenis Anikinãèªã£ãŠããŸãã
Vasily SoshnikovïŒRatings@Mail.ruïŒãšAndrey DrozdovïŒTarantoolïŒã¯ãNginxãšTarantoolã«åºã¥ããµãŒãã¹ã®æ§ç¯ãªã©ã®ã¢ãŒããã¯ãã£ãã¿ãŒã³ã«ã€ããŠèª¬æããŸãã ãã¿ãŒã³ã®ããžãã¯ã段éçã«èª¬æãããã¬ãŒãã³ã°ã¬ããŒãã ãšããã§ãTarantoolã«ã¯Nginxçšã®ã¢ããã¹ããªãŒã ã¢ãžã¥ãŒã«ããããŸãã
Anton ReznikovãšVladimir PerepelitsaïŒCloud@Mail.ruïŒã¯ãTarantooläžã§ã®ãã€ã¯ããµãŒãã¹ã®æŠå¿µã®å®è£ ã«ã€ããŠèª¬æããŸãã ã¯ããTarantoolã¯å¥ã®NoSQLããŒã¿ããŒã¹ã§ãããå®å šãªã¢ããªã±ãŒã·ã§ã³ãµãŒããŒã§ããããŸãã ããŒã¿ã®é£ã«ããã¢ããªã±ãŒã·ã§ã³ïŒ
-ããããããããïŒ Tarantoolã¯ç§ãã¡ã«ã¯å€ãããŸããNoSQLããäœãä»ã®ãã®ã¯ãããŸããïŒ -ããªãã¯ç§ãã¡ã«å°ããŸãã
ã¯ãããããŸãã Vladimir Akritskyã«ããã¬ããŒããHighLoadãããžã§ã¯ãã®NodeJSã ã
éå»1幎éãNodeJSã䜿çšããŠãããã¿ã€ãã³ã°ãè¡ãDMPïŒããŒã¿ç®¡çãã©ãããã©ãŒã ïŒãããžã§ã¯ããéçºããŠããŸããã çŸæç¹ã§ã¯ããããžã§ã¯ãã®å€§éšåã¯ãŸã JSäžã«ããã1ç§ããã10,000件ã®ãªã¯ãšã¹ããšããçŸåšã®è² è·ã«ç°¡åã«å¯ŸåŠã§ããŸãã
ã¬ããŒãã§ã¯ã.NETãGoãNodeJSãPythonãRubyã®ãããããéžæããŸããããNodeJSãéžæããçç±ã説æããŸãã éžæãåŸæããã«ãäžéšã®ãããžã§ã¯ãã§åŒãç¶ã䜿çšããŸãã
é¢çœãïŒ
HighLoad ++ã«æ¥ãŠãäŒè°ãŸã§ããš1é±é足ããã§ãïŒ
æåŸã« ãHabrahabrãŠãŒã¶ãŒã®å Žåãã«ã³ãã¡ã¬ã³ã¹ã§ã¯15ïŒ ã®ç¹å¥å²åŒãæäŸãããŸãããã±ããã®äºçŽæã«IAmHabrã³ãŒãã䜿çšããã ãã§ãã
ãããŠæåŸã« ã äŒè°ã¯ãã§ã«æ¥é±ã§ãããç§ãã¡ã¯ããŸãé »ç¹ã«æžããªãã§ããã-ç§ãã¡ã¯å¯ãŠãªã©ãã¯ã¹ããŸãã ãããããã®åŸãæ»ã£ãŠããŸããHabréã®ããã°ãšç¡æã®ãã¥ãŒã¹ã¬ã¿ãŒã§æ°ããåºçç©ãèŠã€ããããšãã§ããŸãã ãã€ã§ãé£çµ¡ãåãåãããšãã§ããŸãïŒ