BASEã§ãµã¼ããµã¤ãã¨ã³ã¸ãã¢ããã¦ããå®®æã§ãã
ã¤ãæè¿ã¾ã§ã主ã«Eã³ãã¼ã¹ãã©ãããã©ã¼ã ãBASEãã®æ±ºæ¸é åã®éçºããã¦ãã¾ããã決æ¸é åã¯ããããªãå ´åã§ãå®å®ç¨¼åãæ±ããããé åã§ãããããªãå ´åã§ãã¨ããã®ã¯ãBASEã対å¿ããå種決æ¸æ¹æ³ãã¯ã¼ãã³ãã·ã§ããã³ã¤ã³ãªã©æ©è½ã®çµã¿åããã¨ããæå³ã§ãããã§ãããã¢ã¯ã»ã¹éä¸ã«ããé«è² è·ã«å¯¾ãã¦ããåæ§ã«å®å®ãæ±ãããã¾ãã
åè ã«å¯¾ãã¦ã¯ãå¼ç¤¾æ±å£ããã¦ããããã¹ãã®åãçµã¿ã以åç´¹ä»ããã¦ããã ãã¾ãããä»åã¯ãå¾è ã¸ã®åãçµã¿ã¨ãã¦ãè² è·è©¦é¨ã®åãçµã¿ãç´¹ä»ããã¦ããã ãããã¨æãã¾ãã
åæ©
ãBASEãã¯ãEã³ãã¼ã¹ãã©ãããã©ã¼ã ãã§ãã®ã§ã主ã¨ãã¦æä¾ãã¦ããæ©è½ã®ä¸ã¤ã«ããã«ã¼ããã®æ©è½ãããã¾ãã主ã¨ãã¦æä¾ãã¦ããã¨ãããã¨ã¯ããµã¼ãã¹éå§å½æããããã®æ©è½ãæä¾ããã¦ããã ãã¦ããã¨ãããã¨ã§ãããã¾ãã
ããããã¾ã§å¤ãã®ã·ã§ããæ§ãè³¼å ¥è æ§ã«ãå©ç¨ããã ããããã«ãªãããã®æ§è½é¢ã«ã¤ãã¦ææ¡ãæ¹åãããã¨ãããã¾ã§ä»¥ä¸ã«æ±ããããå ´é¢ãåºã¦ãã¾ããã
æ¹åããããã«ã¯ãæ¹åãããã¨ãè©ä¾¡ã§ããªãã¦ã¯ããã¾ãããè³¼å ¥ã«é¢ããå®éçãªææ¨ãããã¦ãè¨æ¸¬ãããã¨ã«ãã¾ããã
æºå
ç°å¢
åæã¨ãã¦æ¬çªç¸å½ã®ãã®ãç¨æãããã¨ã«ãã¾ãããããã¤ãã®æ¸å¿µããã£ãã®ã§ãããä¸è¨ã®ããã«ã¯ãªã¢ãããã¨ãã§ãã¾ããã
1. ã³ã¹ãé¢ã®èª²é¡
使ãã¨ãã ãç°¡åã«è©¦é¨ç°å¢ãç«ã¡ä¸ããããä»çµã¿ãä½ã£ãããé¢é£ãã¦ãã諸ãµã¼ãã¹ã®ãã¡ä»åã®ã·ããªãªã§å¿ è¦ãªãã®ã ããæ¬çªç¸å½ã«ãããªã©ãã³ã¹ããæãã工夫ããã¾ããã
2. å¤é¨ãµã¼ãã¹ã¨ã®é£æº
ã«ã¼ãã·ã¹ãã ã§ã¯ãå¤é¨ã®æ±ºæ¸ãµã¼ãã¹çã¨ã®é£æºãè¡ã£ã¦ãã¾ããè² è·è©¦é¨ã¨ãã£ã¦ããå¤é¨ãµã¼ãã¹ã¸ã®éè² è·ã¯æã¾ããããã¾ãããï¼ãµã¼ãã¹ã«ãã£ã¦ã¯è¨±å¯ãããªãå ´åãããã¾ããï¼ä»åã¯å é¨ã®æ§è½è©¦é¨ã«ãã©ã¼ã«ã¹ãããã£ããã¨ããããå¤é¨ãµã¼ãã¹ã模ããã¢ãã¯ãµã¼ãã¹ãæ§ç¯ãã¦ããã«æ¥ç¶ããããã«ãã¾ããã
ã¾ãã試é¨ä¸ã®ç¶æ³ã®ææ¡ããçºçããç°å¸¸ã®è§£æã®ãããç£è¦ãµã¼ãã¹çããæ¬çªåæ§ã®ãã®ãå°å ¥ãã¾ããã
ãã¼ã«
試é¨ãã¼ã«ã«ã¯ã諸æ¡ä»¶ãèæ ®ãã¦Apache JMeterã使ç¨ãã¾ããã
ã»ãã·ã§ã³ç®¡çããã¼ã¸é·ç§»ãä¼´ãã·ããªãªãå¿ è¦ã ã£ããã¨ãè² è·ãã¹ããµã¼ãã¼ã®ã¹ã±ã¼ã«ã容æã«ã§ãããã¨ãã¡ã³ãã¼ã®çµé¨ãªã©ãèæ ®ãã¦ãã¼ã«ã®é¸å®ãè¡ãã¾ãããï¼JMeterã®æ´»ç¨ã«ã¤ãã¦ã¯ãå¥ã®è¨äºã§è¿°ã¹ãããã°ã¨æãã¾ããï¼ çµæã¨ãã¦ãæ©è½ãç¿çã®ä¸è¶³ãªã©ã«ãã大ããªåé¡ããªãã試é¨ãè¡ããã¨ãã§ãã¾ããã
ã·ããªãª
ã«ã¼ãã«ååãæå ¥ãã¦ãããè³¼å ¥è æ å ±ã®å ¥åãè³¼å ¥å®äºã¾ã§ã®æ°ç»é¢ãé·ç§»ãããã®ã¨ãã¾ãããã«ã¼ãå ã¯è³¼å ¥è æ å ±ãªã©å ¥åãããå¤ãå¤ãã®ã§ãããJMeterã®ãè¨é²ã³ã³ããã¼ã©ãã使ç¨ãããã¨ã§æ¯è¼çæããããã«ã·ããªãªãä½ããã¨ãã§ãã¾ããã
å®æ½
å½¹å²åæ
ä»åã®è² è·è©¦é¨ã¯ã主ã¨ãã¦3åã®ã¨ã³ã¸ãã¢ï¼ã¢ããªã±ã¼ã·ã§ã³ã¨ã³ã¸ãã¢2åãSRE1åï¼ã§é²ãã¾ããã
ã·ããªãªæ§ç¯ãã¢ãã¯ãµã¼ãã¹ã®æ§ç¯ãã·ããªãªå®è¡ãã¬ãã¼ãã£ã³ã°ãªã©ã主ã«ã¢ããªã±ã¼ã·ã§ã³ã«é¢ããé¨åãã¢ããªã±ã¼ã·ã§ã³ã¨ã³ã¸ãã¢ãæ å½ããç°å¢æ§ç¯ãªã©ã®é¨åããSREãæ å½ãã¾ããã
ãããããããã¹ããã¨ã«éä¸ã§ãããã¨ã§ãç°å¢æ§ç¯ã®å·¥å¤«ãã¢ãã¯ãµã¼ãã¹ã®æ§ç¯ãªã©ãã©ã¹ã¢ã«ãã¡ã®é¨åã«ãåãå²ããã¨ãã§ãããã¨ã¯ã¨ã¦ãè¯ãã£ãããã«æãã¾ãã
ãã¦å®è¡
ã·ããªãªãå®è¡ãã¦ã¿ãã¨ãããã¤ãã®èª²é¡ãçºçãã¾ããã
ã¢ãã¯ãµã¼ããããã«ããã¯ã«ãªã£ã¦ããï¼
ããã¯å ã ãæ§åãè¦ãªãã調æ´ããäºå®ã§ãããLBã¨appãµã¼ãã®ãã°ã確èªããæ¥ç¶æ°ãå¢ããã¦å®å®ãã¾ããã
è³¼å ¥ã§ã¯ãªãã¨ãããããã«ããã¯ã«ãªã£ã¦ããï¼
å½åã®ã·ããªãªã§ã¯ãã¾ãååç»é¢ã«ã¢ã¯ã»ã¹ãã¦ãã«ã¼ãã«ååãæå ¥ããã¨ãããã¨ããã£ã¦ããã®ã§ãããååç»é¢ã«ä½¿ã£ã¦ããå¤é¨ãµã¼ãã¹ãéçºç¨ã®ã¹ã±ã¼ã«ã®ãã®ã§ãããä»åã®ã·ããªãªã§ã¯ä¸è¦ãªã¢ã¯ã»ã¹ã ã£ããããæ¬å½ã«å¿ è¦ãªç»é¢é·ç§»ã«çµããã¨ã§è§£æ±ºãã¾ããã
æ³å®ããã¨ããã¨éãããã«ããã¯ãçºè¦ããï¼
DBãããã«ããã¯ã«ãªãããªï¼ã¨æ³å®ãã¦ããã¨ãããApacheãããã«ããã¯ã«ãªã£ã¦ãããããªæåãè¦ãã¾ãããã©ã¡ããæ¬çªç¸å½ã®ç°å¢ã§ãããããå½åæ³å®ãã¦ããè² è·ã®å¼·åº¦ãã¯ãªã¢ãã¦ãããã¨ãããããã®ããããéçã§ããã¨çµè«ã¥ãã¾ãããããã¤ãã®è¨å®ãå¤æ´ãã¦è¿½å ã®è©¦é¨ãè¡ããå³åº§ã«åæ ã§ãããããªå¤æ´ç¹ã¯è¦ã¤ãããã¾ããã§ãããã次ã®æ¹åã¸ã®åãæããã¨ãã¦ç¥è¦ãå¾ããã¾ããã
å®æ½ä¸ã®æ§å
Slackã§å®æ³ããªãããããããããã¾ããã è² è·ãå¢ããã¦ãããªãããã¨ã©ã¼ãªãå¦çãå®äºãã¦ããæ§åããè¬ã®ã¨ã©ã¼ãçºçãã¦ãããã¨ãéæå ±åããããã«ãã¾ãããé£ã®å³¶ã®ãªã¼ãã¨ã³ã¸ãã¢ããã£ããã¨åå ãææãã¦ãããããSREã®ã¡ã³ãã¼ãã¤ã³ãã©ã調æ´ãã¦ããããã次ã ã«ç¾ãã課é¡ãæ»ç¥ããã¦ãããã¾ã«æåã¨æè¬ã§ãã£ã±ãã«ãªãã¾ããã
çµæ
è² è·è©¦é¨ãå®æ½ããã¨æ±ºãã¦ãã2ã¶æç¨åº¦ã§çµæãåºãã¨ããã¾ã§è¡ããã¨ãã§ããå®éçãªã¬ãã¼ãã社å ã«å ±æã§ãã¾ããã ã¾ãã並è¡ãã¦é²ãã¦ããæ¹ä¿®ã«ã¤ãã¦ããååããªå¹æãããããã ã¨ããçµæãå¾ããã¨ãã§ãã¾ããã ãã©ãã«ä»¥å¤ã§ã¯æ±ºæ¸é åãç®ç«ã¤ãã¨ã¯å°ãªãã®ã§ãããååããªææãå ±æã§ãããã¨ã¯ããã¼ã ã«ã¨ã£ã¦ãè¯ãã£ããªã¨æãã¾ããã
ã¾ã¨ã
- è² è·è©¦é¨ãå®æ½ãããã¨ã§ãã·ã¹ãã ã®æ§è½ã«ã¤ãã¦å®éçãªææ¨ãå¾ããã¨ãã§ãã¾ããã
- æ§è½ã«é¢ããæ¹åãè¡ãã«ãããããã®å¹æãè¦è¾¼ãããã¨ãæ¹ä¿®åã«ç¤ºããã¨ãã§ãã¾ãããé«è² è·ç¶æ ã¯å¸¸ã«çºçãããã®ã§ã¯ãªãã®ã§ï¼æ®å¿µãªããï¼ãåçã®ç°å¢ã§åç¾ããããã¨ã§ããã®å¹æãå¯ä½ç¨ããªããã¨ã確èªããããã§ãªãªã¼ã¹ã®å¤æããããã¨ãã§ãã¾ããã
- é«è² è·ç¶æ ãåç¾ãããç°å¢ãæã«å ¥ãããã¨ã§ãå®å¿ãã¦ãµã¼ãã¹ãæé·ããã¦ããåå°ãã§ããããªã¨æãã¾ããä»ã®ç®æã§é«è² è·ã«èµ·å ãã課é¡ãçºçããå ´åã«ããç¥è¦ã¨ç°å¢ãæ´»ç¨ãã¦å¯¾å¿ãã¦ããããã®ã¨æå¾ ãã¦ãã¾ãã
æå¾ã«
æ¬è¨äºã§ã¯ãBASEã§å®æ½ããè² è·è©¦é¨ã®åãçµã¿ã«ã¤ãã¦ç´¹ä»ããã¦ããã ãã¾ãããè² è·è©¦é¨ã«åãçµãã«ããããç¹å®ã®ãã¼ã«ã®ä½¿ãæ¹ä»¥ä¸ã®å®è·µçãªæ å ±ãã¾ã å°ãªããªã¨æããã¨ããããããä¸ã¤ã®å®è·µä¾ã¨ãã¦æ¬è¨äºãå°ãã§ãåèã«ãã¦ããã ããã°å¹¸ãã§ãã ã¾ããæ¬æã§ã¯ç°¡åãªç´¹ä»ã«ãªã£ã¦ãã¾ãã¾ããããJMeterã®æ´»ç¨ãã¢ãã¯ãµã¼ãã®æ§ç¯ã«ã¤ãã¦ã¯ä»å¾å¥ã®è¨äºã§ç´¹ä»ã§ããã°ã¨æãã¾ãã
BASEã§ã¯60ä¸ã·ã§ããã®æ±ºæ¸ãæ¯ããã¨ã³ã¸ãã¢ãåéãã¦ãã¾ããæ¯ããã ãã§ãªããããè¯ã決æ¸ã·ã¹ãã ã«ãã¦ããææ¦ããã£ã¦ããã¾ãã®ã§ãèå³ã®ããæ¹ã¯ãã²ä¸è¨ãããé£çµ¡ãã ããï¼