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

カオスエンジニアリングによる高信頼を目指して〜クレジットカード会社がChaosMeshを使ってみて

Yuki Naganuma
November 01, 2021

 カオスエンジニアリングによる高信頼を目指して〜クレジットカード会社がChaosMeshを使ってみて

JCBではお客様に価値あるサービスを迅速に提供するため、Kubernetesをはじめとするクラウドネイティブ技術を用いたアジャイル開発を行っています。その一つとして昨今改めて注目を集めるカオスエンジニアリングによる信頼性向上にも取り組んでいます。本発表ではJCBがカオスエンジニアリングに取り組むに至った背景や、ChaosMeshをご紹介します。

Yuki Naganuma

November 01, 2021
Tweet

Other Decks in Technology

Transcript

  1. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved.
    カオスエンジニアリングによる信頼性向上を⽬指して
    ~クレジットカード会社がChaos Meshを使ってみて~
    株式会社 ジェーシービー
    ⻑沼 佑樹

    View Slide

  2. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved.
    Speaker
    ⽒名 : ⻑沼 佑樹
    所属 : デジタルソリューション開発部
    役割 : JDEPシステムアーキテクト
    趣味 : ウィンタースポーツ ⼦育て
    2
    略歴︓
    l 2020年までメーカー系の研究開発部⾨にて、クラウドやKubernetesをはじめとした
    ITプラットフォームの研究開発に従事
    l 2021年春より(株)ジェーシービーにてクラウドネイティブ技術を活⽤してビジネス構築を
    ⾼速化するプロジェクトにJOIN、新技術導⼊やアーキテクチャ設計を担当

    View Slide

  3. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved.
    Agenda
    1. Whatʼs JCB
    2. Chaos Engineering
    3. Chaos Mesh
    3

    View Slide

  4. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved.
    Whatʼs JCB
    4

    View Slide

  5. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved.
    Whatʼs JCB
    5
    l Issuer
    p 約 1 億 4000 万⼈のカード会員
    l Acquirer
    p 国内外 約 3600 万の加盟店
    l Brand Holder
    p ⽇本発唯⼀の国際カードブランド

    View Slide

  6. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved.
    法対応・
    セキュリティ
    対応すべき内容が盛り沢⼭︕
    6
    今のままでは変化のスピード感についていけない…
    新たな
    コンペティタ
    多様化・
    デジタル化
    出典︓経済産業省「キャッシュレスの現状と意義」( 2020/01 公表 )
    https://www.meti.go.jp/policy/mono_info_service/cashless/image_pdf_movie/about_cashless.pdf
    2025年に
    40%
    ( 令和元年6⽉21⽇ 閣議決定 )
    Whatʼs JCB

    View Slide

  7. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved.
    JCB
    ● 出島戦略
    ● 内製化・アジャイル開発
    ● ゼロベースでデザイン
    ● ⺟体と異なるルール・
    プロセスを設計・実践
    → 対象範囲を拡⼤中
    7
    ビジネス全体の⾼速化
    New
    Project
    New
    Project
    New
    Project
    Whatʼs JCB

    View Slide

  8. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved. 8
    Service A
    Team A
    New Platform
    Service B
    Team B
    Service C
    Team C
    QA Team SRE Team Sec Team
    Platform Team
    Arch Team
    ● Agility ある開発を実現させるための開発体制
    ● 逆コンウェイの法則に則り、システム構造を組織構造に写像
    Whatʼs JCB

    View Slide

  9. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved. 9
    新規サービスの⾼速開発を可能とするPlatformとしてJDEPを構築
    ・JDEP︓JCB Digital Enablement Platform。CloudNativeなサービス・ソリューション群で構成
    ・サービス開発に⾃由度を持たせつつ、Agilityあるシステム開発を実現
    JDEP
    GKE(Google Kubernetes Engine) / Cluster
    SaaS
    Shared Service
    Public Cloud
    Cloud
    Pub/Sub
    Cloud
    Spanner
    Key Management
    Service
    On-Premises
    Data Center
    Partner
    Interconnect
    Cloud
    NAT
    Cloud
    IAM
    Big
    Query
    Cloud Resource
    Manager
    Monitoring
    Cloud
    DNS
    Service A
    (NameSpace)
    Service B
    (NameSpace)
    Service C
    (NameSpace)
    NEW Service
    (NameSpace)
    Anthos Service Mesh (Istio)
    Whatʼs JCB

    View Slide

  10. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved.
    GKE GKE GKE
    10
    Dev/QA環境
    開発
    テスト
    Stage環境
    性能テスト
    障害テスト
    Production環境
    顧客提供
    Service Service
    Service
    Service Service
    Service
    Service Service
    Service
    release
    (本番)
    Whatʼs JCB

    View Slide

  11. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved.
    Chaos Engineering
    11

    View Slide

  12. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved. 12
    Chaos Engineering
    これまで以上にサービスを⾼信頼化する施策の実施が必要
    1. システムが複雑化・障害点が増え、事前にすべてを考慮するのが難しい
    2. 外部サービスや共有リソースを含んだ障害テストは困難
    3. 障害テストを頻繁に実施するのは難しい
    (+なんとなく⾯⽩そうだし技術的にチャンレンジしてみよう︕)
    Chaos Engineering
    “Chaos Engineering is the discipline of experimenting on a system
    in order to build confidence in the systemʼs capability to withstand
    turbulent conditions in production. “
    出典︓https://principlesofchaos.org/
    JCBʼs Motivation

    View Slide

  13. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved. 13
    出典︓https://principlesofchaos.org/ja/
    Chaos Engineering 詳細な原則
    l 定常状態における振る舞いの仮説を⽴てる
    l 実世界の事象は多様である
    l 本番環境で検証を実⾏する
    l 継続的に実⾏する検証の⾃動化
    l 影響範囲を局所化する
    とはいっても…
    l ⼼理的に本番は怖い…
    l 厳しいアクセス制限…
    ・ 本番環境へはセキュリティ
    ルームからアクセス etc...
    Chaos Engineering

    View Slide

  14. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved. 14





    ● クラウド、Kubernetes、IaC等により構成はStage ≒ Production
    ● Stage〜は可観測(Observability)を実現する環境
    Stage
    VM VM
    OS OS
    App App
    NW etc.
    Production
    VM VM
    OS OS
    App App
    NW etc.

    監視基盤
    Stage Production
    可観測基盤 (datadog etc.)

    Kubernetes
    App
    (コンテナ)
    App
    (コンテナ)
    Kubernetes
    App
    (コンテナ)
    App
    (コンテナ)
    昔 今
    (JDEP)


    Stage実施でも得られるものは
    ⼗分にあるはず︕
    l 既知障害の運⽤訓練
    l 未知障害の検出 etc.
    Stageで実施
    ・本番影響なし
    ・本番差異(データ等)
    etc.
    Productionで実施
    ・本番データ利⽤可能
    ・SLA違反のリスク
    etc.
    IaC: Infrastructure as Code
    Chaos Engineering

    View Slide

  15. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved. 15
    JCBにおけるChaos Engineeringの取り組み
    1. Stageでの導⼊に向けたChaos Engineering PoC
    2. Stageで⼤規模化 & 経験を積む
    3. Stageで⾃動化を組み込んだ⾼頻度化
    4. ProductionでサービスのSLOに基づいた実践
    今ココ
    ※ SLO: Service Level Objective
    Chaos Engineering

    View Slide

  16. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved. 16
    ● Fault Injection(障害注⼊)
    ○ Open Source Software
    ■ Chaos Monkey
    ■ Chaos Mesh
    ■ Litmus
    ■ Chaos Blade etc.
    ○ Managed Service
    ■ Gremlin
    ■ AWS Fault Injection Simulator etc.
    ● Observability(可観測)
    ...
    Chaos Engineering

    View Slide

  17. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved.
    Chaos Mesh
    17

    View Slide

  18. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved. 18
    Chaos Mesh
    Chaos Mesh
    l CNCF Sandbox project
    l PingCAP社社のTiDBテストツールが起源
    l Ease to Use
    p リッチなGUI、構築が容易 etc.
    l Design for Kubernetes
    p CustomResourceを⽤いた管理 etc.
    https://chaos-mesh.org/
    https://github.com/chaos-mesh/

    View Slide

  19. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved. 19
    多彩なNetwork障害はサービスが互いに通信して成り⽴つシステムでは魅⼒
    Network、Disk IO中⼼に様々な障害注⼊が可能
    l Network: JitterやCorrelationsを伴うDelay , Bandwidth制限
    l Disk IO: Latency, Fault, FileAttribute変更
    l Pod: Kill (Delete), Failure (Unavailable)
    Chaos Mesh

    View Slide

  20. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved.
    Node
    Node
    Node
    20
    Chaos Meshによる基本的な障害注⼊までの流れ
    出典︓https://chaos-mesh.org/docs (説明上、⼀部構成を省略)
    Kubernetes
    Service
    namespace
    kube-system
    Pod
    api-server etc.
    chaosmesh
    namespace
    chaos-
    controller-
    manager
    (Deployment/Pod)
    chaos-
    daemon
    (Daemonset/Pod)
    CPU
    Mem Disk Network
    Cloud Service
    (GCP etc.)
    ①Pod Attack
    ②Node Attack
    Custom
    Resource
    (XxChaos
    )
    Custom
    Resource
    (XxChaos
    )
    Custom
    Resource
    (XxChaos)
    ③Resources Attack
    Node経由で
    Attack
    他サービスとの
    通信障害の発⽣
    Chaos Mesh

    View Slide

  21. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved. 21
    【DEMO】
    1. ping Podから外部への通信のNetwork Partition(切断)
    2. webapp Podに対するPod Failure
    3. 発⽣させた障害のManifest(YAML)を出⼒
    Chaos Mesh
    8.8.8.8
    ping
    Pod
    webapp
    Pod
    1
    2
    3
    Kubernetes

    View Slide

  22. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved. 22

    View Slide

  23. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved.
    Node
    APL
    Pod
    APL
    Pod
    APL
    Pod
    23
    PoCを通したChaos MeshのGood Points:
    1. NetworkやKubernetesに対する多彩な障害
    2. UIで確認 → YAML出⼒で再利⽤・⾃動化へ
    3. Chaos EngineeringとServiceの管理を分離可能
    Service team
    PF team
    Anthos Service
    Mesh (Istio)
    Chaos
    Engineer
    Serviceの世界
    Chaos Engineeringの世界
    Chaos Meshのない世界
    Node
    APL
    Pod
    APL
    Pod
    APL
    Pod
    Service team
    PF team
    Anthos Service
    Mesh (Istio)
    Chaos
    Engineer
    Serviceの世界
    Chaos Engineeringの世界
    Chaos Meshのある世界
    Chaos
    Mesh
    Chaos Mesh

    View Slide

  24. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved.
    Conclusion
    24
    Ø JCBが開発するJDEPのシステムと、
    Stage環境からの段階的なChaos Engineeringの
    取り組みを紹介
    Ø Chaos Meshの導⼊により
    ü Network障害に強みを持つため
    複数のサービスが通信しあうシステムの障害に有⽤
    ü サービス開発とChaos Engineeringの実施を分離可能

    View Slide

  25. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved.
    本⽂および図表中では、「™」、「®」を明記しておりません。
    Google Cloud, GCPその他のGoogleの商標およびロゴはGoogle LLCの登録商標または商標です。
    Kubernetes, Chaos Meshその他の商標およびロゴはThe Linux Foundationの⽶国またはその他国における
    登録商標または商標です。
    TiDBはPingCAPの登録商標または商標です。
    そのほか記載されているロゴ、システム名、製品名は各社及び商標権者の登録商標または商標です。
    25

    View Slide

  26. The value of the JCB partnership
    • MONDAY 8TH MAY
    Copyright JCB Co.,Ltd. 2021 All Rights reserved.
    Thank you.
    We are hiring for business
    Let's develop together with
    JCB!
    26
    https://www.saiyo.jcb.co.jp/careerrecruit/special

    View Slide