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

what is Cloud Run?

what is Cloud Run?

shogomuranushi

July 05, 2019
Tweet

More Decks by shogomuranushi

Other Decks in Programming

Transcript

  1. Cloud RunͬͯͳΜ΍ͶΜ
    Cloud Native Kansai #4
    Shogo Muranushi

    View full-size slide

  2. Shogo Muranushi
    ABEJA, Inc.
    - ABEJA Platform Product Owner
    - Lead Infrastructure Engineer

    View full-size slide

  3. ࡢ೥ͷ͋Δ೔

    View full-size slide

  4. αʔϏεͷಛੑʹ߹Θͤͯ։ൃ͍ͯͨ͠
    • ʮͪΐͬͱͨ͠ॲཧ͚ͩͩ͠େͯ͠Քಇ͠ͳ͍͠FaaSͰ૊Ή͔ʯ
    • ʮॲཧྔଟ͍͠αʔόϨεͩͱߴ͘ͳΔ͔ΒίϯςφͰ࡞Δ͔ʯ
    or

    View full-size slide

  5. ͕࣌ؒܦա
    • ʮϦΫΤετྔ͕૿͑ͯɺFaaSͰ૊Μͩͱ͜Ζͷॲཧ͕૿Ճʂ՝ֹۚ
    ͕ΤϥΠ͜ͱʹʂʂ͜͜ͷॲཧ͸Lambda͔Βίϯςφʹม͑Α͏ʯ
    • ʮίϯςφͰ࡞͚ͬͨͲɺػೳ͕ॖୀ͖ͯͯ͋͠·Γ࢖ΘΕ͍ͯͳ͍
    ͔Βৗ࣌ىಈࣙΊ͍ͨɻLambdaͰॻ͖௚͢ʁʯ

    View full-size slide

  6. ͔ͯ
    • ͳΜͰॻ͖௚͞ͳ͔͋ΜͶΜɻ࣌ؒ໪ମͳ͍Θ
    • ϫʔΫϩʔυʹ߹ΘͤͯόοΫΤϯυͷΠϯϑϥ͕উखʹ੾Γସ
    Θͬͯ͘ΕͨΒ࠷ߴͳͷʹ
    • Զ͸αʔόϨεͱίϯςφͷྑ͍ͱ͜Ζ͚ͩͷԸܙΛड͚͍ͨ

    View full-size slide

  7. ࡢ೥ՆʹKnative͕஀ੜͨ͠

    View full-size slide

  8. Knativeͱ͸
    • Kubernetesͷ্ͰαʔόϨεϥΠΫͳ؀ڥΛ࡞ΕΔ
    • ϦΫΤετϕʔεͰίϯςφ͕ىಈ͢Δ Serving
    • ΠϕϯτۦಈͰॲཧ͢Δ Eventing
    • ιʔείʔυ͔ΒίϯςφʹϏϧυ͢Δ Build

    View full-size slide

  9. FaaSͱ͸Կ͕ҧ͏ʁ
    • มΘΒͳ͍ͱ͜Ζ
    • ϦΫΤετ͕དྷͨΒ Compute ͕ىಈͯ͠ɺҰఆظؒϦΫΤετ͕ແ͍ͱ
    ఀࢭ͢Δ

    View full-size slide

  10. FaaSͱ͸Կ͕ҧ͏ʁ
    • ίϯςφͳͷͰ੍໿͕গͳ͍
    • ݴޠɺϖΠϩʔυαΠζɺॲཧ࣌ؒɺϦιʔεɺin VPCͳͲ
    • KubernetesΤίγεςϜͷԸܙΛड͚΍֦͘͢ுੑ͕ߴ͍
    • KubernetesͳͲͷΠϯϑϥ؅ཧෆཁͳͷͰָ
    • EC2ͳͲ΋ෆཁͳͷͰɺϦιʔεͷແବ͕ͳ͍҆͘

    View full-size slide

  11. Ͳ͕ͬͪྑ͍ͷʁʢྫʣ
    • ࠓޙͷ։ൃείʔϓͰ੍໿ͷதͰ໰୊ແ͍ͳΒ FaaS
    • ੍໿ͷதͰे෼ॲཧͰ͖Δ
    • FaaSͷࢥ૝ʹϚον͢ΔਓࡐΛ֬อͰ͖Δ
    • ͱΓ͋͑ͣϓϩτλΠϓ͔ͩΒ
    • KubernetesγϯυΠ
    • ࠓޙͷ։ൃείʔϓͰ੍໿͕ݫ͘͠ͳΓͦ͏ͳΒ Knative
    • ίϯςφͳͷͰ੍໿͸গͳ͍
    • ίϯςφͳͷͰɺΞϓϦͷมߋͳ͘ޙͰ೗Կ༷ʹͰ΋ߏ੒Λม͑ΒΕΔ

    View full-size slide

  12. ·ͩ଍Γͳ͍
    • ʮKubernetesͷӡ༻ʹ׳Ε͖͔ͯͨΒྑ͍͚Ͳɺग़དྷΕ͹Πϯϑϥ
    ͷ໘౗΋ݟͨ͘ͳ͍ΜͩΑͳʯ

    View full-size slide

  13. ࠓ೥ͷय़ʹCloud Run͕஀ੜͨ͠

    View full-size slide

  14. Do you know Cloud Run ?
    • ஌Βͳ͍
    • ஌ͬͯΔ͚Ͳɺ৮ͬͨ͜ͱͳ͍
    • ৮ͬͨ͜ͱ͋Δ
    • ࢖͍ͬͯΔ

    View full-size slide

  15. ͭ·ΓɺCloud Run ʹ Full Managed Knative
    • Πϯϑϥͷ؅ཧෆཁͳίϯςφͷͨΊͷαʔόϨεج൫
    • ՝ۚମܥ΋FaaSͱಉ͡
    • FaaSͱίϯςφͷ͍͍ͱ͜औΓ
    • ͨͩ͠ൃల్্ͷͨΊ·ͩػೳ͸গͳ͍
    ʴ =

    View full-size slide

  16. Cloud Runͷಛ௃

    View full-size slide

  17. Cloud Runͷಛ௃
    • Serverless Container
    • Request driven workload
    • Scale to zero
    • Event driven workload
    • Scale to zero
    • Full Managed / Multi-zone
    • Container
    • Any Language
    • Any Library
    • Any Binary
    • Ecosystem of base images

    View full-size slide

  18. Concurrency = 1
    Concurrency = 80
    ඞཁͳΠϯελϯε͕গͳ͍
    ίʔϧυελʔτͷස౓͕௿͍

    View full-size slide

  19. LambdaͳͲͷFaaSͷ৔߹
    ฒྻ෼͚ͩ՝ۚ
    Cloud Runͷ৔߹
    ฒྻ෼͚ͩ՝ۚ͞Εͳ͍

    View full-size slide

  20. 80ฒྻͷίϯςφ
    ྘͸ϦΫΤετ਺
    ੨͸ϨΠςϯγ
    0୆ͷঢ়ଶ͔Β
    60ඵؒͰ15,000ΫϥΠΞϯτ
    80ສҎ্ͷϦΫΤετΛୡ੒

    View full-size slide

  21. Cloud Run͕ࠓͰ͖ͳ͍͜ͱ
    • Max: 1vCPU / 2GB RAM
    • GPUඇରԠ
    • CloudSQLඇରԠʢComming Soonʣ
    • VPCඇରԠʢComming Soonʣ
    • άϩʔόϧϩʔυόϥϯαʔඇରԠ
    • Knativaͷyamlఆٛ͸ඇରԠʢ2019೥தରԠ༧ఆʣ
    • gRPCඇରԠ
    • άϩʔόϧαʔϏεͰ͸ͳ͍ɻϦʔδϣφϧαʔϏε
    • gVisorΛར༻͍ͯ͠ΔͨΊະ࣮૷ͷγεςϜίʔϧ͕͋Δ͔΋

    View full-size slide

  22. • AWS Lambda, GCP Cloud FunctionͳͲɺ࣮૷͕όϥόϥʹͳ͍ͬͯΔ
    ͨΊ։ൃऀͷख͕ؒ૿͍͑ͯΔ
    • ͦͷͨΊCNCFΛத৺ͱͯ͠CloudEventsͱ͍͏αʔόϨεͷEventॲཧ
    ͷΠϯλʔϑΣΠεΛඪ४ن֨Խ࢝͠Ίͨ
    • CNCF͸ͦΕҎ֎΋ίϯςφΛத৺ʹଟ਺ͷඪ४ԽΛਐΊ͍ͯΔɻ

    αʔόϨεͱίϯςφͷϫʔΫϩʔυͷڥ໨ͷKnativeͳͲʹΑͬͯແ
    ͘ͳΔͷͰ͸

    View full-size slide

  23. ͪΌͿ୆͕མͪண͘೔΋͍ۙ

    View full-size slide

  24. ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠

    View full-size slide