Share
Embed
Serverless—less server?
Talk at SoftwareCircus 2016, see http://cloudnativecomputing.softwarecircus.io/schedule/serverless-less-server/
Michael Hausenblas
September 02, 2016
Transcript
35 slides
-
© 2016 Mesosphere, Inc. All Rights Reserved. SERVERLESS- LESS SERVER?
1 Michael Hausenblas | SoftwareCircus, Amsterdam | 2016-09-02 -
© 2016 Mesosphere, Inc. All Rights Reserved. sys admin appops
developer architect QA/test engineer data engineer/scientist -
© 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 ? -
© 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 -
© 2016 Mesosphere, Inc. All Rights Reserved. HOW FAST CAN
A FEATURE BE DEPLOYED? 6 serverless PaaS µS monolith agility -
© 2016 Mesosphere, Inc. All Rights Reserved. WHAT IS THE
PROVISIONING EFFORT? 7 maintenance serverless PaaS µS monolith -
© 2016 Mesosphere, Inc. All Rights Reserved. WHAT ARE THE
COSTS? 8 cost/unit serverless PaaS µS monolith -
© 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 -
© 2016 Mesosphere, Inc. All Rights Reserved. A WORD ON
MOTIVATION 11 https://twitter.com/patrickdebois/status/734459440603275264 -
© 2016 Mesosphere, Inc. All Rights Reserved. AWS LAMBDA 12
https://aws.amazon.com/lambda/ -
© 2016 Mesosphere, Inc. All Rights Reserved. AZURE FUNCTIONS 13
https://azure.microsoft.com/en-us/documentation/articles/functions-overview/ -
© 2016 Mesosphere, Inc. All Rights Reserved. GOOGLE CLOUD FUNCTIONS
14 https://cloud.google.com/functions/docs/ -
© 2016 Mesosphere, Inc. All Rights Reserved. GALACTIC FOG’S GESTALT
16 http://www.galacticfog.com/get-started -
© 2016 Mesosphere, Inc. All Rights Reserved. IBM OPENWHISK 17
https://developer.ibm.com/openwhisk/ -
© 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 -
© 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 -
© 2016 Mesosphere, Inc. All Rights Reserved. WHEN AND HOW
TO USE SERVERLESS 20 -
© 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 -
© 2016 Mesosphere, Inc. All Rights Reserved. USE CASE: IMAGE
THUMBNAILS 22 https://aws.amazon.com/solutions/case-studies/the-seattle-times/ -
© 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 -
© 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/ -
© 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 -
© 2016 Mesosphere, Inc. All Rights Reserved. WHEN AND HOW
NOT TO USE SERVERLESS 26 -
© 2016 Mesosphere, Inc. All Rights Reserved. CHALLENGES 27 •
workload fit • developing functions • monitoring • stateful services • cultural and organizational issues -
© 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 -
© 2016 Mesosphere, Inc. All Rights Reserved. DEVELOPING FUNCTIONS 29
• local development? • testing • version control • what about many functions? -
© 2016 Mesosphere, Inc. All Rights Reserved. MONITORING 30 •
troubleshooting • logging • alerting -
© 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. -
© 2016 Mesosphere, Inc. All Rights Reserved. 33 It's not
about provisioning, capacity planning, DR, etc. … this would be on the infrastructure team. appops -
© 2016 Mesosphere, Inc. All Rights Reserved. Q & A
35 • @mhausenblas • mhausenblas.info • [email protected] https://dcos.io