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

SLOのある生活を始めよう

 SLOのある生活を始めよう

More Decks by 株式会社ビットキー / Bitkey Inc.

Other Decks in Technology

Transcript

  1. ·ͩ SLO Λಋೖ͍ͯ͠ͳ͍ਓ޲͚ͷϙΠϯτ • SLO͕Կʹ໾ʹཱͭͷ͔ɺͲ͏΍ͬͯ SLO ͷ͋Δੜ׆Λ࢝ΊΕ͹ྑ͍͔ ◦ ۩ମతʹγϯϓϧʹ SLO

    Λಋೖ͢Δํ๏Λ঺հ
 ͢Ͱʹ SLO Λಋೖ͍ͯ͠Δਓ޲͚ͷϙΠϯτ • ࠷ޙͷํʹ੔ཧ͢ΔSLO ͷӡ༻Ͱಘͨ஌ݟͱࠓޙͷల๬ ◦ 1೥ؒͷӡ༻Ͱʮ͜͏ͨ͠ํ͕ྑ͔ͬͨʯ͜ͱͳͲΛڞ༗ 2 0. ൃදͷϙΠϯτ
  2. Outline 1. ࣗݾ঺հ/bitkey platform ͷ঺հ 2. platform ͱͯ͠ٻΊΒΕͨ͜ͱ 3. SLO

    ΛܾΊΑ͏ʂ 4. SLO Λӡ༻͠Α͏ʂ 5. ·ͱΊ + α 3 3
  3. ϏοτΩʔ΁ೖࣾ ࠷ॳͷ੡඼ϦϦʔεͱ΄΅ಉ࣌ظʹೖࣾ “ΧΪ” ͷϓϥοτϑΥʔϜ: bitkey platform ͷ։ൃΛ ୲౰( “Bitkey ϩάΠϯ”

    ػೳͷ։ൃͳͲ ) ERPϕϯμ΁ೖࣾ ERPͷձܭϞδϡʔϧ։ൃʹ഑ଐ ػೳͷఏҊɾઃܭɾ࣮૷Λ୲౰ ϞδϡʔϧશମͷCIͷ؅ཧΛ୲౰ ߴڮ యੜ Takahashi Noriki 2016 2017 2019 FinTech ܥελʔτΞοϓͰΠϯλʔϯγοϓ ӈ΋ࠨ΋Θ͔Βͳ͍ͳ͕Βɺe-Tax ͷϝοηʔδ֬ ೝػೳͳͲΛ࣮૷ ΤϯδχΞͱͯ͠ͷ࠷ॳͷҰา 2021 bitkey platform ͷ։ൃ/อकɾӡ༻ ࠷ॳͷϦϦʔε͔Β໿2೥ͨͬͨ bitkey platform Λ ΑΓ݈શͳαʔϏε։ൃΛܧଓͰ͖ΔΑ͏ʹฃಆத
  4. 1. ෯޿͘ར༻͞ΕΔplatform: bitkey platform 5 • homehub: ࣗ୐ͷΧΪ ◦ ྫ:

    bitkey platform Λར༻ͯ͠Ոͷ൶ͷσδλϧΩʔΛੜ੒ • workhub: ΦϑΟεͷΧΪ ◦ ྫ: bitkey platform Λར༻ͯ͠ΦϑΟεೖؗ༻ͷNFCΧʔυೝূͷͨΊͷ৘ใΛੜ੒ • exphub: ΠϕϯτͷΧΪ ◦ ྫ: bitkey platform Λར༻ͯ͠ϥΠϒ༻ͷإೝূͷͨΊͷ৘ใΛੜ੒ → ෯޿͘ར༻͞ΕΔ bitkey platform
  5. 25 2. platform ͱͯ͠ٻΊΒΕͨ΋ͷ ػೳ։ൃ อक ։ൃ • ΠϯγσϯτൃੜϦεΫ͕޲্ •

    Πϯγσϯτͷஹީ͕͔ͭΊͳ͍ • ΠϯγσϯτͷஹީΛ௫Μͩͱͯ͠΋ɺػೳ։ൃ͕༏ઌ͞Εͯ͠·͏
  6. 26 2. platform ͱͯ͠ٻΊΒΕͨ΋ͷ ػೳ։ൃ อक ։ൃ • ΠϯγσϯτൃੜϦεΫ͕޲্ •

    Πϯγσϯτͷஹީ͕͔ͭΊͳ͍ • ΠϯγσϯτͷஹީΛ௫Μͩͱͯ͠΋ɺػೳ։ൃ͕༏ઌ͞Εͯ͠·͏ → “ੜ͖͍͚ͯͳ͍”
  7. SLO(αʔϏεϨϕϧ໨ඪ) ͱ͸ • γεςϜͷ݈શੑͷ໨ඪج४ ◦ ݈શੑͷࢦඪͷྫ ▪ Քಇ཰(≒ Մ༻ੑ) ▪

    ύϑΥʔϚϯε ▪ … ◦ ͜ͷൃදͰ͸γϯϓϧʹ͢ΔͨΊʹɺओʹՄ༻ੑʹϑΥʔΧε ◦ ਓؒͰ͍͏ͱʮԿΛපؾͱ൑ఆ͢Δ͔ʯͷج४ͷΑ͏ͳ΋ͷ 33 2. platform ͱͯ͠ٻΊΒΕͨ΋ͷ
  8. SLO(αʔϏεϨϕϧ໨ඪ) ͱ͸ • γεςϜͷ݈શੑͷ໨ඪج४ ◦ ݈શੑͷࢦඪͷྫ ▪ Քಇ཰(≒ Մ༻ੑ) ▪

    ύϑΥʔϚϯε ▪ … ◦ ͜ͷൃදͰ͸γϯϓϧʹ͢ΔͨΊʹɺओʹՄ༻ੑʹϑΥʔΧε ◦ ਓؒͰ͍͏ͱʮԿΛපؾͱ൑ఆ͢Δ͔ʯͷج४ͷΑ͏ͳ΋ͷ 34 2. platform ͱͯ͠ٻΊΒΕͨ΋ͷ
  9. Մ༻ੑͷࢦඪͷࢉग़ํ๏ ᶃ ϨεϙϯεͷϩάΛు͖ग़͢Α͏ʹΞϓϦέʔγϣϯʹઃఆ • HTTP ͷεςʔλείʔυ͕Θ͔ΔΑ͏ʹ͓͚ͯ͠͹े෼ ᶄ ϩάΛूܭͯ͠ɺՄ༻ੑ Λܭࢉ •

    ूܭύλʔϯ ◦ [ຖ೔] ௚ۙ7೔ؒ෼Λूܭ → ࠷ۙͷ݈શੑ͕Θ͔Δ ◦ [࢛൒ظ͝ͱ] ࢛൒ظશମΛूܭ → SLO ͷ“݁Ռ”͕Θ͔Δ 67 3. SLO ΛܾΊΑ͏ʂ
  10. Մ༻ੑͷࢦඪͷࢉग़ํ๏(GCPͷҰྫ) ᶃ ϨεϙϯεͷϩάΛు͖ग़͢Α͏ʹΞϓϦέʔγϣϯʹઃఆ • Cloud Load Balancing ར༻ͳΒɺCloud Logging Ͱඪ४Ͱग़͍ͯΔͷͰ௥Ճͷઃఆෆཁ

    ᶄ ϩάΛूܭͯ͠ɺՄ༻ੑ Λܭࢉ • Cloud Logging → Cloud Monitoring ͷ࿈ܞͰ࣮ݱՄೳ 68 3. SLO ΛܾΊΑ͏ʂ Monitoring Cloud Load
 Balancing Logging
  11. Մ༻ੑͷࢦඪͷࢉग़ํ๏(GCPͷҰྫ) ᶄ ϩάΛूܭͯ͠ɺՄ༻ੑ Λܭࢉ • [஫ҙ] ίϯιʔϧը໘Ͱ͸ઃఆͮ͠Β͍ • ࢀߟࢿྉʹ͋ΔΑ͏ʹCLI͔Β΍Δͷָ͕ 69

    3. SLO ΛܾΊΑ͏ʂ ࢀߟ1: https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/sli-metrics/lb-metrics ࢀߟ2: https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/using-api#slo-create
  12. ᶃ SLO ʹج͍ͮͨߦಈ • ఆΊͨSLOʹج͍ͮͯߦಈ͢Δ ◦ SLO ʹҧ൓͍ͯ͠ͳ͍͜ͱΛ֬ೝ͢Δ ◦ SLO

    ʹҧ൓ͨ͠৔߹ʹΞΫγϣϯΛऔΔ • ຖ೔ ᶄ SLO ࣗମͷৼΓฦΓ& ߋ৽ • ఆΊͨSLOࣗମΛৼΓฦΓɺߋ৽͢Δ ◦ SLO ͸ߴ͗͢ͳ͍͔௿͗͢ͳ͍͔ ◦ SLO ͕࣮ࡍͷϢʔβʔͷظ଴஋ͱ߹͍ͬͯΔ͔ • ࢛൒ظʹ1ճ 4. SLO Λӡ༻͠Α͏ʂ 87
  13. ᶃ SLO ʹج͍ͮͨߦಈ ຖ೔΍Δ͜ͱ • SLO ʹҧ൓͍ͯ͠ͳ͍͔ΛνΣοΫ • νʔϜͷσΠϦʔMTGͰͷ࣮ࢪ͕͓͢͢Ί ۓٸ࣌ͷ४උ

    • SLO ʹҧ൓͍ͯͨ͠Βɺػೳ։ൃͳͲΛͱΊͯҧ൓ͷղফΛ࠷༏ઌʹ͢Δ • νʔϜͷ໿ଋࣄʹ͓ͯ͘͠ 4. SLO Λӡ༻͠Α͏ʂ 88
  14. ᶄ SLO ࣗମͷৼΓฦΓ& ߋ৽ • SLO ࣗମͱӡ༻ํ๏ΛৼΓฦΔ ◦ ࢛൒ظʹ1ճ ◦

    ϙΠϯτ ▪ ظؒதSLO ͸ୡ੒Ͱ͖͔ͨʁ ▪ SLO ͸ߴ͗͢ͳ͍͔ʁ௿͗͢ͳ͍͔ʁ ▪ SLO ͷӡ༻͕Ϣʔβʔͷຬ଍౓ͱਖ਼͘͠ରԠ͍ͯ͠Δ͔ʁ ▪ ࢦඪ͸ద੾͔ʁ • ৼΓฦΓΛجʹ࣍ͷSLOΛઃఆ ◦ ໨ඪΛ্͛ΔɾԼ͛Δ / ࢦඪΛ௥Ճɾ࡟আͳͲ ʮͱΓ͋͑ͣɺՄ༻ੑΛʯͱ࢝Ίͨஈ֊͔ΒঃʑʹϨϕϧΞοϓ͍ͯ͘͜͠ͱ͕Ͱ͖Δ 4. SLO Λӡ༻͠Α͏ʂ 89
  15. 1೥ؒͷӡ༻ͯ͠ಘͨ஌ݟ • ϦΫΤετ਺͕গͳ͍ঢ়ଶͰɺՄ༻ੑͷSLOͷج४Λ্͛͗ͯ͢͸͍͚ͳ͍ʂ ◦ ۃ୺ʹ͍͏ͱɺ1ݸΤϥʔ͕ى͖ͨΒ SLO ҧ൓ʹͳͬͯ͠·͏ ◦ ϦΫΤετ͕গͳ͍ঢ়ଶͰ͸ɺ99.9% →

    99.99% Ͱ͸ରͯ͠ຬ଍౓͸্͕Βͳ͍ • ಛʹࢦඪͷ஋ΛԼ͛Δ͜ͱ͕Θ͔͍ͬͯΔಛఆͷΤϯυϙΠϯτ͸ࠞͥͳ͍ʂ ◦ ಛఆͷΤϯυϙΠϯτ͕ୟ͔ΕΔස౓ͱSLOҧ൓͕௚઀తʹඥͮ͘ → ੍ޚͰ͖ͳ͍ • 4xx Τϥʔ͸Մ༻ੑͷࢦඪʹೖΕͳ͍ʂ ◦ 4xx Τϥʔ͸ฦ͠΍͍͢ͷͰɺ࣮ଶΑΓࢦඪ͕ߴ͘ग़Δ • rate limit (ΞΫηεͷྲྀྔ੍ݶ) Ͱ SLO ͸ΑΓ੍ޚ͠΍͘͢ͳΔʂ ◦ ࣾ಺αʔϏε͔ΒͷΞΫηεํ๏ʹΑͬͯɺࢦඪ͕ӨڹΛड͚΍͍͢ঢ়ଶΛආ͚Δ 4. SLO Λӡ༻͠Α͏ʂ 90
  16. ࣍ͷεςοϓ • PMF(Product Market Fit) ͷਪਐ ◦ bitkey platform →

    ࣾ಺ผαʔϏε → ΤϯυϢʔβʔ ͱ͍͏ܗʹͳΔͷͰɺΤϯυϢʔβʔͷ ຬ଍౓ͱ bitkey platform ͰऔΕΔࢦඪ(Մ༻ੑɾϨΠςϯγͳͲ)ΛରԠ෇͚͕೉͍͠ ◦ Մ༻ੑɾϨΠςϯγʹՃ͑ͯɺඞཁʹԠͯ͡ࢦඪͷ௥ՃɾվྑΛ࣮ࢪ༧ఆ 4. SLO Λӡ༻͠Α͏ʂ 91
  17. SLO ͷޮ༻ • ػೳ։ൃɾอक։ൃ(΍ӡ༻)ͷόϥϯεΛνʔϜ಺֎ͱೝࣝΛ߹ΘͤΒΕΔ • ӡ༻Λϧʔϧʹ͢Δ͜ͱͰɺଐਓԽΛ๷͗ɺνʔϜͱ݈ͯ͠શͳαʔϏε։ൃ͕Ͱ͖Δ SLO ͷ͋Δੜ׆ • ·ͣ͸ઃఆ͢Δ͜ͱ͔Β΍Δͱ͸͡Ί΍͍͢

    ◦ ໎ͬͨΒԿ΋ߟ͑ͣՄ༻ੑ99%͔Β࢝ΊΕ͹ྑ͍ ͓·͚ • SLOಋೖޙʹ᷿ͷهࣄΛݺΜͰৼΓฦΓʹ׆͔͢͜ͱͰਐԽͤ͞Δ͜ͱ͕Ͱ͖Δ • ൃදऀ΋Qiita ʹ SLO ҧ൓ࣗମΛҰఆͷ༏ઌॱҐΛकΓͭͭɺݮΒ͢ࢪࡦʹ͍ͭͯॻ͖·ͨ͠ ◦ https://qiita.com/nrnrk/items/2711d5669d7674d6cc1a 5. ·ͱΊ + α 93
  18. 94