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

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

mayusy
July 22, 2019

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

mayusy

July 22, 2019
Tweet

Other Decks in Technology

Transcript

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

    ओʹಈը޿ࠂͷ഑৴ϓϥοτϑΥʔϜ౳Λ։ൃ ‣ Go/ C#/ Kubernetes/ alcohol /PX d $ZCFSBHFOUΞυςΫຊ෦ʹ+PJO d ৽ଔͰ๭4ࣾʹ+PJO  ࣗ࡞"VUPTDBMFS։ൃ
  2. ᶇHuman Bigtable Scaler (ਓྗ)ʹΑͬͯ
 NodeΛखಈͰ௥Ճ $MPVE#JHUBCMF HPA Subscriber Subscriber Subscriber

    Publisher $MPVE1VC4VC ‣֎෦ʹϦΫΤετΛૹ৴͢ΔॲཧΛ൐͏Subscriberʹͯ c͜ͷͱ͖ϓϩμΫτͰى͖͍ͯͨ໰୊
  3. Bigtableʹ͸Ϧιʔεత ͳ༨༟͕͋Δ $MPVE#JHUBCMF HPA Subscriber Subscriber Subscriber Publisher $MPVE1VC4VC ‣֎෦ʹϦΫΤετΛૹ৴͢ΔॲཧΛ൐͏Subscriberʹͯ

    Subscriberෆ଍ʹΑΓ ϝοηʔδͷॲཧ͕஗Ԇ c೚ҙͷϝτϦΫεىҼͰ1PEΛεέʔϧ͍ͨ͠ CPU/RAMෛՙ͕ߴ͍Θ͚Ͱ͸ͳ͍ͷͰ σϑΥϧτͰ͸Φʔτεέʔϧ͠ͳ͍
  4. Bigtableʹ͸Ϧιʔεత ͳ༨༟͕͋Δ $MPVE#JHUBCMF HPA Subscriber Subscriber Publisher Subscriber $MPVE1VC4VC ‣֎෦ʹϦΫΤετΛૹ৴͢ΔॲཧΛ൐͏Subscriberʹͯ

    Human Pod Autoscaler (ਓྗ)ʹΑͬͯ PodΛεέʔϧ c೚ҙͷϝτϦΫεىҼͰ1PEΛεέʔϧ͍ͨ͠ Subscriber ϦΫΤετ਺౳ΛτϦΨʔ ͱͯ͠TDBMF͍ͨ͠
  5. Bigtableʹ͸Ϧιʔεత ͳ༨༟͕͋Δ $MPVE#JHUBCMF HPA Subscriber Subscriber Publisher Subscriber $MPVE1VC4VC ‣֎෦ʹϦΫΤετΛૹ৴͢ΔॲཧΛ൐͏Subscriberʹͯ

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

    3 ‣TDBMFઃఆͷऔಘ w$VTUPN$POUSPMMFSͷ$POUSPMMPPQͷதͰܧଓతʹऔಘ w֤(FNJOJ3FTPVSDF͝ͱʹεέʔϧର৅΍NJONBY஋ͷઃఆ͕Մೳ
  7. ‣ $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. ‣ $VTUPNSFTPVSDF΁ͷओͳઃఆ߲໨ 1PETDBMFฤ  w ؂ࢹର৅ͷEFQMPZNFOUOBNF w 3FQMJDB਺ͷNJONBY஋ w TDBMFͷτϦΨʔͱ͍ͨ͠ΞϥʔτͷϙϦγʔ*%

    BQJ7FSTJPOBVUPTDBMFSDZCFSBHFOUDPKQWCFUB LJOEHFNJOJDVTUPNSFTPVSDF໊ NFUBEBUB MBCFMT DPOUSPMMFSUPPMTLTJP OBNFHFNJOJTBNQMF TQFD EFQMPZNFOU/BNFYYYYYYYYYY NBY3FQMJDBT NJO3FQMJDBT QPMJDZ*EYYYYYYYYYYTUBDLESJWFS্ͰϙϦγʔ͝ͱʹৼΒΕΔ*% ઃఆྫ
  9. ‣ ྑ͔ͬͨ఺ w εύΠΫ൑ఆ౳ɼಠࣗͷεέʔϧ൑ఆج४ͷಋೖ͕Մೳɽ w εέʔϧτϦΨʔΛॊೈʹ௥ՃͰ͖Δɽ w ྫɿؔ࿈͢ΔଞαʔϏεͷϦΫΤετ૿ՃΛࣗαʔϏεͷTDBMFPVUτϦΨʔʹ͢Δɽ ‣ ۤ࿑ͨ͠఺

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