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

AWS DevDay 2020 - C-8: レジェンドシステムをEC2からKubernetesに置き換える戦い #AWSDevDay

Kouta Ozaki
October 20, 2020

AWS DevDay 2020 - C-8: レジェンドシステムをEC2からKubernetesに置き換える戦い #AWSDevDay

#AWSDevDay

Kouta Ozaki

October 20, 2020
Tweet

More Decks by Kouta Ozaki

Other Decks in Programming

Transcript

  1. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    C-8: ϨδΣϯυγεςϜΛEC2͔Β
    Kubernetesʹஔ͖׵͑Δઓ͍
    ඌ࡚ ߞଟ
    Chatworkגࣜձࣾ

    View Slide

  2. ొஃऀ঺հ
    2
    ▸ Kouta Ozaki @k_kinzal k-kinzal
    ▸ Chatwork, YAML Engineer

    View Slide

  3. Chatworkͱ͸
    3
    ޮ཰తʹ৘ใڞ༗Ͱ͖Δ
    άϧʔϓνϟοτ
    ࢓ࣄͷݟ͑ΔԽ͕Ͱ͖Δ
    λεΫ؅ཧ
    ݟམͱ͕͠ͳ͘ͳΔ
    ϑΝΠϧڞ༗
    ͍ͭͰ΋ձ͕ٞͰ͖Δ
    ϏσΦ/Ի੠௨࿩

    View Slide

  4. Chatwork͸೔ຊ࠷େڃͷϏδωενϟοταʔϏε
    4

    ϦϦʔε
    28.5ສࣾ

    ಥഁʂ
    20ສࣾ

    ಥഁʂ
    ಋೖࣾ਺28.5ສࣾΛಥഁʂ

    (2020೥09݄຤೔࣌఺)
    10ສࣾ

    ಥഁʂ

    View Slide

  5. 01
    ϨδΣϯυγεςϜͱ͸

    View Slide

  6. ϨδΣϯυγεςϜͱ͸
    6
    ChatworkΛࢧ͑ଓ͚ͨPHPͷڊେͳϞϊϦε

    View Slide

  7. 02
    Chatwork͸ͳͥEKS΁ͷஔ͖׵͑Λܾஅͨ͠ͷ͔

    View Slide

  8. Chatwork͸ͳͥEKS΁ͷஔ͖׵͑Λܾஅͨ͠ͷ͔
    8
    100 PR / month
    ʢ2017೥࣌఺ʣ

    View Slide

  9. Chatwork͸ͳͥEKS΁ͷஔ͖׵͑Λܾஅͨ͠ͷ͔
    9
    5~10% rollback
    ʢ2017೥࣌఺ʣ

    View Slide

  10. Chatwork͸ͳͥEKS΁ͷஔ͖׵͑Λܾஅͨ͠ͷ͔
    10

    View Slide

  11. VERIFY
    FIX
    IDENTIFY
    Chatwork͸ͳͥEKS΁ͷஔ͖׵͑Λܾஅͨ͠ͷ͔
    11
    DETECT
    MTTR
    MTTI
    MTTD

    View Slide

  12. Chatwork͸ͳͥEKS΁ͷஔ͖׵͑Λܾஅͨ͠ͷ͔
    12

    View Slide

  13. Chatwork͸ͳͥEKS΁ͷஔ͖׵͑Λܾஅͨ͠ͷ͔
    13

    View Slide

  14. Chatwork͸ͳͥEKS΁ͷஔ͖׵͑Λܾஅͨ͠ͷ͔
    14

    View Slide

  15. Chatwork͸ͳͥEKS΁ͷஔ͖׵͑Λܾஅͨ͠ͷ͔
    15
    https://blog-ja.chatwork.com/2017/06/chatworkaws-dev-day.html

    View Slide

  16. Chatwork͸ͳͥEKS΁ͷஔ͖׵͑Λܾஅͨ͠ͷ͔
    16
    1.ঢ়ଶΛ࣋ͨͳ͍
    2.ߴ଎ͳೖΕସ͑

    View Slide

  17. 03
    EC2͔ΒEKS΁ͷҠߦઓུ

    View Slide

  18. 18
    ?
    Golden AMI
    ϨδΣϯυγεςϜͷ࢓༷Խ

    View Slide

  19. ϨδΣϯυγεςϜͷ࢓༷Խ
    19
    Golden AMI
    PHP-FPM
    NGINX
    ...
    Serverspec
    Infrataster

    View Slide

  20. ϨδΣϯυγεςϜͷ࢓༷Խ
    20
    New AMI
    ...
    ...
    ...
    Old AMI
    Ansible
    Serverspec
    ...
    ...
    ...
    Packer

    View Slide

  21. EC2͔ΒEKS΁ͷ੾Γସ͑ํ๏
    21

    View Slide

  22. EKSͷΞοϓάϨʔυઓུ
    22

    View Slide

  23. 04
    EKS্ʹߏஙͨ͠ΞϓϦέʔγϣϯͷߏ੒

    View Slide

  24. EKS্ʹߏஙͨ͠ΞϓϦέʔγϣϯͷߏ੒
    24

    View Slide

  25. EKS্ʹߏஙͨ͠ΞϓϦέʔγϣϯͷϦϦʔεϑϩʔ
    25

    View Slide

  26. 05
    Ҡߦʹͱ΋ͳ͏ChatworkͷαʔϏεఀࢭࣄྫ

    View Slide

  27. 5%ϦϦʔεࣄ݅
    27
    Weight: 5 Weight: 5
    = 50%!?

    View Slide

  28. 400k rpmͷ߈๷
    28

    View Slide

  29. 400k rpmͷ߈๷
    29

    View Slide

  30. DNSͷ໰͍߹ΘͤΤϥʔ
    30

    View Slide

  31. DNSͷ໰͍߹ΘͤΤϥʔ
    31

    View Slide

  32. ALB Ingress ControllerͱAPI Call Limitͷઓ͍
    32

    View Slide

  33. 06
    ·ͱΊ

    View Slide

  34. ·ͱΊ
    1. ϨδΣϯυ͸ίπίπటष͘΍Δ͔͠ͳ͍
    2. ίπίπ΍Εͳ͚Ε͹ࢮ͵
    34

    View Slide

  35. ಇ͘Λ΋ͬͱָ͘͠ɺ૑଄తʹ

    View Slide