ããã«ã¡ã¯ãã¹ã¿ãã£ãµããªå°ä¸é« / Quipper SREã®@kyontanã§ãã
ãã®è¨äºã¯ Recruit Engineers Advent Calendar 2022 ã®1æ¥ç®ã®è¨äºã§ãã
éçºãã¼ã ãäºå®ã«åºã¥ãã¦(= fact-basedãª)ææ決å®ãã§ããããã«ããããã®ä¸å©ã¨ãã¦ãSREãã¼ã ã§ã¯SLO (Service Level Objective)ãè¨å®ããã¦ãããã¨ããµã¼ãã¹å ¬éæã®è¦ä»¶ã¨ãã¦ãã¾ãã
ã¹ã¿ãã£ãµããªå°ä¸é«ã«ãããSLOã®éç¨ã«ã¤ãã¦ã¯ã以åå¼ãã¼ã ã®@chaspyã SRE NEXT 2020 ã§ãSLO Reviewãã¨ããã¿ã¤ãã«ã§ç»å£ãã¾ãã #srenext ã¨ããè¨äºãæ¸ãã¦ããã®ã§ããã¡ãããåç §ãã ããã
æ¬è¨äºã§ã¯ãããã¾ã§ãããå¤ã«ããã¢ã©ã¼ããè¨å®ãã¦ããSLOã«ã¤ãã¦ãBurn Rateã«ããã¢ãã¿ãªã³ã°ã試ãã¦ã¿ãã®ã§ããã£ãããç´¹ä»ã§ããã°ã¨æãã¾ãã
èæ¯
ã¹ã¿ãã£ãµããªå°ä¸é«ã§ã¯ã大åã®ãã¤ã¯ããµã¼ãã¹ã以ä¸ã®2ã¤ã®SLI(Service Level Indicator)ãå®ç¾©ãã¦ãã¾ãã
- HTTPã¨ã©ã¼ã¬ã¼ã (HTTP 5xx statusã®å²å)
- HTTPã¬ã¹ãã³ã¹ã¿ã¤ã
SLOã®è¨å®å¤ããã¨ã©ã¼ãã¸ã§ãããæ¯æ¸ããå ´åã®å¯¾å¿æ¹éãªã©ã¯ãããããã®ãã¤ã¯ããµã¼ãã¹ã®éçºãã¼ã ã«ä¸ä»»ããã¦ãã¾ãã å ¨ãã¼ã ã®å¯¾å¿æ¹éãææ¡ãã¦ããããã§ã¯ãªãã®ã§ä¸»è¦³ã«ã¯ãªãã¾ãããé±æ¬¡ãªã©ã§ãã¼ã ã®ããã·ã¥ãã¼ããè¦ã¦æ¯ãè¿ãåãçµã¿ããã¦ãããã¼ã ãå¤ãã¨æãã¦ãã¾ãã
Burn Rate Monitoring ã«ã¤ãã¦
Burn Rate Monitoringã¨ã¯ãã¨ã©ã¼ãã¸ã§ããã®æ¶è²»é度ã«å¯¾ããã¢ãã¿ãªã³ã°ã®ææ³ã§ãããSRE Workbook ã® Alerting on SLOsã®"4: Alert on Burn Rate"ã¨ããã»ã¯ã·ã§ã³ã§ç´¹ä»ããã¦ãã¾ãã ããã«å¯¾ããå ¸åçãªError Budget Monitoring(ãããå¤ã«ããã¢ãã¿ãªã³ã°)ã®å ´åã¯ã¨ã©ã¼ãã¸ã§ãããæ¶è²»ããã£ãã(ãããã¯ä¸å®ã®ã¨ã©ã¼ãã¸ã§ããæ®éãä¸åã£ããã©ãã)ã§å¤å®ãã¾ãã
Burn Rate = 1
ã¨ããã®ã¯ãSLOã®å®ããããæéã«ã¨ã©ã¼ãã¸ã§ãããã¡ããã©æ¶åãããç¶æ
ãæãã¦ãããBurn Rate = 2
ã®ã¨ãã¯ãã®2åã®é度ã§ã¨ã©ã¼ãèµ·ãã¦ãããã¨ã«ãªãã¾ããéã«ãBurn Rate ã常ã«1以ä¸ã§ããã°ã¨ã©ã¼ãã¸ã§ãããæ¶åããããã¨ã¯ããã¾ããã
Burn Rate Monitoringã®ã¡ãªããã¨ãã¦ãæ¶è²»é度ã«å¯¾ããã¢ãã¿ãªã³ã°ã§ã¯ç¹å®ã®ãªãªã¼ã¹ã«ããå½±é¿ãªã©ãç´ æ©ãæ¤ç¥ã§ããã¡ãªãããããã¾ãã ãã¨ãã°ããããªãªã¼ã¹ãèµ·ç¹ã¨ãã¦ã¨ã©ã¼ã¬ã¼ããããä¸æããã¨ã©ã¼ãã¸ã§ãããå®ããããSLO window(ä¸è¬çã«ã¯7æ¥ã30æ¥ãªã©)ã«ã®ãªã®ãªä½¿ãåããããªã·ãã¥ã¨ã¼ã·ã§ã³ãæ³å®ãã¦ã¿ã¾ãã
Error Budget Monitoringã®å ´åã¯ã¨ã©ã¼ãã¸ã§ãããæ¯æ¸ãã段éãã¤ã¾ããªãªã¼ã¹ããæ°æ¥å¾ã«ã¢ã©ã¼ãã§æ°ãã¤ããã¨ã«ãªããåå ã®ç©¶æãå°é£ã§ãã£ãããä¿®æ£ã«æéãè¦ãããã¨ãããããããã¾ããã
ä¸æ¹ã§ãBurn Rate Monitoringã®å ´åã¯ããªãªã¼ã¹ãèµ·ç¹ã¨ãã¦Burn Rateã1以ä¸ã®å¤ãåããã¨ã«ãªãã¾ãã ã©ã®ç¨åº¦ã®Burn Rateã§ã¢ã©ã¼ããåãåããã¯ç¶æ³ã«ãããã¾ãããä»®ã«Burn Rateã1以ä¸ã®ã¨ãã«ã¢ã©ã¼ããåãåã£ã¦ããå ´åã§ããã°ããªãªã¼ã¹ãã¦ããã«ã¢ã©ã¼ãã«æ°ä»ããã¨ãã§ãããããåå 究æãä¿®æ£ãError Budget Monitoringã¨æ¯è¼ããã¨ã¹ã ã¼ãºã«è¡ããå¯è½æ§ãé«ãã§ãã
Burn Rate Monitoringãå°å ¥ããçµæ
ãã®ãããªè¯ããã¨ãããã®Burn Rate Monitoringã§ãããå¼ãããã¯ãã§å©ç¨ãã¦ããDatadogã«ããã¦ããµãã¼ãããã¦ãããMonitorã®è¨å®æ¹æ³ã®1ã¤ã¨ãã¦æä¾ããã¦ãã¾ãã
試ãã«ãããã¼ã ã§Burn Rate Monitoringãå°å ¥ãã¦ã¿ã¾ããããæåã¯Burn Rateãã©ã®ç¨åº¦ãè¶ ãããã¢ã©ã¼ãã¨ãã¹ããã®è¨å®ãé£ããã¨æãã¾ããã
ããã«ã¤ãã¦ã¯ãmulti-windowã¨ããææ³ãå°å ¥ãããã¨ã§æ¹åã§ãã¾ãã å ·ä½çã«ã¯ç°ãªãSLO windowã§ã®Burn Rateãç£è¦ããããã«ããé·ãSLO windowã§ã®Burn Rateãä¸å®ä»¥ä¸ã«ãªã£ããã¢ã©ã¼ããçºå ±ãçãSLO windowã§ã®Burn Rateãä¸å®ä»¥ä¸ã«ãªã£ãæç¹ã§å復ã¨ãããã¨ã§ãã¢ã©ã¼ãã®flappingãé²ãã¤ã¤äºè±¡ã®è§£æ±ºæã«ã¯æ©æã«ã¢ã©ã¼ãã解æ¶ããããã¨ãã§ãã¾ãã ããã¯ã¾ãã«Alerting on SLOsã®"6: Multiwindow, Multi-Burn-Rate Alerts"ã®ã»ã¯ã·ã§ã³ã§ç´¹ä»ããã¦ããå 容ã§ãããå³ã使ã£ã¦åããããã説æããã¦ããã®ã§ããã²åæãåç §é ããã°ã¨æãã¾ãã
åèã¾ã§ã«ãDatadogã§ã¯ããã©ã«ãã§ããããèæ ®ããè¨å®ãå¯è½ã«ãªã£ã¦ãããããè¤éãªè©ä¾¡å¼ãªã©ãæ¸ããã¨ããwindowçã®ãã¥ã¼ãã³ã°ã§é©åãªè¨å®ãã§ããããã«ãªã£ã¦ãã¾ããã
ä»å¾ã¯ãå¹ åºãBurn Rate Monitoringãå°å ¥ããããã¾ã§ã®Error Budget Monitoringã¨ãããåºãæ´»ç¨ãã¦ãããã°è¯ããªã¨èãã¦ãã¾ãã
ãããã«
æ¬è¨äºã§ã¯ããµã¼ãã¹ãæå¾ ããåä½ããã¦ããªããã¨ãããæ©æã«æ¤ç¥ããããã®ä»çµã¿ã¨ãã¦ãSLO Burn Rate Monitoringã«ã¤ãã¦ãç´¹ä»ãã¾ããã
ã¹ã¿ãã£ãµããªã§ã¯ãå¼ãç¶ããµã¼ãã¹ã®ä¿¡é ¼æ§ãé«ããéçºè ãããé«éã«ãµã¼ãã¹ãæ¹åãã¦ãããããã®ãã©ãããã©ã¼ã ãä½ã£ã¦ãã仲éãåéãã¦ãã¾ãã
https://brand.studysapuri.jp/career/
ã¾ããRecruit Engineers Advent Calendar 2022ã§ã¯ãªã¯ã«ã¼ãã®ã¨ã³ã¸ãã¢é£ãè¨äºãæ稿ãã¦ããäºå®ã§ãããããªã¯ã«ã¼ãã«ãããã¨ã³ã¸ãã¢ãªã³ã°ã«èå³ãããã°ããã²ä»ã®è¨äºããããã¦ãåç §ãã ããã