6
本日のゴール
Modern Application Development
急にモダンなアプリケーションをデベロップメントする
ことになっても、
「え、監視とかどうすれば・・?」
と悩まずにすむようになること
https://www.irasutoya.com/2015/12/blog-post_51.html
36
monitorの意味
“to watch and check something over a period of
time in order to see how it develops, so that you
can make any necessary changes.”
- Oxford Learner's Dictionary
「必要な変更を加えることが出来るように、ある期間に
わたって、それがどのようにして発展したかを把握する
目的で、見て、そしてチェックすること」
https://www.oxfordlearnersdictionaries.com/definition/english/monitor_1?q=monitor
Slide 37
Slide 37 text
37
つまり:M(Monitoring)な監視では
計測結果が対処とワンセットに
○ 「まず世に出してから修正する」には
こっちがハマる
“Done is better than perfect”
○ Mark Elliot Zuckerberg, CEO of Facebook, Inc.
○ 「完全なものなどないという前提のもと、完全に近づく
ために細かな継続的改善・反復が重要だ」ということ
○ 現状の把握(Monitoring)なしでは為しえない
https://medium.com/@amachino/done-is-better-than-perfect-%E3%81%AE%E6%84%8F%E5%91%B3-dc2c74069ece
https://commons.wikimedia.org/wiki/File:Mark_Zuckerberg_F8_2018_Keynote.jpg
Slide 38
Slide 38 text
38
古典「推測するな、計測せよ」
Notes on Programming in C
“ルール1: (略)どこがボトルネックなのかをはっきり
させるまでは、推測を行ったり、スピードハックをして
はならない”
“ルール2: 計測すべし。計測するまでは速度のための調
整をしてはならない。(後略)”
- Robert "Rob" C. Pike
https://ja.wikipedia.org/wiki/UNIX%E5%93%B2%E5%AD%A6
http://www.lysator.liu.se/c/pikestyle.html
45
Failure mode, SLI, SLO
ENT308-S - Build your next microservices
application with modern AWS services
https://youtu.be/msxD0bTFu2A?t=2505
https://dev.classmethod.jp/articles/201912-report-reinvent-2019-ent308/
51
The Three Pillars of Observability
Metrics(数値、低コンテキスト)
Event Logs(含メタデータ、高コンテキスト)
Tracing(事象の関連性・分散トレーシング)
- Distributed Systems Observability
https://www.oreilly.com/library/view/distributed-systems-observability/9781492033431/ch04.html
Slide 52
Slide 52 text
52
The Four Golden Signals
Latency (パフォーマンス・遅延)
Traffic (トラフィック量)
Errors (エラー発生率)
Saturation (利用率、キャパシティ)
- SREサイトリライアビリティエンジニアリング
https://landing.google.com/sre/sre-book/chapters/monitoring-distributed-systems/
Slide 53
Slide 53 text
53
Three dimensions
Functionally (その機能が正しく動いているか)
Availability (その機能が使えるか)
Speed (遅くないか)
- Best Practices for Monitoring E-Commerce
Performance
https://newrelic.com/resources/tutorials/best-practices-for-monitoring-ecommerce-performance
57
MTTRも気にしよう
Mean Time To Repair = 復旧までの最小平均時間
Mean Time To Resolution = 解決までの最小平均時間
SLO 99.9% = 毎月30〜40分止まっても許される?
○ 「1回の停止は5分以内」のような定義も必要
○ SLOを日単位、時間単位でも設定する
■ 99.9%/day = 8.64sec.