Slide 1

Slide 1 text

Get rid of your servers! Use functions ☁ + = Manuela Rink Technical Evangelist @

Slide 2

Slide 2 text

#0 The Theoretical Part* *no excuses – first part needs to be theory!

Slide 3

Slide 3 text

Transformation from own “iron” to cloud VMs

Slide 4

Slide 4 text

Transformation from VMs to microservices / functions

Slide 5

Slide 5 text

We’ve come a long long way together The cloud evolution

Slide 6

Slide 6 text

Serverless or Jeff* or “just the next pig which is chased through the village?” * Serverless is just a name, Paul Johnston

Slide 7

Slide 7 text

“[…] is a cloud computing code execution model in which the cloud provider fully manages starting and stopping virtual machines as necessary to serve requests, and requests are billed by an abstract measure of the resources required to satisfy the request, rather than per virtual machine, per hour.” -- Wikipedia https://en.wikipedia.org/wiki/Serverless_computing

Slide 8

Slide 8 text

“Quick and easy run your code*, in the cloud, without worrying about infrastructure, maintenance or scaling.” *of various size -- Manu Rink, 2016

Slide 9

Slide 9 text

AWS Lambda GA since April 2015 Google Cloud Functions Public Alpha Late 2015 IBM Cloud Functions Public Beta Early 2016 “Äscha” Functions GA since November 2016

Slide 10

Slide 10 text

#1 Functions!!!11eleven *not long until the demos, I swear!

Slide 11

Slide 11 text

Inspired by Chris Anderson @ Microsoft

Slide 12

Slide 12 text

Inspired by Matthew Henderson @ Microsoft

Slide 13

Slide 13 text

“Function App” is a group of functions Inspired by Matthew Henderson @ Microsoft

Slide 14

Slide 14 text

Inherit from / Build on top of App Services Full control of dependencies and connectors Choose your fav language and coding environment Powerful integration into your existing Azure apps Choose from a wide variety of triggers 100% operated Open sourced

Slide 15

Slide 15 text

App Service Features and Capabilities Enterprise Grade Apps Designed for secure mission-critical applications Fully Managed Platform Optimized for Availability and Automatic scale High Productivity Development Agility through Continuous Deployment Hybrid Connections / VPN / VLAN Scheduled Backup Azure Active Directory Integration Site Resiliency, HA, and DR Web Jobs Role Base Access Control Audit / Compliance Enterprise Migration Client Certs Cache IP Restrictions/ SSL Web Sockets SQL, MySQL, DocDB, & Mongo Sticky Sessions Authorization/ Authentication Automated Deployment AutoScale Built-in Load Balancing Worldwide Datacenter Coverage End Point Monitoring & Alerts App Gallery DR Site Support WildCard Support Dedicated IP address HTTP Compression CDN Support for Websites Premium WordPress App Services Environments Remote Debugging w/ Visual Studio Site Staging Slots Testing in Production Continuous Integration/Deployment Git, Visual Studio Online and GitHub App & Site Diagnostics OS & Framework Patching Site Extensions Gallery NET, PHP , Python, Node, Java Framework Installer Browser-based editing Auto-Healing Logging and Auditing Admin-Site Support Site Extension Inspired by Matthew Henderson @ Microsoft

Slide 16

Slide 16 text

Templates • Azure Internal Service Triggers • Blob • EventHub • Storage Queue • Service Bus Queue • Service Bus Topic • Generic Triggers • Generic WebHook • GitHub WebHook • Http • Timer Languages • Core • C# • JS/Node • Experimental • PowerShell • TypeScript • Python • PHP • F# • Bash

Slide 17

Slide 17 text

#2 Building the real stuff*! … in 4 stages *finally!

Slide 18

Slide 18 text

Yeaaah, but what can I build with ’em?

Slide 19

Slide 19 text

Scenario 0 The Easy Cake use HTTP trigger to provide HTTP endpoints to build a Hello Cake endpoint

Slide 20

Slide 20 text

Scenario 0 – Easy cake! – Simple HTTP endpoint

Slide 21

Slide 21 text

Scenario 0 – Easy cake deployment! All together in a bash script Single Azure CLI statements

Slide 22

Slide 22 text

Y A X B Easy Cake LIVE DEMO

Slide 23

Slide 23 text

Scenario 1 Connect all the things! use web hooks for wiring up heterogeneous services to connect Slack with your mobile backend

Slide 24

Slide 24 text

Scenario 1 - Connect all the things! – Slack & mobile backend The Serverless Connector - Use Functions to write Slack posts in your mobile backend

Slide 25

Slide 25 text

Y A X B Connect all the things! LIVE DEMO

Slide 26

Slide 26 text

Scenario 2 Like a pro! use Blob Trigger to let function react on storage I/O of other function to build an image resizing service

Slide 27

Slide 27 text

Scenario 2 - Like a pro! – Image Resizing Service https://github.com/codePrincess/resizingService

Slide 28

Slide 28 text

Scenario 2 - Like a pro! – Image Resizing Service

Slide 29

Slide 29 text

https://github.com/codePrincess/resizingService Scenario 2 - Like a pro! – Image Resizing Service

Slide 30

Slide 30 text

Y A X B Like a pro! LIVE DEMO

Slide 31

Slide 31 text

Scenario 3 The Fun Stuff! use OCR of CS Computer Vision API and text detection logic in a function to build an identification card validation service

Slide 32

Slide 32 text

Scenario 3 – The fun stuff! – ID card validation service https://github.com/codePrincess/funkyVerfication

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

Y A X B The fun stuff! LIVE DEMO

Slide 35

Slide 35 text

#3 a Penny saved is a penny goT* *’nuff said!

Slide 36

Slide 36 text

Cool stuff so far … and the costs?

Slide 37

Slide 37 text

*for the 1 million executions and the first 400.000 GB/s It’s free*

Slide 38

Slide 38 text

Function executes 2.000.000 times with a duration of 1 second using 1536MB RAM Resource consumption costs 2 million exec * 1 second = 2 million seconds 1536 MB / 1024 MB = 1.5 GB 1.5 GB * 2 million seconds = 3 million GBs 3 million GBs – 400000 GBs = 2.6 million GBs 2.6 million GBs * 0.000014 $/GBs = 41.60 $ Execution costs 2 million exec - 1 million exec = 1 million exec 1 million exec * 0.20$ = 0.20$ 41.60$ + 0.20$ = 41.80$ Pricing Overview Pricing Calculator Same example – just with 128MB RAM 0 $ + 0.20$ = 0.20$ Resource consumption costs 2 million exec * 1 second = 2 million seconds 128 MB / 1024 MB = 0.125 GB 0.125 GB * 2 million seconds = 0.25 million GBs 0.25 million GBs – 400000 GBs = 0 GBs 0 million GBs * 0.000016 $/GBs = 0 $ Execution costs 2 million exec - 1 million exec = 1 million exec 1 million exec * 0.20$ = 0.20$

Slide 39

Slide 39 text

Consumption Plan Scaling on demand – 100% managed Quota Definition as Spending Limit

Slide 40

Slide 40 text

App Service Plan Scaling depending on plan Cost are fixed with the plan’s tier Basic Standard Premium ~55€ ~75€ ~225€

Slide 41

Slide 41 text

#4 ... This is the end!

Slide 42

Slide 42 text

Easy to build & deploy – 100% operated Various languages supported Lot of triggers available Inter-connectable in- & outside of Azure Cost effective

Slide 43

Slide 43 text

#5 ... Where to go from here?

Slide 44

Slide 44 text

Serverless on Azure https://azure.microsoft.com/en-us/overview/serverless-computing/ Azure Functions documentation https://docs.microsoft.com/en-us/azure/azure-functions/ Blogposts with How-Tos and source code to all examples in this deck https://medium.com/royallyserverless Nice and neat link and learning material https://blogs.msdn.microsoft.com/appserviceteam/2016/12/01/running-azure-functions-locally-with-the-cli/ https://www.npmjs.com/package/azure-functions-cli https://contos.io/azure-functions-cli-quick-start-ee843dfbe72c#.v90g0n77d Brandnew – Azure Functions now part of the Serverless Framework https://serverless.com/framework/docs/providers/azure/ It’s dangerous to go alone - take this!

Slide 45

Slide 45 text

Merci :) Manu Rink Technical Evangelist [email protected] @codeprincess says