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

何故私達はサーバレスアプリケーションをイベントドリブンで作るべきなのか / Why shoul...

何故私達はサーバレスアプリケーションをイベントドリブンで作るべきなのか / Why should we make serverless application as event driven?

Avatar for Masashi Terui

Masashi Terui

May 24, 2018
Tweet

More Decks by Masashi Terui

Other Decks in Technology

Transcript

  1. SERVERWORKS CO.,LTD. + FREELANCER • Serverless Oji-san • Serverless Framework

    Plugin Developer • Serverlessconf Tokyo 2016/2017 speaker • Remote worker (in Sapporo) • The best Cloud Engineer in Hokkaido!! (Ͱ͋Γ͍ͨʣ MASASHI TERUI ARCHITECT / DEVELOPER
  2. CNCF SERVERLESS WHITEPAPER V1.0 • Serverless computing refers to the

    concept of building and running applications that do not require server management • A platform may provide one or both of the following: • Functions-as-a-Service (FaaS) • Backend-as-a-Service (BaaS) • Products or platforms deliver the following benefits to developers: • Zero Server Ops • No Compute Cost When Idle 
 https://github.com/cncf/wg-serverless/tree/master/whitepaper
  3. SERVERLESS USE CASES (FROM CNCF WP) • Asynchronous, concurrent, easy

    to parallelize into independent units of work • Infrequent or has sporadic demand, with large, unpredictable variance in scaling requirements • Stateless, ephemeral, without a major need for instantaneous cold start time • Highly dynamic in terms of changing business requirements that drive a need for accelerated developer velocity • Non-HTTP-centric and non-elastic scale workloads that weren’t good fits for an IaaS, PaaS, or CaaS solution
  4. ΋͏͢͜͠ৄ͘͠ • Pub/Subͷؔ܎ • Publisher͸ൃߦ͢΂͖Πϕϯτ͚ͩΛ஌͍ͬͯΔ • Subscriber͸ߪಡ͢΂͖Πϕϯτ͚ͩΛ஌͍ͬͯΔ • ґଘؔ܎ΛૄͰ͋Γͳ͕Βू໿ɺ੔ཧͰ͖Δ •

    ͜ͷؔ܎͸ٯస͠ͳ͍ͨΊɺྲྀΕ͕෼͔Γ΍͘͢ͳΔ • ࣗવͱඇಉظʹͳΔ • ඇಉظͰ͋Δͱ͍͏͜ͱ͸ϦτϥΠՄೳͰ͋Δͱ͍͏͜ͱ
  5. Simple Nortification Service (SNS) • PushܕΠϕϯτιʔεͷ୅ද֨ • 1:NͷN͕ଟ͘ͳΔέʔεʹڧ͍ (Fanout) •

    ͚ͬ͜͏୔ࢁ࢖͏ͷͰ
 Serverless Frameworkͱ͔࢖Θͳ͍ͱઃఆ͕͠ΜͲ͍
  6. ʢ͓·͚ʣLambda -> Lambda • جຊ΍Βͳ͍ʢࢲ͸ʣ • େମSNSڬΉ or ਺चܨ͗ʹͳΔͳΒStep FunctionsΛ࢖͏

    • 1:1͕100%อূͰ͖Δ৔߹ͷΈ࢖ͬͯ΋ྑ͍ʢ͔΋ʣ • Ͱ΋ͦΕ1FunctionͰྑ͍Μ͡Όɾɾɾ