azure functions - get rid of your servers, use functions!

42
Get rid of your servers! Use functions + </> = Manuela Rink Technical Evangelist @

Upload: qaware-gmbh

Post on 16-Apr-2017

18 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Azure Functions - Get rid of your servers, use functions!

Get rid of your servers!

Use functions☁ + </> = 👊

Manuela RinkTechnical Evangelist@

Page 2: Azure Functions - Get rid of your servers, use functions!

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

Page 3: Azure Functions - Get rid of your servers, use functions!

Transformation from own “iron” to cloud VMs

Page 4: Azure Functions - Get rid of your servers, use functions!

Transformation from VMs to microservices / functions

Page 5: Azure Functions - Get rid of your servers, use functions!

We’ve come a long long way togetherThe cloud evolution

Page 6: Azure Functions - Get rid of your servers, use functions!

Serverlessor

Jeff*or

“just the next pig which is chased through the village?”

* Serverless is just a name, Paul Johnston

Page 7: Azure Functions - Get rid of your servers, use functions!

“[…] 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

Page 8: Azure Functions - Get rid of your servers, use functions!

“Quick and easyrun pieces of code* in the cloud, without worrying about infrastructure or maintenance.”

-- Manu Rink, 2016

*of various size

Page 9: Azure Functions - Get rid of your servers, use functions!

AWS LambdaGA since April 2015

Azure FunctionsGA since November 2016

Page 10: Azure Functions - Get rid of your servers, use functions!

#1Functions!!!11eleven

*not long until the demos, I swear!

Page 11: Azure Functions - Get rid of your servers, use functions!

Code Events + data

Azure Functions

Inspired by Chris Anderson @ Microsoft

Page 12: Azure Functions - Get rid of your servers, use functions!

code outputinput

Inspired by Matthew Henderson @ Microsoft

Page 13: Azure Functions - Get rid of your servers, use functions!

“Function App” is a group of functions

“Function App”

foo()

bar()

foobar()

Inspired by Matthew Henderson @ Microsoft

Page 14: Azure Functions - Get rid of your servers, use functions!

Inherit from / Build on top of App Services

Full control of dependencies and connectors

Choose your fav language and coding

environment

Powerful integration of you existing Azure apps

Choose from a wide variety of triggers

100% operated

Open sourced

Page 15: Azure Functions - Get rid of your servers, use functions!

App Service Features and CapabilitiesEnterprise Grade AppsDesigned for secure mission-critical applications

Fully Managed PlatformOptimized for Availability and Automatic scale

High Productivity DevelopmentAgility through Continuous DeploymentHybrid Connections / VPN / VLAN

Scheduled BackupAzure Active Directory Integration Site Resiliency, HA, and DRWeb JobsRole Base Access Control Audit / Compliance Enterprise MigrationClient Certs CacheIP Restrictions/ SSLWeb SocketsSQL, MySQL, DocDB, & MongoSticky Sessions Authorization/ Authentication

Automated DeploymentAutoScaleBuilt-in Load BalancingWorldwide Datacenter CoverageEnd Point Monitoring & AlertsApp GalleryDR Site SupportWildCard SupportDedicated IP addressHTTP Compression CDN Support for WebsitesPremium WordPressApp Services Environments

Remote Debugging w/ Visual Studio Site Staging SlotsTesting in ProductionContinuous Integration/Deployment Git, Visual Studio Online and GitHubApp & Site DiagnosticsOS & Framework Patching Site Extensions Gallery NET, PHP, Python, Node, JavaFramework InstallerBrowser-based editingAuto-HealingLogging and Auditing Admin-SiteSupport Site Extension

Inspired by Matthew Henderson @ Microsoft

Page 16: Azure Functions - Get rid of your servers, use functions!

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• Python• PHP• F#• Bash

Page 17: Azure Functions - Get rid of your servers, use functions!

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

Page 18: Azure Functions - Get rid of your servers, use functions!

Yeaaah, but what can I build with ’em?

Page 19: Azure Functions - Get rid of your servers, use functions!

Scenario 0The Easy Cake

use HTTP trigger to provide HTTP endpointsto

build a Hello Cake endpoint

Page 20: Azure Functions - Get rid of your servers, use functions!

Scenario 0 – Easy cake! – Simple HTTP endpoint

Page 21: Azure Functions - Get rid of your servers, use functions!

Y

AX B

EasyCake

LIVE DEMO

Page 22: Azure Functions - Get rid of your servers, use functions!

Scenario 1Connect all the things!

use web hooks for wiring up heterogeneous services

to

connect Slack with your mobile backend

Page 23: Azure Functions - Get rid of your servers, use functions!

Scenario 1 - Connect all the things! – Slack & mobile backend

The Serverless Connector - Use Functions to write Slack posts in your mobile backend

Page 24: Azure Functions - Get rid of your servers, use functions!

Y

AX B

Connectall thethings!

LIVE DEMO

Page 25: Azure Functions - Get rid of your servers, use functions!

Scenario 2Like a pro!

use Blob Trigger to let function react on storage I/O of other function

to

build an image resizing service

Page 26: Azure Functions - Get rid of your servers, use functions!

Scenario 2 - Like a pro! – Image Resizing Service

https://github.com/codePrincess/resizingService

Page 27: Azure Functions - Get rid of your servers, use functions!

Scenario 2 - Like a pro! – Image Resizing Service

Page 29: Azure Functions - Get rid of your servers, use functions!

Y

AX B

Likeapro!

LIVE DEMO

Page 30: Azure Functions - Get rid of your servers, use functions!

Scenario 3The Fun Stuff!

use OCR of CS Computer Vision API and text detection logic in a function

to

build an identification card validation service

Page 31: Azure Functions - Get rid of your servers, use functions!

Scenario 3 – The fun stuff! – ID card validation service

https://github.com/codePrincess/funkyVerfication

Page 32: Azure Functions - Get rid of your servers, use functions!
Page 33: Azure Functions - Get rid of your servers, use functions!

Y

AX B

The funstuff!

LIVE DEMO

Page 34: Azure Functions - Get rid of your servers, use functions!

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

Page 35: Azure Functions - Get rid of your servers, use functions!

Cool stuff so far … and the costs?

Page 36: Azure Functions - Get rid of your servers, use functions!

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

It’s free*

Page 37: Azure Functions - Get rid of your servers, use functions!

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 seconds1536 MB / 1024 MB = 1.5 GB1.5 GB * 2 million seconds = 3 million GBs3 million GBs – 400000 GBs = 2.6 million GBs2.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 OverviewPricing Calculator

Same example – just with 128MB RAM

0 $ + 0.20$ = 0.20$

Resource consumption costs

2 million exec * 1 second = 2 million seconds128 MB / 1024 MB = 0.125 GB0.125 GB * 2 million seconds = 0.25 million GBs0.25 million GBs – 400000 GBs = 0 GBs0 million GBs * 0.000016 $/GBs = 0 $

Execution costs

2 million exec - 1 million exec = 1 million exec 1 million exec * 0.20$ = 0.20$

Page 38: Azure Functions - Get rid of your servers, use functions!

#4... This is the end!

Page 39: Azure Functions - Get rid of your servers, use functions!

😻Easy to build & deploy – 100% operated

Various languages supported

Lot of triggers available

Inter-connectable in- & outside of Azure

Cost effective

Page 40: Azure Functions - Get rid of your servers, use functions!

#5... Where to go from here?

Page 41: Azure Functions - Get rid of your servers, use functions!

📚 Azure Functions documentationhttps://docs.microsoft.com/en-us/azure/azure-functions/

👸 Blogposts with How-Tos and source code to all examples in this deckhttps://medium.com/royallyserverless

😻 Nice and neat link and learning materialhttps://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!

Page 42: Azure Functions - Get rid of your servers, use functions!

Merci :)

Manu RinkTechnical Evangelist

[email protected]

@codeprincess

says