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

Post on 08-Jan-2017

31 Views

Category:

Data & Analytics

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Get rid of your servers!

Use functions☁ + </> = 👊

Manuela RinkTechnical Evangelist @

#0The Theoretical Part*

*no excuses – first part needs to be theory!

Transformation from own “iron” to cloud VMs

Transformation from VMs to microservices / functions

We’ve come a long long way togetherThecloudevolution

Serverlessor

Jeff*or

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

*Serverlessisjustaname,PaulJohnston

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

-- Wikipediahttps://en.wikipedia.org/wiki/Serverless_computing

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

-- Manu Rink, 2016

*of various size

AWSLambdaGAsinceApril2015

AzureFunctionsGAsinceNovember2016

#1Functions!!!11eleven

*not long until the demos, I swear!

Inspired by Matthew Henderson @ Microsoft

“Function App” is a group of functions

Inspired by Matthew Henderson @ Microsoft

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

Open sourced

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 Deployment

Hybrid Connections / VPN / VLANScheduled 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

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

#2Building the real stuff*!… in 3 stages

*finally!

Yeaaah,butwhatcanIbuildwith’em?

Scenario 0The Easy Cake

use HTTP trigger to provide HTTP endpoints

to

build an “Is the cake a lie?” service

Scenario 0 – Easy cake! – Simple HTTP endpoint

Y

AX B

EasyCake

LIVE DEMO

Scenario 1Connect all the things!

use web hooks for wiring up heterogeneous services

to

connect Slack with your mobile backend

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

TheServerlessConnector- UseFunctionstowriteSlackpostsinyourmobilebackend

Y

AX B

Connectall thethings!

LIVE DEMO

Scenario 2Like a pro!

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

to

build an image resizing service

Scenario 2 - Like a pro! – Image Resizing Service

Scenario 2 - Like a pro! – Image Resizing Service

https://github.com/codePrincess/resizingService

Scenario 2 - Like a pro! – Image Resizing Service

Y

AX B

Likeapro!

LIVE DEMO

#3a Penny saved is a penny goT*

*’nuff said!

Cool stuff so far … and the costs?

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

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.000016 $/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$

#4... This is the end!

😻Easy to build & deploy

Various languages supported

Lot of triggers available

Inter-connectable in- & outside of Azure

Cost effective

Merci :)

Manu RinkTechnical Evangelist

marink@microsoft.com@codeprincess

says

top related