ãããèªã¿åãããŒãã®ã¿ã§ãããšä»®å®ãããšãåé¡ã¯ã¬ããªã±ãŒã·ã§ã³ã«ãã£ãŠè§£æ±ºãããŸãã å¿ èŠãªæ°ã®ã¬ããªã«ãããŒã¿ããŒã¹ã«é 眮ããã¬ããªã«ã®ãã¹ãŠã®èªã¿åããšãã¹ã¿ãŒã®ãã¹ãŠã®ã¬ã³ãŒããéå§ã§ããŸãã ããŒã¿ããŒã¹ã«æžã蟌ã¿è² è·ãããå Žåããã¹ãŠã®ã¬ããªã«ã§èšé²ãå®è¡ããå¿ èŠããããããã¬ããªã±ãŒã·ã§ã³ã¯ãã®åé¡ã解決ããŸããã ãããã£ãŠãã©ãã ãé 眮ããŠãã1å°ã®ãã·ã³ãããã®èšé²ã®è² è·ã¯è»œæžãããŸããã ããã§ãã·ã£ãŒãã£ã³ã°ãå©ãã«ãªããŸãã
ããŒã¿ããŒã¹ãã¬ã³ãŒãã®è² è·ãä¿æããŠããªãå Žåãã·ã£ãŒããç¡éã«è¿œå ã§ããŸãã ã·ã£ãŒãã¯ã¬ããªã«ãããè€éã§ããããã¯ãããŒãã«éãŸãã¯ããŒãã«å ã§ãããã·ã¥ãç¯å²ããšã«äœããã®æ¹æ³ã§ããŒã¿ãåæ£ããå¿ èŠãããããã§ã-å€ãã®ç°ãªããªãã·ã§ã³ããããŸãã ãããã£ãŠãã¬ããªã«ãšã·ã£ãŒããè¿œå ãããšãããŒã¿ããŒã¹ã®è² è·ãå ±æã§ããŸãã æãããšã¯ãã以äžãªãããã«æãããŸãã
ããããåé¡ããããŸã
...ããã¯ãã¯ãæè¡ã®é¢ã«ãããŸããã å¢ãç¶ãããµãŒããŒã®çŸ€ããèŠãŠããããªãã®äžåžã¯ãå€ãã®ãéããããã®ã§inãå§ããŸãã è² è·ãå¢å€§ãããŠãŒã¶ãŒããã®ãªã¯ãšã¹ãã®æ°ãå¢å€§ããŠããããããµãŒããŒãè¿œå ããã³è¿œå ããŸãã ããªãã¯æè¡è ã§ãããéã«ã€ããŠã¯èããªãã§ãã ãã-æè³å®¶ã«ããããããŠãã ããã ãããŠãäžåžã«æ¬¡ã®ããã«äŒããŸãã ç¡éã«ã¹ã±ãŒã©ãã«ãªã·ã¹ãã ããããŸãã ãµãŒããŒãè¿œå ããŠããŸããããã¹ãŠãæ£åžžã«æ©èœããŸããã ãããŠäžåžã¯æ¬¡ã®ããã«çããŠããŸãã ããã§äœãããå¿ èŠããããŸãã ãããŠãåé¡ã解決ããªãå Žåãããžãã¹å šäœãééããå¿ èŠããããŸãã ãªããªããããžãã¹ã®æé·ã«ãããããããç§ãã¡ã¯ããŒã¿ããŒã¹ãšãµãŒããŒã§ããéãé床ã§æé·ããŠããããã§ããã ãããŠããã®åé¡ã解決ããã®ã¯æè³å®¶ã§ã¯ãªãããªã次第ã§ãããªããªããããã¯ããããæè¡é¢ã«ããããã§ãã 次ã«äœãããïŒ Amazonã¯ã¯ããã«é«äŸ¡ã§ãã æé©åïŒ ãã¹ãŠã®ã¯ãšãªã¯ãã§ã«æé©åãããŠããŸãã
解決çã¯ãå€ãã®å ŽåéžæãããããŒã¿ããã£ãã·ã¥ããããšã§ãã å€æ°ã®ã¬ããªã«ãã·ã£ãŒãã«é Œããã«ããã£ãã·ã¥ã«ä¿åããŠããããç¶ç¶çã«æ»ãããšãã§ããŸãã
ãã£ãã·ã¥ã®åé¡
ããŠãåé¡ã¯è§£æ±ºãããŸããã1ã€ã®memcachedããã¬ããªã«ãµãŒããŒã®ã©ãã¯å šäœã«çœ®ãæããããŸãã ããããããªãã¯ãã¹ãŠã«ãéãæããªããã°ãªããŸããã
- ã¢ããªã±ãŒã·ã§ã³ã¯ããã£ãã·ã¥ãšããŒã¿ããŒã¹ã®äž¡æ¹ã«æžã蟌ã¿ãŸããããããã¯çžäºã«è€è£œãããŸããã ãããã£ãŠãããŒã¿ã®äžæŽåãçºçããŸãã ããšãã°ãæåã«ãã£ãã·ã¥ã«æžã蟌ã¿ã次ã«ããŒã¿ããŒã¹ã«æžã蟌ã¿ãŸãã äœããã®çç±ã§ãããŒã¿ããŒã¹ãžã®æžã蟌ã¿ãæ©èœããŸããã§ãããã¢ããªã±ãŒã·ã§ã³ãã¯ã©ãã·ã¥ãããããã¯ãŒã¯ãç¹æ»
ããŸããã ãã®åŸãã¢ããªã±ãŒã·ã§ã³ã¯ãŠãŒã¶ãŒã«ãšã©ãŒãè¿ããŸããããä»ã®ããŒã¿ã¯ãã§ã«ãã£ãã·ã¥ã«ãããŸãã ã€ãŸãããã£ãã·ã¥ã«ã¯ããã€ãã®ããŒã¿ããããããŒã¿ããŒã¹ã«ã¯ä»ã®ããŒã¿ããããŸãã ããã«ã€ããŠã¯èª°ãç¥ããªãã®ã§ãã¢ããªã±ãŒã·ã§ã³ã¯åŒãç¶ããã£ãã·ã¥ãæäœããŸãã ãŸããåèµ·åãããšãå¥ã®ã³ããŒãããŒã¿ããŒã¹ã«ãããããããŒã¿ã倱ãããŸãã
é¢çœãããšã¯ãéã®é åºã§æžããšåãããšãèµ·ãããšããããšã§ãã ããŒã¿ããŒã¹ã«èšé²ããŸãããããã£ãã·ã¥ãžã®æžã蟌ã¿ã«å€±æããŸããã ãã£ãã·ã¥ã®å€ãããŒã¿ãåŠçããŸããããŒã¿ããŒã¹ã«ã¯æ°ããããŒã¿ããããŸããã誰ããããç¥ããŸããã ãã£ãã·ã¥ããªããŒãããŸãã-ããŒã¿ã¯åã³å€±ãããŸãã ã€ãŸããã©ã¡ãã®å ŽåããæŽæ°ã¯å€±ãããŸãã ããã¯ãããŒã¿ããŒã¹ã®ç¹å®ã®ããããã£ãã€ãŸãèšé²ãããããŒã¿ãããŒã¿ããŒã¹ã«æ°žä¹ ã«ä¿åãããããšãã€ãŸãã³ããããã³ããããããªããªããšããä¿èšŒã倱ãããšãæå³ããŸãã ã¢ããªã±ãŒã·ã§ã³ãããã ãã§åäœããããã«ã¹ããŒããã£ãã·ã¥ãèšè¿°ããããšã«ãããããŒã¿ã®äžäžèŽã«å¯ŸåŠã§ããŸãã ã¢ããªã±ãŒã·ã§ã³ãããŒã¿ããŒã¹ã§åäœããªãå Žåã®ã¿ãã©ã€ãã¹ã«ãŒã§ããŸãã ãŸãããã£ãã·ã¥ã¯åä¿¡ããããŒã¿ãããŒã¿ããŒã¹ã«æžã蟌ã¿ã次ã«ããèªäœã«æžã蟌ãå¿ èŠããããŸãã äœããã®çç±ã§ããŒã¿ãããŒã¿ããŒã¹ã«æžã蟌ãŸããªãã£ãå Žåã¯ããã£ãã·ã¥ã«ãæžã蟌ãŸãªãã§ãã ããã ããã«ãããããŒã¿ã¯åžžã«åæãããŸãã ãã£ãã·ã¥ã¯ã¡ã¢ãªã§ãããã¡ã¢ãªãç Žæããå Žåãé€ããã¡ã¢ãªãžã®æžã蟌ã¿ã¯åžžã«ééãããããããŒã¿ã¯ãã£ãã·ã¥ã«æžã蟌ãå¿ èŠããããŸããããã®å Žåãã¹ããŒããã£ãã·ã¥ã¯ããã©ãŒã«ããããã£ãã·ã¥ããããã¹ãŠã®ããŒã¿ãå¿åŽã«é¥ããŸãããã ããããŒã¿ãåæããªããªãããšã¯ãããŸããã
ãã ããããŒã¿ãåæããªããšãããŸããªã±ãŒã¹ã1ã€æ®ã£ãŠããŸããã¢ããªã±ãŒã·ã§ã³ããã£ãã·ã¥ã«æžã蟌ã¿ããã£ãã·ã¥ãããŒã¿ããŒã¹ã«æžã蟌ã¿ãããŒã¿ããŒã¹èªäœãã³ããããããŸãã ããã«ãæäœãæ£åžžã«å®äºããããšããã£ãã·ã¥ã«ç¢ºèªããŸãããçŸæç¹ã§ã¯ãããã¯ãŒã¯ãåæããããã£ãã·ã¥ã¯ãã®ç¢ºèªãåãåããŸããã 圌ã¯ãããŒã¿ãããŒã¿ããŒã¹ã«æžã蟌ãŸããŠããªããšèããŠãããèªå® ã§ã¯é©çšããŸããã ããããããŒã¿ããŒã¹ã§ã¯ãããã¯ãŸã é©çšãããŸãã ã¢ããªã±ãŒã·ã§ã³ã¯å€ãããŒã¿ã§åäœãããã®åŸãã£ãã·ã¥ããªããŒããããŸã-ããŒã¿ã¯åã³ç°ãªããŸãã ããã¯éåžžã«ãŸããªã±ãŒã¹ã§ãããå¯èœã§ãã
ãããŠæãéèŠãªããš-ã¹ããŒããã£ãã·ã¥ã¯ã·ã£ãŒãã£ã³ã°ã®åé¡ã解決ããŸããã ãŸããäžåžã¯ã·ã£ãŒãã£ã³ã°ã奜ãã§ã¯ãããŸããããªããªããéåžžã«é«äŸ¡ã ããã§ããå€ãã®ãµãŒããŒãè³Œå ¥ããå¿ èŠãããããã§ãã - ãšãããããã£ãã·ã¥ã®å®è£ ã¯ãèšé²ãå éãããªããããã·ã£ãŒãã£ã³ã°ããç§ãã¡ãæããŸããã åã³ãããã¯ããã£ãã·ã¥ã§ã¯ãªããã©ããã§ã³ãããããå¿ èŠããããŸãã
- 次ã®åé¡ïŒãã£ãã·ã¥ã¯ããŒã¿ããŒã¹ã§ã¯ãªããéåžžã®ããŒ/å€ã¹ãã¬ãŒãžã§ãã ãªã¯ãšã¹ããšãã©ã³ã¶ã¯ã·ã§ã³ã¯å€±ãããŸãã ã€ã³ããã¯ã¹ãšããŒãã«ã倱ãããŸãããããŒãšå€ã®ãã£ãã·ã¥ã®äžã«ååã®çœªã§æ§ç¯ã§ããŸãã ãããã£ãŠãã¢ããªã±ãŒã·ã§ã³ãç°¡çŽ åããæ ¹æ¬çã«ããçŽãå¿ èŠããããŸãã
- 4çªç®ã®åé¡ã¯ã³ãŒã«ãã¹ã¿ãŒãã§ãã ãã£ãã·ã¥ãäžæãããšã空ã«ãªããããŒã¿ããªããªããŸãã ããã«ããã¹ãŠã®éžæã¯ããŒã¿ããŒã¹ã«çŽæ¥ç§»åãããã£ãã·ã¥ãééããŸããããã¯ãŸã äœããªãããã§ãã ãããã£ãŠãå°ãªããšãå®å šã§ã¯ãªããã¬ããªã«ãå床远å ããå¿ èŠããããŸãã ãã£ãã·ã¥ãäœããã®æ¹æ³ã§ãŠã©ãŒã ã¢ããããå¿ èŠããããŸãã ãããŠããŠã©ãŒã ã¢ãããããšãå€ãã®éžæãããŒã¹ã«è¡ããŸãã ãããã£ãŠããã£ãã·ã¥ããŠã©ãŒã ã¢ããããããã ãã«å€æ°ã®ã¬ããªã«ãä¿æããå¿ èŠããããŸãã ããã¯ååã«ç¡é§ã«èŠããŸãããïŒ ãã ãããããã®ã¬ããªã«ããªããšãæ£åžžã«èµ·åã§ããŸããã ãã®åé¡ã®è§£æ±ºçããã詳现ã«æ€èšããŠã¿ãŸãããã
ã³ãŒã«ãã¹ã¿ãŒã
åœæã次ã®ã¢ã€ãã¢ãçãŸããŸãããããŒã¿ã¯åžžã«ãæãããããå·ãããå¿ èŠã¯ãªããšããããšã§ãã ãããè¡ãã«ã¯ããã£ãã·ã¥ãæ°žç¶åããå¿ èŠããããŸããã€ãŸããããŒã¿ããã£ã¹ã¯ã®ã©ããã«ä¿åããå¿ èŠããããŸããããããã°ããã¹ãŠãæ£åžžã«ãªããŸãã ãã£ãã·ã¥ãéå§ãããããŒã¿ãããŒããããŸãã ããããçãããããŸããããã£ãã·ã¥ã¯RAMã§ãããé«éã§ããå¿ èŠããããŸãããŸãããã£ã¹ã¯ãã«ããã«ã§ãã£ãã·ã¥ã«äžãããããšãããŒã¿ããŒã¹ã»ã©é ããªããŸãããïŒ å®éãããã§ã¯ãããŸããã
æãç°¡åãªæ¹æ³ã¯ãNåããšã«ãã£ãã·ã¥ããä¿æããããã£ã¹ã¯ã«å®å šã«ãã³ãããããšã§ãã ãã®ãã³ãã¯ãããã¯ã°ã©ãŠã³ãã§éåæçã«å®è¡ã§ããŸãã æäœãé ãããããããã»ããµãŒãããŒããããããŸããã ããã«ããããŠã©ãŒã ã¢ãããäœåºŠãé«éåã§ããŸãããã£ãã·ã¥ãäžæãããšãæ¢ã«ç¬èªã®ããŒã¿ãã³ããæå ã«ãããããããç·åœ¢ãã€éåžžã«è¿ éã«èªã¿åããŸãã ããã¯ãä»»æã®æ°ã®ããŒã¿ããŒã¹ã¬ããªã«ã䜿çšããå Žåãããé«éã§ãã ããããããç°¡åã§ã¯ãããŸããããïŒ 5åããšã«ãã³ããããšããŸãã ãŸããã®ã£ããã«é害ãããå Žåãåã®ãã³ãã®æç¹ããèç©ãããå€æŽã¯å€±ãããŸãã äžéšã®ã¢ããªã±ãŒã·ã§ã³ã§ã¯ãããã¯çµ±èšãªã©ã§ã¯éèŠã§ã¯ãããŸããããäžéšã®ã¢ããªã±ãŒã·ã§ã³ã§ã¯éèŠã§ãã
2çªç®ã®åé¡ã¯ããã£ã¹ã¯ãé©åã«ããŒãããããšã§ããããã¯ããã°ãªã©ã®ä»ã®äœãã«å¿ èŠã«ãªãå ŽåããããŸãã ãã³ãäžããã£ã¹ã¯ã®é床ãäœäžãããããç¡éã«çºçããŸãã ããã¯ãéåžžã®ãã³ããã³ãã®ä»£ããã«ãã°ãä¿æããã°åé¿ã§ããŸãã åé¡ã¯ããã«çºçããã¯ãã§ãããã©ãããŠïŒ ãã£ãã·ã¥ã§ãããé«éã§ããããã¹ãŠãããã«èšé²ããŠããŸããã ããã¯å®éã«ã¯åé¡ã§ã¯ãããŸããã éåžžã®ããŒããã©ã€ãã§ãã¡ã€ã«ã«ãã°ãé çªã«æžã蟌ãå Žåãæžã蟌ã¿é床ã¯100 Mb / sã«éããŸãã 100ãã€ãã®å¹³åãã©ã³ã¶ã¯ã·ã§ã³ãµã€ãºã1ç§ããã100äžãã©ã³ã¶ã¯ã·ã§ã³ã§ãããšããŸãã æããã«ããã£ãã·ã¥ã®ãã°ãèšé²ãããšãã«ãã£ã¹ã¯ã®ããã©ãŒãã³ã¹ãäœäžããããšã¯ãããŸããã ããã«ãããIOPSã®åé¡ã解決ãããŸãããã¹ãŠã®ããŒã¿ãæ°žç¶çã«ãªãããã«ãå¿ èŠãªã ããã£ã¹ã¯ãããŒãããŸãã ããŒã¿ã¯åžžã«ææ°ã§ããã倱ãããããšã¯ãããŸãããããŠã©ãŒã ã¢ããã¯é«éã§ãã
ãããããžã£ãŒããªã³ã°ã«ã¯æ¬ ç¹ããããŸãã ãã°ãç¶æããå Žåãåãã¢ã€ãã ãæŽæ°ããæŽæ°ã¯1ã€ã®ã¬ã³ãŒãã«ã°ã«ãŒãåãããŸããã ãããã¯å€ãããããã£ãã·ã¥ãéå§ãããšãã¯ãããããã¹ãŠã®ã¬ã³ãŒãããåçãããå¿ èŠããããŸããããã¯ããã³ãããéå§ãããããæéããããå ŽåããããŸãã ããã«ããã°èªäœã¯å€ãã®ã¹ããŒã¹ãå æãããã£ã¹ã¯ã«åãŸããªãå ŽåããããŸãã
åé¡ã解決ããã«ã¯ããã³ããã³ããšãã®ã³ã°ã®äž¡æ¹ã®ã¢ãããŒããçµã¿åãããããšãã§ããŸãã ã©ãããŠïŒ ãã³ããã€ãŸãã1æ¥ã«1åã¹ãããã·ã§ãããäœæããåæã«åžžã«ãã°ã«æžã蟌ãããšãã§ããŸãã ã¹ãããã·ã§ããã§ã¯ãæåŸã®å€æŽã®IDãä¿åããŸãã ãã£ãã·ã¥ãéå§ããå¿ èŠãããå Žåãã¹ãããã·ã§ãããèªã¿åããããã«ã¡ã¢ãªã«é©çšããã¹ãããã·ã§ããã®æåŸã®å€æŽãããã°ãèªã¿åããã¹ãããã·ã§ããã®äžã«é©çšããŸãã ããã ãã§ãããã£ãã·ã¥ã¯æããã§ãã ããã¯ããã³ãããèªã¿åãã®ãšåãéãã§å®è¡ãããŸãã ããã§ãã³ãŒã«ãã¹ã¿ãŒãã§ããªã¹ãã®æ®ãã®åé¡ã解決ããŸãããã
æ®ãã®3ã€ã®åé¡
ããŒã¿ããŒã¹ã«ã¯ããã©ã³ã¶ã¯ã·ã§ã³ãéããŠæäŸãããæ°žç¶æ§ãªã©ã®ããããã£ããããŸãã éåžžãããŒã¿ããŒã¹ã«ã¯ãããããŒã¿ãšã³ãŒã«ãããŒã¿ãæ ŒçŽãããŸãã å°ãªããšããã£ãã·ã¥ã«å°éãããšãããŒã¿ã¯ç¢ºå®ã«ããããšã³ãŒã«ãã«åå²ãããŸãã éåžžãå€ãã®ã³ãŒã«ãããŒã¿ãããããããããŒã¿ã¯ã»ãšãã©ãããŸããã ããã人çã®é 眮ã§ãã ãããããŒã¿ãæäŸããããã ãã«ãå€æ°ã®ã³ããŒãšã·ã£ãŒãã䜿çšããŠããŒã¿ããŒã¹ãè€è£œããã³ã·ã£ãŒãã£ã³ã°ããŸãã ç§ãã¡ã¯èªåèªèº«ã«èšãããšãã§ããŸãïŒããªãç§ãã¡ã¯ããããã¹ãŠã³ããŒããã®ã§ããïŒ ãããããŒã¿ã®ã¿ãã·ã£ãŒãããŸããããã ãã ãããŸã£ããåãæ°ã®ãµãŒããŒã䜿çšããå¿ èŠããããããããã¯äœã®åœ¹ã«ãç«ã¡ãŸããããªããªããããŒã¿ãã¡ã¢ãªãŸãã¯ãã£ã¹ã¯ã«åãŸããªãããã§ã¯ãªããCPUã«ééããããã§ãã ã€ãŸããããŒã¿ããŒã¹ã«ã¯åŠçããæéããããŸããã ãããã£ãŠããããããŒã¿ã®ã·ã£ãŒãã£ã³ã°ãšã¬ããªã±ãŒã·ã§ã³ã ãã§ã¯ããã®åé¡ã解決ã§ããŸããã ãããŠãããªãã¯ãã¹ãŠã®æ°ãããµãŒããŒã«ãéãæããªããã°ãªããªãã®ã§ããã¹ã¯ãŸã æã£ãŠããŸãã
äœãã§ããŸããïŒ ãã£ãã·ã¥ã¯ãããŸãããããŒã¿ããŒã¹å ã®ãããããŒã¿ã§ã¯å¹³åã«çããããšãã§ãããã¬ããªã«ãšã·ã£ãŒããé ä¿¡ããŸãã ãã ããããŒã¿ããŒã¹ãšåæ§ã«ããã£ãã·ã¥ã«ãããŒã¿ãæ ŒçŽãããŸãã å¿ èŠã«å¿ããŠãè€è£œãäœæã§ããŸãã ãã£ãã·ã¥ããã©ã€ããªããŒã¿ãœãŒã¹ãšããŠäœ¿çšã§ããªãçç±ã¯äœã§ããïŒ ãã©ã³ã¶ã¯ã·ã§ã³ã®ãããªæ©èœã®æ¬ åŠïŒ ååŒãã§ããŸãã ãããã£ãŠãæ®ãã®3ã€ã®åé¡ã解決ããŸããããã¯ããããããŒã¿ãããŒã¿ããŒã¹ã«ãŸã£ããä¿åã§ããããã£ãã·ã¥ã«ã®ã¿ä¿åã§ããããã§ãã ããŒã¿ããŒã¹ãå€ãã®ãµãŒããŒã«åå²ããå¿ èŠããªãããããã£ãã·ã¥ã¯æžã蟌ã¿ãå«ãè² è·ã«ããŸã察åŠãããããã·ã£ãŒãã£ã³ã°ãäžèŠã«ãªããŸãã ãã£ãã·ã¥ã¯ãžã£ãŒãã«ãªãã§æžã蟌ãã®ãšåãéãã§ãžã£ãŒãã«ã«æžã蟌ãããã圌ã¯ãªããšãæžããŸãã
ãã®ããããã£ãã·ã¥ã«ã¯ãããŒã¿ããŒã¹ã«åºæã®ãã¹ãŠã®ããããã£ãåã蟌ãããšãã§ããŸãã ç§ãã¡ã¯ããããŸããããããŠçµæãšããŠçãŸããåäŸã¯TarantoolãšåŒã°ããŸãã ã èªã¿åãããã³æžã蟌ã¿é床ã®ç¹ã§ã¯ããã£ãã·ã¥ã«å¹æµããŸãããå¿ èŠãªãã¹ãŠã®ããŒã¿ããŒã¹ããããã£ãåããŠããŸãã ãããã£ãŠããããããŒã¿ãä¿åããããã®ããŒã¹ãæŸæ£ã§ããŸãã ãã¹ãŠã®åé¡ã解決ãããŸããã
Tarantoolã®æ©èœãšæ©èœ
ãããã£ãŠãå°ããªãããããŒã¿ãåŠçããããã«ã®ã¿ããããã®å€æ°ã®ã³ãŒã«ãããŒã¿ãè€è£œããã³åå²ããŸããã ããã§ããã£ãã«èŠæ±ããã³å€æŽãããªãã³ãŒã«ãããŒã¿ãSQLã«æ ŒçŽããããããããŒã¿ãTarantoolã«éä¿¡ãããŸãã ã€ãŸããTarantoolã¯ãããããŒã¿ã®ããŒã¹ã§ãã ãã®çµæãã»ãšãã©ã®ã¿ã¹ã¯ã§ã¯2ã€ã®ã€ã³ã¹ã¿ã³ã¹ïŒãã¹ã¿ãŒãšã¬ããªã«ïŒã§ååã§ãã 1ã€ã§ãåé¡ãããŸããããããŒã¿ããŒã¹ã§ããã«ããããããããããšRPSãžã®ã¢ã¯ã»ã¹ã®ãã¿ãŒã³ã¯éåžžã®ãã£ãã·ã¥ã®ãã¿ãŒã³ãšåãã§ããããã§ãã äžéšã®äººã«ãšã£ãŠãããã¯å¿ççãªåé¡ã§ãããã©ã³ã¶ã¯ã·ã§ã³ã«å¯Ÿå¿ããå± å¿å°ã®è¯ãèä¹ æ§ã®ããããŒã¿ã¹ãã¬ãŒãžã®ä¿¡é Œã§ãããœãŒã¹ãšããŠããŒã¿ããŒã¹ãæŸæ£ãããã£ãã·ã¥ã«ç§»åããã«ã¯ã©ãããã°ããã§ããããã å®éãmemcachedãŸãã¯ãã®ä»ã®ãã£ãã·ã¥ã®äœ¿çšãéå§ããæç¹ã§ãããŒã¿ããŒã¹ã®å©ç¹ã¯ãã§ã«æŸæ£ãããŠããŸãã äžè²«æ§ã®æ¬ åŠãšæŽæ°ã®æ倱ãèããŠãã ããã ãããŠããã®èŠ³ç¹ãããTarantoolã¯äœæ¥ãé«éåããŠãéãç¯çŽã§ããã ãã§ãªãããã©ã³ã¶ã¯ã·ã§ã³ãã¯ãšãªãã€ã³ããã¯ã¹ãªã©ãåããããŒã¿ããŒã¹ã®äžçã«ããªããé£ãæ»ããŸãã
ãã©ã³ã¶ã¯ã·ã§ã³ã®äžŠåæäœã«é¢ããããã€ãã®èšèã LuaãTarantoolã§äœ¿çšããå Žåãããã¯åäžã®ãã©ã³ã¶ã¯ã·ã§ã³ãšèŠãªãããŸãããã¹ãŠã®èªã¿åããã¡ã¢ãªããèªã¿åãããã¹ãŠã®æžã蟌ã¿ãäžæãããã¡ãŒã«è»¢éããæåŸã«ãã£ã¹ã¯ã«æžã蟌ã¿ãŸãã ãŸããããŒã¿ã®æžã蟌ã¿äžã«ãå¥ã®ãã©ã³ã¶ã¯ã·ã§ã³ãããã¯ãªãã§ã¡ã¢ãªããå€ãã³ããããããŠããªãããŒã¿ãæ¢ã«èªã¿åãããšãã§ããŸãïŒ ãã©ã³ã¶ã¯ã·ã§ã³ã®ãã¥ãŒã¯ããã£ã¹ã¯ãžã®é 次æžã蟌ã¿ã®ã¹ã«ãŒããããè¶ ããå Žåã«ã®ã¿çºçããŸãã
æãããå¯ããžã®ç§»è¡æ¹æ³
ãã®ããã»ã¹ã¯ãŸã èªååãããŠããŸããã ãã°ãåæãããã®ãããªãã¿ãŒã³ã®ããŒã¿ã¯ããããšã¿ãªãããšãã§ãããšå€æããŸãã ããšãã°ããŠãŒã¶ãŒãããã¡ã€ã«ã¯ãããã§ããã€ãŸãããŠãŒã¶ãŒãããã¡ã€ã«ãTarantoolã«è»¢éããŠããŸãã ããšãã°ãäžéšã®ãŠãŒã¶ãŒã¯ãã¯ãéµäŸ¿å±ã«è¡ããªããããå·ãããã®ããã£ããããããšã¯æããã§ãã ããããéå°ãªæ¯åºã«ãããããããããã¯MySQLã䜿çšãããããå¹ççã§ãã Tarantoolã®ã¡ã¢ãªãããããªã³ããéåžžã«æé©åãããŠããããã ãã«ã éåžžã«èå³æ·±ãäºå®ïŒSQLããŒã¿ããŒã¹ã¯ãã¹ãŠããã£ã¹ã¯ã«ä¿åããŸããã10ã20ïŒ ãã¡ã¢ãªã«ãã£ãã·ã¥ããå¿ èŠããããŸãã ãããåæã«ãåŸæ¥ã®SQLãããããªã³ãããŒã¿ããŒã¹ã¯Tarantoolããã3ã5åæªãããããããã®20ïŒ ã¯100ïŒ ã«å€ãããŸãã åæ§ã®è² è·ã§ã¯ãSQLãµãŒããŒã¯ãã®è² è·ãä¿æããŸããããã¡ã¢ãªã§åã€ããšãããããŸããã
ã¿ã©ã³ããŒã«vsã¬ãã£ã¹
ç§ãã¡ã®èŠ³ç¹ããèŠããšãTarantoolãšRedisã«ã¯2ã€ã®éèŠãªéãããããŸãã
- ãã¹ãã«ãããšãTarantoolã¯ããŒã»ã³ããã30ïŒ é«éã§ãã ãã¹ãçµæã¯ãTarantool Webãµã€ãããã³ãã®èšäºã«èšèŒãããŠããŸã ã
- Tarantoolã¯ããŒã¿ããŒã¹ã§ãã ããã§ãLuaã§ãµãŒããŒåŽã¹ã¯ãªãããäœæã§ããŸãã Redisã«ãLuaããããŸãããã·ã³ã°ã«ã¹ã¬ããã®ããããã³ã°ã§ãããç¬èªã®ã¹ã¯ãªãããäœæã§ããŸããããã®ã¹ã³ãŒãã¯éåžžã«éãããŠããŸãã ããã«ãRedisã®Luaã¯ãã©ã³ã¶ã¯ã·ã§ã³ã§ã¯ãããŸããã ãã®æå³ã§ãTarantoolã¯å®ç§ã§ãã ããé«éã§ãå¿ èŠãªå Žæã§ãã©ã³ã¶ã¯ã·ã§ã³ã䜿çšã§ããŸãã ãã£ãã·ã¥ããããŒãååŸããæŽæ°ããŠã䞊è¡ããŠä»ã®èª°ããå€æŽã§ããå Žåã«æ»ãå¿ èŠã¯ãããŸããã
100äžãã«
ãã®éé¡ã¯é åçãªèŠåºãã®çºæã§ã¯ãããŸããããMail.Ru Groupãããžã§ã¯ãã®1ã€ã§ç¯çŽããããéã§ãã ãŠãŒã¶ãŒãããã¡ã€ã«ãã©ããã«ä¿åããå¿ èŠããããŸããã ãã以åã¯ã圌ãã¯å€ãå庫ã«ããŠãç§ãã¡ã¯ããããã©ãã«ç§»ãããèããŠããŸããã ç§ãã¡ã¯ããšããšMySQLãèŠãŸããã 16åã®MySQLã¬ããªã«ãšã·ã£ãŒãããããã€ãããããã®èªã¿èŸŒã¿ããã³æžã蟌ã¿ãããã¡ã€ã«ããã®è² è·ãåŸã ã«è€è£œãå§ããŸããã ãããã¡ã€ã«ãšã¯ãåããŒãžã§éåžžå¿ èŠãªååãéä¿¡ãããæåæ°ãããŸããŸãªãã©ã°ããã³ãµãŒãã¹ããŒã¿ãæ ŒçŽããå°ããªæ å ±ïŒ500ãã€ããããããã€ãïŒã§ãã ãã®ããŒã¿ã¯ãå€ãã®å ŽåãèŠæ±ããã³æŽæ°ãããŸãã è² è·ã®1/8ã§ã16åã®MySQLã®ãã¡ãŒã ãå£ããŸããã ãããŠãããã¯ããã§è¡ã£ããã¹ãŠã®æé©åã®åŸã§ãã ãã®åŸãã¿ã©ã³ããŒã«ãè©Šãããšã«ããŸããã 圌ã¯ä»¥åã¯128å°ã®ãµãŒããŒã«åæ£ããŠãã4å°ã®ãµãŒããŒã«å·éã«è² è·ããããŠããŸããã å®éã1å°ã®ãµãŒããŒãç¶æããŠããŠããå®å šã®ããã«4å°èšçœ®ããŸããã ãŸãã128å°ã®ãµãŒããŒã®åœ¢ã§ç¯çŽãããã¹ãã£ã³ã°ã³ã¹ããåæžããããšã¯ã100äžãã«ã«çžåœããŸãã
ãããŠãããã¯ã»ãã®äžäŸã§ãã Tarantoolã¯ãå€ãã®ãããžã§ã¯ãã§çšéãèŠåºããŠããŸãã ããšãã°ãMail and Cloudã«ã¯120ã®Tarantoolã€ã³ã¹ã¿ã³ã¹ããããŸãã MySQLãæ¢åã®è² è·ã¬ãã«ã§äœ¿çšããå Žåãæ°äžå°ã®ãµãŒããŒãŸãã¯ãã®ä»ã®SQLïŒPostgreSQLãOracleãªã©ïŒãã€ã³ã¹ããŒã«ããå¿ èŠããããŸãã ãããäœçŸäžãã«ã«ãªãããèŠç©ããããšããé£ããã ãã®f話ã®æèšã¯ãé©åãªããŒã«ãéžæããå¿ èŠãããã¿ã¹ã¯ããšã«ãåçŽãªæ©èœã§å€ãã®ãéãç¯çŽã§ããããšã§ãã ã³ãŒã«ãããŒã¿ã¯ããããç®çãšããSQLããŒã¿ããŒã¹ã«æ ŒçŽããå¿ èŠãããããããããŒã¿ïŒå€ãã®å Žåãã¯ãšãªããã³æŽæ°ãããïŒã¯ãããã«é©åããã¹ãã¬ãŒãžïŒTarantoolïŒã«æ ŒçŽããå¿ èŠããããŸãã
çŸåšéçºäžã®ããŒãžã§ã³1.7ã§ã¯ãRAFTã®ãããªã·ã£ãŒãã£ã³ã°ãšã¬ããªã±ãŒã·ã§ã³ã䜿çšããå®å šèªåã¯ã©ã¹ã¿ãŒãœãªã¥ãŒã·ã§ã³ãäœæããããšèããŠããŸãã ã楜ãã¿ã« ïŒ