Kubernetes拡張を利用した自作Autoscalerで実現するストレスフリーな運用の世界

08a2492de1a41c4f836ecf34d9555828?s=47 mayusy
July 22, 2019

 Kubernetes拡張を利用した自作Autoscalerで実現するストレスフリーな運用の世界

08a2492de1a41c4f836ecf34d9555828?s=128

mayusy

July 22, 2019
Tweet

Transcript

  1. 2.

    c1SPpMF ‣ ࢁຊ ·Ώ(@mayusy) ‣ גࣜձࣾCyberagent ΞυςΫຊ෦(2018.06~) ‣ Software Engineer

    ओʹಈը޿ࠂͷ഑৴ϓϥοτϑΥʔϜ౳Λ։ൃ ‣ Go/ C#/ Kubernetes/ alcohol /PX d $ZCFSBHFOUΞυςΫຊ෦ʹ+PJO d ৽ଔͰ๭4ࣾʹ+PJO  ࣗ࡞"VUPTDBMFS։ൃ
  2. 19.

    ᶇHuman Bigtable Scaler (ਓྗ)ʹΑͬͯ
 NodeΛखಈͰ௥Ճ $MPVE#JHUBCMF HPA Subscriber Subscriber Subscriber

    Publisher $MPVE1VC4VC ‣֎෦ʹϦΫΤετΛૹ৴͢ΔॲཧΛ൐͏Subscriberʹͯ c͜ͷͱ͖ϓϩμΫτͰى͖͍ͯͨ໰୊
  3. 23.

    Bigtableʹ͸Ϧιʔεత ͳ༨༟͕͋Δ $MPVE#JHUBCMF HPA Subscriber Subscriber Subscriber Publisher $MPVE1VC4VC ‣֎෦ʹϦΫΤετΛૹ৴͢ΔॲཧΛ൐͏Subscriberʹͯ

    Subscriberෆ଍ʹΑΓ ϝοηʔδͷॲཧ͕஗Ԇ c೚ҙͷϝτϦΫεىҼͰ1PEΛεέʔϧ͍ͨ͠ CPU/RAMෛՙ͕ߴ͍Θ͚Ͱ͸ͳ͍ͷͰ σϑΥϧτͰ͸Φʔτεέʔϧ͠ͳ͍
  4. 24.

    Bigtableʹ͸Ϧιʔεత ͳ༨༟͕͋Δ $MPVE#JHUBCMF HPA Subscriber Subscriber Publisher Subscriber $MPVE1VC4VC ‣֎෦ʹϦΫΤετΛૹ৴͢ΔॲཧΛ൐͏Subscriberʹͯ

    Human Pod Autoscaler (ਓྗ)ʹΑͬͯ PodΛεέʔϧ c೚ҙͷϝτϦΫεىҼͰ1PEΛεέʔϧ͍ͨ͠ Subscriber ϦΫΤετ਺౳ΛτϦΨʔ ͱͯ͠TDBMF͍ͨ͠
  5. 25.

    Bigtableʹ͸Ϧιʔεత ͳ༨༟͕͋Δ $MPVE#JHUBCMF HPA Subscriber Subscriber Publisher Subscriber $MPVE1VC4VC ‣֎෦ʹϦΫΤετΛૹ৴͢ΔॲཧΛ൐͏Subscriberʹͯ

    Human Pod Autoscaler (HPA)ʹΑͬͯ PodΛεέʔϧ c೚ҙͷϝτϦΫεىҼͰ1PEΛεέʔϧ͍ͨ͠ Subscriber ͜͜Ͱ΋ਓྗͷ࡞ۀ͕සൟʹൃੜ͢ΔΑ͏ʹͳͬͯ͠·ͬͨͨΊɼ ೚ҙͷϝτϦΫεͰͷ1PEͷ"VUPTDBMFS͕ඞཁͱͳͬͨ
  6. 31.

    Gemini Resource 1 Gemini … Gemini Resource 2 Gemini Resource

    3 ‣TDBMFઃఆͷऔಘ w$VTUPN$POUSPMMFSͷ$POUSPMMPPQͷதͰܧଓతʹऔಘ w֤(FNJOJ3FTPVSDF͝ͱʹεέʔϧର৅΍NJONBY஋ͷઃఆ͕Մೳ
  7. 33.

    ‣ $VTUPNSFTPVSDF΁ͷओͳઃఆ߲໨ #JHUBCMFTDBMFฤ  w ؂ࢹର৅ͷJOTUBODFOBNF DMVTUFSOBNF w /PEF਺ͷNJONBY஋ w

    TDBMFͷτϦΨʔͱ͍ͨ͠ΞϥʔτͷϙϦγʔ*% BQJ7FSTJPOBVUPTDBMFSDZCFSBHFOUDPKQWCFUB LJOEHFNJOJDVTUPNSFTPVSDF໊ NFUBEBUB MBCFMT DPOUSPMMFSUPPMTLTJP OBNFHFNJOJTBNQMF TQFD DMVTUFS/BNFYYYYYYYYYY JOTUBODF/BNFYYYYYYYYYY NBY/PEFT NJO/PEFT QPMJDZ*EYYYYYYYYYYTUBDLESJWFS্ͰϙϦγʔ͝ͱʹৼΒΕΔ*% ઃఆྫ
  8. 34.

    ‣ $VTUPNSFTPVSDF΁ͷओͳઃఆ߲໨ 1PETDBMFฤ  w ؂ࢹର৅ͷEFQMPZNFOUOBNF w 3FQMJDB਺ͷNJONBY஋ w TDBMFͷτϦΨʔͱ͍ͨ͠ΞϥʔτͷϙϦγʔ*%

    BQJ7FSTJPOBVUPTDBMFSDZCFSBHFOUDPKQWCFUB LJOEHFNJOJDVTUPNSFTPVSDF໊ NFUBEBUB MBCFMT DPOUSPMMFSUPPMTLTJP OBNFHFNJOJTBNQMF TQFD EFQMPZNFOU/BNFYYYYYYYYYY NBY3FQMJDBT NJO3FQMJDBT QPMJDZ*EYYYYYYYYYYTUBDLESJWFS্ͰϙϦγʔ͝ͱʹৼΒΕΔ*% ઃఆྫ
  9. 48.
  10. 49.
  11. 52.

    ‣ ྑ͔ͬͨ఺ w εύΠΫ൑ఆ౳ɼಠࣗͷεέʔϧ൑ఆج४ͷಋೖ͕Մೳɽ w εέʔϧτϦΨʔΛॊೈʹ௥ՃͰ͖Δɽ w ྫɿؔ࿈͢ΔଞαʔϏεͷϦΫΤετ૿ՃΛࣗαʔϏεͷTDBMFPVUτϦΨʔʹ͢Δɽ ‣ ۤ࿑ͨ͠఺

    w τϦΨʔΛ૿΍͢͜ͱͰɼ$POUSPMMFSͷεέʔϧϩδοΫ͕ෳࡶʹͳΔɽ w ҆ఆͨ͠εέʔϧϩδοΫʹ͢ΔͨΊʹௐ੔ͱվળΛ܁Γฦ͢ඞཁ͕͋ΔͨΊɼ҆ఆՔಈ Ͱ͖ΔϨϕϧʹͳΔ·Ͱʹ͸खؒͱ͕͔͔࣌ؒΔɽ cࣗ࡞"VUPTDBMFSͷ։ൃΛऴ͑ͯ
  12. 53.