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

Serverless—less server?

Serverless—less server?

Michael Hausenblas

September 02, 2016
Tweet

More Decks by Michael Hausenblas

Other Decks in Technology

Transcript

  1. © 2016 Mesosphere, Inc. All Rights Reserved. SERVERLESS- LESS SERVER?

    1 Michael Hausenblas | SoftwareCircus, Amsterdam | 2016-09-02
  2. © 2016 Mesosphere, Inc. All Rights Reserved. sys admin appops

    developer architect QA/test engineer data engineer/scientist
  3. © 2016 Mesosphere, Inc. All Rights Reserved. HOW WE ROLL

    … 3
  4. © 2016 Mesosphere, Inc. All Rights Reserved. BUILDING AND RELEASING

    APPS 4 dev server server VM dev dev dev ops ops ops ops container VM server VM VM container container container container ?
  5. © 2016 Mesosphere, Inc. All Rights Reserved. A SPECTRUM OF

    COMPUTE STYLES 5 serverless AWS Lambda, IFTTT function PaaS Heroku,
 GAE objects µS Docker +
 Marathon/ Kubernetes container monolith traditional
 3 tier app machine
  6. © 2016 Mesosphere, Inc. All Rights Reserved. HOW FAST CAN

    A FEATURE BE DEPLOYED? 6 serverless PaaS µS monolith agility
  7. © 2016 Mesosphere, Inc. All Rights Reserved. WHAT IS THE

    PROVISIONING EFFORT? 7 maintenance serverless PaaS µS monolith
  8. © 2016 Mesosphere, Inc. All Rights Reserved. WHAT ARE THE

    COSTS? 8 cost/unit serverless PaaS µS monolith
  9. © 2016 Mesosphere, Inc. All Rights Reserved. FROM THEORY TO

    PRACTICE 9
  10. © 2016 Mesosphere, Inc. All Rights Reserved. CONCEPT 10 •

    unit of compute: a function • dynamically allocated resources for event-driven function execution • high-level components: triggers, management, integrations triggers t integrations f management UI, CLI, API
  11. © 2016 Mesosphere, Inc. All Rights Reserved. A WORD ON

    MOTIVATION 11 https://twitter.com/patrickdebois/status/734459440603275264
  12. © 2016 Mesosphere, Inc. All Rights Reserved. AWS LAMBDA 12

    https://aws.amazon.com/lambda/
  13. © 2016 Mesosphere, Inc. All Rights Reserved. AZURE FUNCTIONS 13

    https://azure.microsoft.com/en-us/documentation/articles/functions-overview/
  14. © 2016 Mesosphere, Inc. All Rights Reserved. GOOGLE CLOUD FUNCTIONS

    14 https://cloud.google.com/functions/docs/
  15. © 2016 Mesosphere, Inc. All Rights Reserved. IRON.IO 15 https://www.iron.io

  16. © 2016 Mesosphere, Inc. All Rights Reserved. GALACTIC FOG’S GESTALT

    16 http://www.galacticfog.com/get-started
  17. © 2016 Mesosphere, Inc. All Rights Reserved. IBM OPENWHISK 17

    https://developer.ibm.com/openwhisk/
  18. © 2016 Mesosphere, Inc. All Rights Reserved. AND MANY MORE

    … 18 • http://nano-lambda.com • https://webtask.io • http://stackhut.com • http://www.open-lambda.org
  19. © 2016 Mesosphere, Inc. All Rights Reserved. ROLL YOUR OWN:

    FLOCK-OF-BIRDS 19 https://github.com/mhausenblas/fob client /api/gen /api/call/$fid /api/stats dispatcher drivers Python Node.js ... HTTP POST .py HTTP GET $fid $fid
  20. © 2016 Mesosphere, Inc. All Rights Reserved. WHEN AND HOW

    TO USE SERVERLESS 20
  21. © 2016 Mesosphere, Inc. All Rights Reserved. APPLICATION AREAS 21

    • Infrastructure tasks, e.g. reacting to an event triggered from cloud storage • Mobile and IoT apps: process events such as a user check • Image processing, for examples to create preview versions of an image • Data processing, like simple ETL pipelines to pre-process datasets
  22. © 2016 Mesosphere, Inc. All Rights Reserved. USE CASE: IMAGE

    THUMBNAILS 22 https://aws.amazon.com/solutions/case-studies/the-seattle-times/
  23. © 2016 Mesosphere, Inc. All Rights Reserved. USE CASE: TELETEXT.IO

    23 https://medium.com/teletext-io-blog/a-serverless-architecture-with-zero-maintenance-and-infinite-scalability-b00c2ceb4c2b
  24. © 2016 Mesosphere, Inc. All Rights Reserved. USE CASE: CALCULATING

    LINEUPS FOR A FANTASY GAME 24 https://fmlnerd.com/2016/08/16/30k-page-views-for-0-21-a-serverless-story/
  25. © 2016 Mesosphere, Inc. All Rights Reserved. SOME MORE USE

    CASES … 25 • Migration of an email marketing tool for small business
 http://microapps.com/blog/serverless-framework/ • Continuous Deployments
 https://hackernoon.com/continuous-deployments-with-serverless-v0-5-c29138d6debf • Ticketing system
 https://blog.snap-ci.com/blog/2016/05/30/serverless-architecture-aws-lambda-dynamodb-applauze/ • iRobots IoT service
 http://www.slideshare.net/ServerlessConf/ben-kehoe-serverless-architecture-for-the-internet-of-things • Replacing cron jobs
 http://www.slideshare.net/AmazonWebServices/cmp407-lambda-as-cron-scheduling-invocations-in- aws-lambda • Fetch nearby Pokemon Go data
 https://github.com/jch254/pokego-serverless
  26. © 2016 Mesosphere, Inc. All Rights Reserved. WHEN AND HOW

    NOT TO USE SERVERLESS 26
  27. © 2016 Mesosphere, Inc. All Rights Reserved. CHALLENGES 27 •

    workload fit • developing functions • monitoring • stateful services • cultural and organizational issues
  28. © 2016 Mesosphere, Inc. All Rights Reserved. latency critical
 high

    frequency access latency tolerant
 high frequency access latency critical
 low frequency access latency tolerant
 low frequency access LATENCY VS. ACCESS FREQUENCY 28 access frequency latency sensitivity
  29. © 2016 Mesosphere, Inc. All Rights Reserved. DEVELOPING FUNCTIONS 29

    • local development? • testing • version control • what about many functions?
  30. © 2016 Mesosphere, Inc. All Rights Reserved. MONITORING 30 •

    troubleshooting • logging • alerting
  31. © 2016 Mesosphere, Inc. All Rights Reserved. STATEFUL SERVICES 31

  32. © 2016 Mesosphere, Inc. All Rights Reserved. 32 appops The

    person who writes an app is also the person responsible for operating the app in prod.
  33. © 2016 Mesosphere, Inc. All Rights Reserved. 33 It's not

    about provisioning, capacity planning, DR, etc.
 
 … this would be on the infrastructure team. appops
  34. © 2016 Mesosphere, Inc. All Rights Reserved. 34 appops speakerdeck.com/charity/devops-for-developers-building-an-effective-ops-org-1

  35. © 2016 Mesosphere, Inc. All Rights Reserved. Q & A

    35 • @mhausenblas • mhausenblas.info • michael@dcos.io https://dcos.io