Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Chaos Engineeringという考え方 / A concept of Chaos Engineering

Mahito
November 11, 2019

Chaos Engineeringという考え方 / A concept of Chaos Engineering

ChaosConf2019 recapイベント( https://chaosconf2019recap.splashthat.com/ )で発表した資料です。(一部修正)
Chaos Engineeringの基本的な知識や考え方を、 Chaos Conf 2019に登壇した企業が語った内容を併せて発表したものです。

Mahito

November 11, 2019
Tweet

More Decks by Mahito

Other Decks in Technology

Transcript

  1. Transform your business, transcend expectations with our technologically advanced solutions.
    Copyright © NTT Communications Corporation. All rights reserved.
    Mahito Ogura (2019/11/11)
    @Mahito
    Chaos Engineering
    という考え方

    View Slide

  2. Copyright © NTT Communications Corporation. All rights reserved. 2
    技術開発部
    業務:クラウド関連の技術検証など




    業務:その他
    ● エンジニア採用のお手伝い
    ● エンジニア向けのイベント開催
    ● はたらく環境の改善

    View Slide

  3. Copyright © NTT Communications Corporation. All rights reserved. 3
    本日のお話
    前半では の基本的な知識や考え方を
    後半では の考え方の変化を、
    に登壇した企業が語った内容を併せてお話します

    View Slide

  4. Copyright © NTT Communications Corporation. All rights reserved. 4
    システムに対し意図的に障害を起こすことで、
    障害時のシステムの振る舞いを把握するアプローチ
    意図的に引き起こされた障害により問題が生じた際は、
    問題を治すことでシステムをより強固なものにすることができる( )
    カオスエンジニアリング ≒ 疫学 予防医学
    カオスエンジニアリングとは

    View Slide

  5. Copyright © NTT Communications Corporation. All rights reserved. 5
    英和辞典:
    はね返り、とび返り、弾力、弾性、 元気の 回復力
    英英辞典:
    意訳:難しい状況や出来事のあとに、より良くなるための能力

    View Slide

  6. Copyright © NTT Communications Corporation. All rights reserved. 6
    システムの状態は関連するシステムの数に比例して指数関数的に増大する
    すべての状態を把握するのは不可能
    システムに意図的に障害を起こすことで開発 運用が意図しない障害を起こす
    → 障害による影響を把握
    → 修正することでよりシステムを安定したものに
    なぜカオスエンジニアリングなのか?

    View Slide

  7. Copyright © NTT Communications Corporation. All rights reserved. 7
    参考: と の

    View Slide

  8. Copyright © NTT Communications Corporation. All rights reserved.
    “The best way to avoid
    failure is to fail constantly.”
    Netflix TechBlog : https://medium.com/netflix-techblog/5-lessons-weve-learned-using-aws-1f2a28588e4c
    - Netflix

    View Slide

  9. Copyright © NTT Communications Corporation. All rights reserved. 9
    今年 月にサンフランシスコで開催
    発表は で視聴可能
    [1]:https://chaosconf2019.splashthat.com/
    [2]:https://www.youtube.com/playlist?list=PLLIx5ktghjqIbPU1G2a3ssud26tiGlFUE

    View Slide

  10. Copyright © NTT Communications Corporation. All rights reserved. 10
    今回のテーマは

    View Slide

  11. Copyright © NTT Communications Corporation. All rights reserved. 11
    カオスエンジニアリングと は重複する部分が多い
    ではカオスエンジニアリングの実現に を利用
    : 故障時に正しく動くことを確認する手段
    障害時の状態をテストするためのアプローチ
    - 新しい情報を作り出すためのアプローチ
    カオスエンジニアリング ≒ 障害試験?

    View Slide

  12. Copyright © NTT Communications Corporation. All rights reserved.
    カオスエンジニアリングは
    ○ :新しい情報を作り出すためのアプローチ
    △ : の確認や証明するアプローチ

    View Slide

  13. Copyright © NTT Communications Corporation. All rights reserved.
    カオスエンジニアリングは
    ○ :新しい情報を作り出すためのアプローチ
    ☓ : の確認や証明するアプローチ
    新しい情報を作り出すとは?

    View Slide

  14. Copyright © NTT Communications Corporation. All rights reserved. 14
    余談:最近社内で読書会やってます
    https://www.oreilly.co.jp/books/9784873115894/

    View Slide

  15. Copyright © NTT Communications Corporation. All rights reserved. 15
    Francisco Presencia FandosによるPixabayからの画像
    アンチパターン
    章:砂の城

    View Slide

  16. Copyright © NTT Communications Corporation. All rights reserved. 16
    Francisco Presencia FandosによるPixabayからの画像
    アンチパターン
    「想定不足」

    View Slide

  17. Copyright © NTT Communications Corporation. All rights reserved. 17
    Francisco Presencia FandosによるPixabayからの画像
    どれだけ盤石な基盤を築けるかは、あなたがどれだけの
    インシデントを想定しているかが鍵なのです。
    アンチパターン 章「砂の城」より

    View Slide

  18. Copyright © NTT Communications Corporation. All rights reserved. 18
    Francisco Presencia FandosによるPixabayからの画像
    問題:
    ● 何が起きるかという想定がされていないこと
    ● 想定への対策が十分に検討されていないこと
    発売当時( 年)だと
    ● コンサルや専門家を雇う
    ● 自分たちで考える
    現在だと という選択肢もある

    View Slide

  19. Copyright © NTT Communications Corporation. All rights reserved.
    カオスエンジニアリングは
    想定外( )を知るための手法

    View Slide

  20. Copyright © NTT Communications Corporation. All rights reserved. 20
    ● 問題として起きていないが、
    解決方法が明確なもの
    ● すぐに にできるもの
    ● 問題と解決方法を知っている
    ● 完全に理解した
    ● 何が起きるのか知らない
    ● 起きてから対応が必要
    ● 問題として知っているが、
    解決策がわからない
    ● 仮設を立て、テストと実験を繰り返し
    チームで解決すべき問題
    データ 経験 知識



    View Slide

  21. Copyright © NTT Communications Corporation. All rights reserved. 21
    https://speakerdeck.com/chaosconf/a-roadmap-towards-chaos-engineering?slide=14

    View Slide

  22. Copyright © NTT Communications Corporation. All rights reserved. 22
    [1]: https://www.amazon.co.jp/dp/4764903296
    [2]: https://www.amazon.co.jp/dp/4274217884/
    「テスト」の古典的な定義を引用するなら、「ソフトウェア・テストの
    技法 第 版 」 が上げられるでしょう。
    テストとは、エラーを見つけるつもりでプログラムを
    実行する過程である。
    ソフトウェアテストの世界における本来のテストとは、認知の外を
    探求する、いわば創造的破壊行為です。
    テスト駆動開発
    付録 訳者解説 テスト駆動開発の現在 より

    View Slide

  23. Copyright © NTT Communications Corporation. All rights reserved. 23
    ● 問題として起きていないが、
    解決方法が明確なもの
    ● すぐに にできるもの
    ● 問題と解決方法を知っている
    ● 完全に理解した
    ● 何が起きるのか知らない
    ● 起きてから対応が必要
    ● 問題として知っているが、
    解決策がわからない
    ● 仮設を立て、テストと実験を繰り返し
    チームで解決すべき問題
    データ 経験 知識



    View Slide

  24. Copyright © NTT Communications Corporation. All rights reserved. 24
    ● 問題として起きていないが、
    解決方法が明確なもの
    ● すぐに にできるもの
    ● 問題と解決方法を知っている
    ● 完全に理解した
    ● 何が起きるのか知らない
    ● 起きてから対応が必要
    ● 問題として知っているが、
    解決策がわからない
    ● 仮設を立て、テストと実験を繰り返し
    チームで解決すべき問題
    データ 経験 知識



    View Slide

  25. Copyright © NTT Communications Corporation. All rights reserved. 25
    Unknown Knowns
    ● 問題として起きていないが、
    解決方法が明確なもの
    ● すぐにKKにできるもの
    Known Knowns
    ● 問題と解決方法を知っている
    ● 完全に理解した
    Unknown Unknowns
    ● 何が起きるのか知らない
    ● 起きてから対応が必要
    Known Unknowns
    ● 問題として知っているが、
    解決策がわからない
    ● 仮設を立て、テストと実験を繰り返し
    チームで解決すべき問題
    データ 経験 知識



    Failure Testing
    Fault Injection
    Chaos Engineering
    Chaos Engineering
    カオスエンジニアリングで未知の問題を知り
    解決することで なシステムを作る!

    View Slide

  26. Copyright © NTT Communications Corporation. All rights reserved. 26
    システムに関係するありとあらゆる
    ものが障害を起こす原因になる
    耐障害性を謳う分散システムも壊れること
    はある
    ありとあらゆるものは障害を起こす
    Application
    Message
    Queue
    Database
    OS
    Hardware
    Network
    Data Center
    Filesystem
    本当は恐ろしい分散システムの話

    View Slide

  27. Copyright © NTT Communications Corporation. All rights reserved. 27
    https://speakerdeck.com/chaosconf/humans-are-fallible?slide=4

    View Slide

  28. Copyright © NTT Communications Corporation. All rights reserved. 28
    https://speakerdeck.com/chaosconf/humans-are-fallible?slide=4
    間違えを起こす人間が作るから
    システムに間違いはつきもの!

    View Slide

  29. Copyright © NTT Communications Corporation. All rights reserved. 29
    前半まとめ
    カオスエンジニアリングは
    ○ :新しい情報を作り出すためのアプローチ
    △ : の確認や証明するアプローチ

    View Slide

  30. Copyright © NTT Communications Corporation. All rights reserved. 30
    後半は について紹介

    View Slide

  31. Copyright © NTT Communications Corporation. All rights reserved. 31
    英語版
    https://principlesofchaos.org/?lang=ENcontent

    View Slide

  32. Copyright © NTT Communications Corporation. All rights reserved. 32
    日本語版
    https://principlesofchaos.org/?lang=JAcontent

    View Slide

  33. Copyright © NTT Communications Corporation. All rights reserved. 33
    序文から 分散 の文字が消えた
    https://github.com/chaos-eng/chaos-eng.github.io/issues/22

    View Slide

  34. Copyright © NTT Communications Corporation. All rights reserved. 34
    序文から 分散 の文字が消えた
    https://github.com/chaos-eng/chaos-eng.github.io/pull/23/files

    View Slide

  35. Copyright © NTT Communications Corporation. All rights reserved. 35
    分散だけでなく への適用事例
    https://speakerdeck.com/chaosconf/think-big-chaos-testing-a-monolith

    View Slide

  36. Copyright © NTT Communications Corporation. All rights reserved. 36
    https://speakerdeck.com/chaosconf/think-big-chaos-testing-a-monolith?slide=36

    View Slide

  37. Copyright © NTT Communications Corporation. All rights reserved. 37
    https://speakerdeck.com/chaosconf/think-big-chaos-testing-a-monolith?slide=39

    View Slide

  38. Copyright © NTT Communications Corporation. All rights reserved. 38
    https://speakerdeck.com/chaosconf/think-big-chaos-testing-a-monolith?slide=91

    View Slide

  39. Copyright © NTT Communications Corporation. All rights reserved. 39
    他の発表でも障害から学ぼうという話が
    [1]: https://speakerdeck.com/chaosconf/forming-failure-hypotheses?slide=31
    [2]: https://speakerdeck.com/chaosconf/hot-recipes-for-building-chaos-experiments?slide=12
    [3]: https://blog.newrelic.com/engineering/how-to-run-a-game-day/

    View Slide

  40. Copyright © NTT Communications Corporation. All rights reserved. 40
    https://speakerdeck.com/chaosconf/think-big-chaos-testing-a-monolith?slide=117

    View Slide

  41. Copyright © NTT Communications Corporation. All rights reserved. 41
    https://speakerdeck.com/chaosconf/think-big-chaos-testing-a-monolith?slide=117

    View Slide

  42. Copyright © NTT Communications Corporation. All rights reserved. 42
    何が起きるか知っていますか?
    ▪ もしくは が障害
    ▪ の が消える
    ▪ サービス間のレイテンシが増大
    ▪ 対向サービスから例外が返ってくる
    ▪ サーバ間の時刻がずれている
    ▪ エラー
    ▪ コアが張り付く
    ▪ の障害

    View Slide

  43. Copyright © NTT Communications Corporation. All rights reserved. 43
    上に のカタログが公開されている
    https://github.com/open-chaos/experiment-catalog

    View Slide

  44. Copyright © NTT Communications Corporation. All rights reserved. 44
    さらに

    View Slide

  45. Copyright © NTT Communications Corporation. All rights reserved. 45
    資料:https://speakerdeck.com/chaosconf/keynote-chaos-engineering-for-people-systems
    動画:https://youtu.be/sn6wokyCZSA

    View Slide

  46. Copyright © NTT Communications Corporation. All rights reserved. 46
    資料:https://speakerdeck.com/chaosconf/keynote-chaos-engineering-for-people-systems
    動画:https://youtu.be/sn6wokyCZSA
    企業を分散システムとして捉え を導入




    一番複雑なのはソフトウェアやハードウェアではなく人間
    人間もシステムの一部として の対象になる

    View Slide

  47. Copyright © NTT Communications Corporation. All rights reserved.
    まとめ

    View Slide

  48. Copyright © NTT Communications Corporation. All rights reserved.
    カオスエンジニアリングは
    - 新しい情報を作り出すためのアプローチ
    - 学びの場、ナレッジを共有する方法
    - だけでなく人間も含んだ広い意味でのシステムに適用可能

    View Slide

  49. Presentation by NTT Communications

    View Slide