SlideShare a Scribd company logo
1 of 45
Introduction to Azure Functions
Process events with a serverless code architecture
Microsoft Azure
About me
Callon Campbell
Full-stack developer / technical lead. With over 19 years of experience
developing desktop, mobile and web enterprise applications using Microsoft
.NET Framework, SQL Server and Azure technologies.
I have a passion for both frontend development, specifically with Angular
and Microsoft's Universal Windows Platform (UWP) and also in the cloud
with Microsoft Azure. I blog, tweet and aspire to get an MVP in Azure.
Co-founder of ReflectSoftware Inc and one the principle developers of
ReflectInsight, a real-time .NET logging/analytics framework and Live/Log
Viewer.
2
Email: CallonCampbell@Outlook.com Twitter: @Flying_Maverick, @DevelopAzure
Blog: TheFlyingMaverick.com LinkedIn: LinkedIn.com/in/calloncampbell
Website: ReflectInsight.com
Microsoft Azure
Agenda
•Overview
•Demos – Portal, code and testing locally
•Best practices
•Common scenarios
•Pricing
•Wrap up
3
Microsoft Azure
What is Azure?
Microsoft Azure is a flexible, open, and secure public cloud built for business.
Any number of consumable services can be chained together to form an entire
application.
4
Microsoft Azure
Azure serverless compute
•It’s now becoming easier than ever to create small,
targeted microservice architecture using a variety of
services
•Azure provides many services that can help you
achieve a low-friction, high-throughput and low-cost
solution
•Azure Functions is the newest service in the
serverless architecture family
5
Microsoft Azure
Azure application platform
6
Microsoft Azure
What is Azure Functions?
• Azure Functions are a serverless, event driven experience
that extends the existing Azure App Service platform
• Azure Functions are “nanoservices” that can scale based
on demand (only paying for the resources you use)
• Think of Azure Functions as…
Microsoft Azure
What is Azure Functions (cont’d)
• Serverless
• Don’t worry about the infrastructure and provisioning of servers,
especially when your Functions call rate scales up
• Accelerate development
• Write your code in the portal for immediate execution
• Quickly and easily iterate with continuous deployment (Visual Studio
Team Services, GitHub, BitBucket)
• Bind into services
• Easily add bindings to Azure services and external services (Box,
DropBox, OneDrive, SendGrid, …) to get input into or output from your
Azure Functions
8
Microsoft Azure
Azure Functions architecture
Azure Functions are built on top of Azure App Service
and WebJobs SDK.
9
Microsoft Azure
Features of Azure Functions
• Choice of language
• Pay-per-use pricing model
• Bring your own dependencies (NuGet, NPM)
• Integrated security
• Simplified integration
• Flexible development / deployment
• Open-source
• Very close to the metal, quickly caches and uncaches
10
Microsoft Azure
Supported languages and tools
•Azure Functions can be created in C#,
Node/JavaScript, Python, F#, PHP and scripting
languages like PowerShell, Batch and Bash
•Azure Functions can even run EXE’s or call into DLL’s
11
Microsoft Azure
What can I do with Azure Functions?
•Azure Functions are great for processing data,
integrating systems, working with IoT, simple API’s
and microservices
•Azure Functions provide templates for a number of
key scenarios
•Azure Functions supports
• Triggers - a way to start execution
• Bindings - a way to simplify code for input and output of
data
12
Microsoft Azure
Integrations
• Azure Functions can be
triggered by virtually any
event in Azure, other 3rd
party services or even from
on-premise systems
• These services can trigger
your function (startup) or
serve as input and output
for your code
13
Supported Integrations
• DocumentDB
• Event Hubs
• Mobile Apps (tables)
• Notification Hubs
• Service Bus (queues, topics)
• Storage (blob, queues, tables)
• GitHub (webhooks)
• Twilio (SMS messages)
• On-premises (using Service Bus)
Microsoft Azure
Available trigger templates
• BlogTrigger
• EventHubTrigger
• Generic webhook
• GitHub webhook
• HttpTrigger*
• QueueTrigger
• ServiceBusQueueTrigger
• ServiceBusTopicTrigger
• TimerTrigger
* Every function type with the exception of the HttpTrigger type will require a storage account.
14
Microsoft Azure
Triggers and bindings
15
• A function can have any number
of input and output bindings
but can only have a single
trigger binding.
• The following is a list of
different triggers and their
available bindings:
Microsoft Azure
Securing your Azure Functions
HttpTriggers can be protected by Oauth providers
such as:
• Azure Active Directory
• Microsoft Account
• Facebook
• Google
• Twitter
16
Getting Started
Demo
HttpTrigger in the Azure Portal
Microsoft Azure
Code and test Azure Functions locally
•Working in the Azure Portal is great but lacks the
following key components:
• Debugging
• Source control integration
• Continuous deployment
•Wouldn’t it be nice if we could use Visual Studio…
22
Microsoft Azure
Introducing Visual Studio Tools for Azure
Functions
• Provides local development and tooling experience
(currently in preview)
• Only available for VS2015 (will come to VS2017 after
VS2017 releases)
• Remote debugging is supported in C# only (for now)
• Running locally is handled by the Azure Functions CLI
• Provides publish to Azure
23
Visual Studio Tools
for Azure Functions
Demo
QueueTrigger
Debugging
Publishing
Microsoft Azure
Add new function (cont’d)
Microsoft Azure
Best practices for Azure Functions
32
Microsoft Azure
Approach to building functions
When building your Azure Functions consider this…
“A key to realizing the full value is to write only the
smallest unit of logic to do a single scope of work and
to keep the dependencies to a minimum.”
– Joseph Fultz and Darren Brust, MSDN Magazine
33
Microsoft Azure
Best practices
•Functions should “do one thing”
•Functions should be idempotent
•Functions should finish as quickly as possible
34
Microsoft Azure
Where to get started
•Start small, replace 1 API or background processing
item
•Integration is a great place, often it’s a new layer on
top of old layers
35
Microsoft Azure
Scaling & runtime best practices
• E2E performance testing
• Know the limits of the service
• Reduce, Reuse and Recycle your resources
• Functions in a Function App share memory
• A Singleton can be shared across many Functions (i.e. DB
connection pooling, Redis caches, etc)
• Be mindful of what you load – memory is averaged over
your functions
• Get rid of data/objects you don’t need
36
Microsoft Azure
Common scenarios for Azure Functions
39
Microsoft Azure
Timer-based processing
Azure Functions supports an event based on a timer
using CRON job syntax.
40
Microsoft Azure
Azure service event processing
Azure Functions supports triggering an event based
on an activity in an Azure service.
41
Microsoft Azure
SaaS event processing
Azure Functions supports triggers based on activity in
a SaaS service.
42
Microsoft Azure
Serverless web application architectures
Azure Functions can power a single page app.
43
Microsoft Azure
Serverless mobile backends
A mobile backend can be just a set of HTTP APIs that
are called from a mobile client using the WebHook
URL.
44
Microsoft Azure
Real-time stream processing
Azure Functions can power an IoT Stream Analytics
app.
45
Microsoft Azure
Real-time bot messaging
Azure Functions can be used to customize the
behavior of a bot using a WebHook.
46
Microsoft Azure
Pricing
47
Microsoft Azure
Pricing
•No upfront cost
•No termination fees
•Pay only for what you use
Only pay for the time your code is running. You’ll be
charged based on the number of resources your
Azure Functions needs, and only for as long as it
takes your code to execute.
48
Microsoft Azure
Two kinds of pricing plans
Consumption plan - When your function runs, Azure
provides all of the necessary computational resources. You
don't have to worry about resource management, and you
only pay for the time that your code runs.
App Service plan - Run your functions just like your web,
mobile, and API apps. When you’re already using App
Service for your other applications, you can also run your
functions on the same plan at no additional cost.
49
Microsoft Azure
Pricing - Consumption Plan
• The Consumption Plan is billed based on resource consumption
and executions
• Consumption Plan pricing includes a monthly free grant of 1 million
requests and 400,000 GB-s of resource consumption per month:
• This is the recommended plan for scale…but set your limits!
50
Microsoft Azure
Pricing - App Service Plan
• Your functions run on dedicated VMs
• Dedicated VM’s are allocated to your App Service apps and
function apps are always available whether code is actively
running or not
• Good option if you have under utilized VMs
• A VM decouples the cost from both runtime and memory
size – you can limit the cost for long- running functions to
the cost of the VMs they run on
51
Microsoft Azure
Wrap up
52
Microsoft Azure
Summary
•With Azure Functions, the focus is on the code and
not managing the infrastructure.
•Azure Functions are a key ingredient to serverless
compute that is often required for the benefits of
PaaS implementations.
53
Microsoft Azure
Several key benefits
When used as the serverless compute component of
a serverless architecture, you have the following
benefits:
• Reduced time to market
• Lower total cost of ownership
• Pay per execution
54
Microsoft Azure
Take the Azure Functions challenge
https://functionschallenge.azure.com/
55
Microsoft Azure
Thank you!
CallonCampbell@Outlook.com
TheFlyingMaverick.com
@Flying_Maverick
@DevelopAzure
56
Microsoft Azure
References
• https://azure.microsoft.com/en-us/services/functions/
• https://functions.azure.com/
• https://portal.azure.com/
• https://docs.microsoft.com/en-us/azure/azure-functions/
• https://azure.microsoft.com/en-us/pricing/details/functions/
• Azure Functions in Practice
• Azure - Serverless Architecture with Azure Functions
• Visual Studio Tools for Azure Functions Preview
• Azure Storage Explorer
57

More Related Content

What's hot

Azure Logic Apps
Azure Logic AppsAzure Logic Apps
Azure Logic AppsBizTalk360
 
Mastering Azure Monitor
Mastering Azure MonitorMastering Azure Monitor
Mastering Azure MonitorRichard Conway
 
Azure security and Compliance
Azure security and ComplianceAzure security and Compliance
Azure security and ComplianceKarina Matos
 
Microsoft Azure Fundamentals
Microsoft Azure FundamentalsMicrosoft Azure Fundamentals
Microsoft Azure FundamentalsAdwait Ullal
 
Developing scalable enterprise serverless applications on azure with .net
Developing scalable enterprise serverless applications on azure with .netDeveloping scalable enterprise serverless applications on azure with .net
Developing scalable enterprise serverless applications on azure with .netCallon Campbell
 
Understanding Azure Disaster Recovery
Understanding Azure Disaster RecoveryUnderstanding Azure Disaster Recovery
Understanding Azure Disaster RecoveryNew Horizons Ireland
 
Introduction to Azure
Introduction to AzureIntroduction to Azure
Introduction to AzureRobert Crane
 
Microsoft Azure Networking Basics
Microsoft Azure Networking BasicsMicrosoft Azure Networking Basics
Microsoft Azure Networking BasicsSai Kishore Naidu
 
Azure Migrate
Azure MigrateAzure Migrate
Azure MigrateMustafa
 
Microsoft Azure - Introduction
Microsoft Azure - IntroductionMicrosoft Azure - Introduction
Microsoft Azure - IntroductionPranav Ainavolu
 
Azure App Service
Azure App ServiceAzure App Service
Azure App ServiceBizTalk360
 
Webinar: Simplifying the Enterprise Hybrid Cloud with Azure Stack HCI
Webinar: Simplifying the Enterprise Hybrid Cloud with Azure Stack HCIWebinar: Simplifying the Enterprise Hybrid Cloud with Azure Stack HCI
Webinar: Simplifying the Enterprise Hybrid Cloud with Azure Stack HCIStorage Switzerland
 
Logic Apps and Azure Functions
Logic Apps and Azure FunctionsLogic Apps and Azure Functions
Logic Apps and Azure FunctionsDaniel Toomey
 
Azure Site Recovery (ASR) for protection and migration from on prem
Azure Site Recovery (ASR) for protection and migration from on premAzure Site Recovery (ASR) for protection and migration from on prem
Azure Site Recovery (ASR) for protection and migration from on premDan Rey, MCT, Consultant
 
Advanced Load Balancer/Traffic Manager and App Gateway for Microsoft Azure
Advanced Load Balancer/Traffic Manager and App Gateway for Microsoft AzureAdvanced Load Balancer/Traffic Manager and App Gateway for Microsoft Azure
Advanced Load Balancer/Traffic Manager and App Gateway for Microsoft AzureKemp
 
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...Amazon Web Services
 

What's hot (20)

Azure Logic Apps
Azure Logic AppsAzure Logic Apps
Azure Logic Apps
 
Azure Cloud PPT
Azure Cloud PPTAzure Cloud PPT
Azure Cloud PPT
 
Mastering Azure Monitor
Mastering Azure MonitorMastering Azure Monitor
Mastering Azure Monitor
 
Azure security and Compliance
Azure security and ComplianceAzure security and Compliance
Azure security and Compliance
 
Microsoft Azure Fundamentals
Microsoft Azure FundamentalsMicrosoft Azure Fundamentals
Microsoft Azure Fundamentals
 
Introduction to Microsoft Azure Cloud
Introduction to Microsoft Azure CloudIntroduction to Microsoft Azure Cloud
Introduction to Microsoft Azure Cloud
 
Developing scalable enterprise serverless applications on azure with .net
Developing scalable enterprise serverless applications on azure with .netDeveloping scalable enterprise serverless applications on azure with .net
Developing scalable enterprise serverless applications on azure with .net
 
Understanding Azure Disaster Recovery
Understanding Azure Disaster RecoveryUnderstanding Azure Disaster Recovery
Understanding Azure Disaster Recovery
 
Introduction to Azure
Introduction to AzureIntroduction to Azure
Introduction to Azure
 
Microsoft Azure Networking Basics
Microsoft Azure Networking BasicsMicrosoft Azure Networking Basics
Microsoft Azure Networking Basics
 
Introduction to Microsoft Azure 101
Introduction to Microsoft Azure 101Introduction to Microsoft Azure 101
Introduction to Microsoft Azure 101
 
Azure Migrate
Azure MigrateAzure Migrate
Azure Migrate
 
Microsoft Azure - Introduction
Microsoft Azure - IntroductionMicrosoft Azure - Introduction
Microsoft Azure - Introduction
 
Azure App Service
Azure App ServiceAzure App Service
Azure App Service
 
Webinar: Simplifying the Enterprise Hybrid Cloud with Azure Stack HCI
Webinar: Simplifying the Enterprise Hybrid Cloud with Azure Stack HCIWebinar: Simplifying the Enterprise Hybrid Cloud with Azure Stack HCI
Webinar: Simplifying the Enterprise Hybrid Cloud with Azure Stack HCI
 
Logic Apps and Azure Functions
Logic Apps and Azure FunctionsLogic Apps and Azure Functions
Logic Apps and Azure Functions
 
Azure Site Recovery (ASR) for protection and migration from on prem
Azure Site Recovery (ASR) for protection and migration from on premAzure Site Recovery (ASR) for protection and migration from on prem
Azure Site Recovery (ASR) for protection and migration from on prem
 
Advanced Load Balancer/Traffic Manager and App Gateway for Microsoft Azure
Advanced Load Balancer/Traffic Manager and App Gateway for Microsoft AzureAdvanced Load Balancer/Traffic Manager and App Gateway for Microsoft Azure
Advanced Load Balancer/Traffic Manager and App Gateway for Microsoft Azure
 
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
 
Azure: PaaS or IaaS
Azure: PaaS or IaaSAzure: PaaS or IaaS
Azure: PaaS or IaaS
 

Similar to Introduction to Azure Functions

Azure functions: Build apps faster with serverless architecture (March 2018)
Azure functions: Build apps faster with serverless architecture (March 2018)Azure functions: Build apps faster with serverless architecture (March 2018)
Azure functions: Build apps faster with serverless architecture (March 2018)Callon Campbell
 
Azure functions - Build apps faster with serverless architecture
Azure functions - Build apps faster with serverless architectureAzure functions - Build apps faster with serverless architecture
Azure functions - Build apps faster with serverless architectureCallon Campbell
 
Getting started with development in azure
Getting started with development in azureGetting started with development in azure
Getting started with development in azureJasjit Chopra
 
Introduction to serverless compute with azure functions
Introduction to serverless compute with azure functionsIntroduction to serverless compute with azure functions
Introduction to serverless compute with azure functionsCallon Campbell
 
Serverless with Azure Functions
Serverless with Azure FunctionsServerless with Azure Functions
Serverless with Azure FunctionsAndreas Willich
 
Serverless integrations using Azure Logic Apps (intro)
Serverless integrations using Azure Logic Apps (intro)Serverless integrations using Azure Logic Apps (intro)
Serverless integrations using Azure Logic Apps (intro)Callon Campbell
 
Web jobs, Azure Functions and Serverless Computing
Web jobs, Azure Functions and Serverless ComputingWeb jobs, Azure Functions and Serverless Computing
Web jobs, Azure Functions and Serverless ComputingParis Polyzos
 
Exposing services with Azure API Management
Exposing services with Azure API ManagementExposing services with Azure API Management
Exposing services with Azure API ManagementCallon Campbell
 
Making Data Scientists Productive in Azure
Making Data Scientists Productive in AzureMaking Data Scientists Productive in Azure
Making Data Scientists Productive in AzureValdas Maksimavičius
 
#SPFestDC #Azure #Functions V2: What's new and getting started
#SPFestDC #Azure #Functions V2: What's new and getting started#SPFestDC #Azure #Functions V2: What's new and getting started
#SPFestDC #Azure #Functions V2: What's new and getting startedVincent Biret
 
Serverless API with Azure Functions
Serverless API with Azure FunctionsServerless API with Azure Functions
Serverless API with Azure FunctionsAnalben Mehta
 
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...Tokyo Azure Meetup
 
SPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flowSPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flowVincent Biret
 
#SPFestSea Introduction to #Azure #Functions v2
#SPFestSea Introduction to #Azure #Functions v2#SPFestSea Introduction to #Azure #Functions v2
#SPFestSea Introduction to #Azure #Functions v2Vincent Biret
 
Tokyo azure meetup #8 azure update, august
Tokyo azure meetup #8   azure update, augustTokyo azure meetup #8   azure update, august
Tokyo azure meetup #8 azure update, augustTokyo Azure Meetup
 
Tokyo azure meetup #8 - Azure Update, August
Tokyo azure meetup #8 - Azure Update, AugustTokyo azure meetup #8 - Azure Update, August
Tokyo azure meetup #8 - Azure Update, AugustKanio Dimitrov
 
AZ900-AzureFundamentals-part-5.pdf
AZ900-AzureFundamentals-part-5.pdfAZ900-AzureFundamentals-part-5.pdf
AZ900-AzureFundamentals-part-5.pdfssuser2dbaee
 
From Zero to Serverless
From Zero to ServerlessFrom Zero to Serverless
From Zero to ServerlessChad Green
 
Microsoft certified azure developer associate
Microsoft certified azure developer associateMicrosoft certified azure developer associate
Microsoft certified azure developer associateGaurav Singh
 

Similar to Introduction to Azure Functions (20)

Azure functions: Build apps faster with serverless architecture (March 2018)
Azure functions: Build apps faster with serverless architecture (March 2018)Azure functions: Build apps faster with serverless architecture (March 2018)
Azure functions: Build apps faster with serverless architecture (March 2018)
 
Azure functions - Build apps faster with serverless architecture
Azure functions - Build apps faster with serverless architectureAzure functions - Build apps faster with serverless architecture
Azure functions - Build apps faster with serverless architecture
 
Getting started with development in azure
Getting started with development in azureGetting started with development in azure
Getting started with development in azure
 
Introduction to serverless compute with azure functions
Introduction to serverless compute with azure functionsIntroduction to serverless compute with azure functions
Introduction to serverless compute with azure functions
 
Serverless with Azure Functions
Serverless with Azure FunctionsServerless with Azure Functions
Serverless with Azure Functions
 
Serverless integrations using Azure Logic Apps (intro)
Serverless integrations using Azure Logic Apps (intro)Serverless integrations using Azure Logic Apps (intro)
Serverless integrations using Azure Logic Apps (intro)
 
Web jobs, Azure Functions and Serverless Computing
Web jobs, Azure Functions and Serverless ComputingWeb jobs, Azure Functions and Serverless Computing
Web jobs, Azure Functions and Serverless Computing
 
Exposing services with Azure API Management
Exposing services with Azure API ManagementExposing services with Azure API Management
Exposing services with Azure API Management
 
Azure Pilot Test
Azure Pilot TestAzure Pilot Test
Azure Pilot Test
 
Making Data Scientists Productive in Azure
Making Data Scientists Productive in AzureMaking Data Scientists Productive in Azure
Making Data Scientists Productive in Azure
 
#SPFestDC #Azure #Functions V2: What's new and getting started
#SPFestDC #Azure #Functions V2: What's new and getting started#SPFestDC #Azure #Functions V2: What's new and getting started
#SPFestDC #Azure #Functions V2: What's new and getting started
 
Serverless API with Azure Functions
Serverless API with Azure FunctionsServerless API with Azure Functions
Serverless API with Azure Functions
 
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
 
SPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flowSPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flow
 
#SPFestSea Introduction to #Azure #Functions v2
#SPFestSea Introduction to #Azure #Functions v2#SPFestSea Introduction to #Azure #Functions v2
#SPFestSea Introduction to #Azure #Functions v2
 
Tokyo azure meetup #8 azure update, august
Tokyo azure meetup #8   azure update, augustTokyo azure meetup #8   azure update, august
Tokyo azure meetup #8 azure update, august
 
Tokyo azure meetup #8 - Azure Update, August
Tokyo azure meetup #8 - Azure Update, AugustTokyo azure meetup #8 - Azure Update, August
Tokyo azure meetup #8 - Azure Update, August
 
AZ900-AzureFundamentals-part-5.pdf
AZ900-AzureFundamentals-part-5.pdfAZ900-AzureFundamentals-part-5.pdf
AZ900-AzureFundamentals-part-5.pdf
 
From Zero to Serverless
From Zero to ServerlessFrom Zero to Serverless
From Zero to Serverless
 
Microsoft certified azure developer associate
Microsoft certified azure developer associateMicrosoft certified azure developer associate
Microsoft certified azure developer associate
 

More from Callon Campbell

Global Azure 2023 - Building Multitenant SaaS Applications in Azure
Global Azure 2023 - Building Multitenant SaaS Applications in AzureGlobal Azure 2023 - Building Multitenant SaaS Applications in Azure
Global Azure 2023 - Building Multitenant SaaS Applications in AzureCallon Campbell
 
Getting started with Azure Functions in Isolated Mode
Getting started with Azure Functions in Isolated ModeGetting started with Azure Functions in Isolated Mode
Getting started with Azure Functions in Isolated ModeCallon Campbell
 
Azure Durable Functions: The Festive Magic of Scalable Serverless Workflows f...
Azure Durable Functions: The Festive Magic of Scalable Serverless Workflows f...Azure Durable Functions: The Festive Magic of Scalable Serverless Workflows f...
Azure Durable Functions: The Festive Magic of Scalable Serverless Workflows f...Callon Campbell
 
Global Azure 2024 - On-Premises to Azure Cloud: .NET Web App Journey
Global Azure 2024 - On-Premises to Azure Cloud: .NET Web App JourneyGlobal Azure 2024 - On-Premises to Azure Cloud: .NET Web App Journey
Global Azure 2024 - On-Premises to Azure Cloud: .NET Web App JourneyCallon Campbell
 
Festive Tech Calendar 2021
Festive Tech Calendar 2021Festive Tech Calendar 2021
Festive Tech Calendar 2021Callon Campbell
 
Festive Tech Calendar 2022
Festive Tech Calendar 2022Festive Tech Calendar 2022
Festive Tech Calendar 2022Callon Campbell
 
BestOfBuild2021 - Azure Functions (15min).pptx
BestOfBuild2021 - Azure Functions (15min).pptxBestOfBuild2021 - Azure Functions (15min).pptx
BestOfBuild2021 - Azure Functions (15min).pptxCallon Campbell
 
Whats new in Azure Functions and .NET 6.pptx
Whats new in Azure Functions and .NET 6.pptxWhats new in Azure Functions and .NET 6.pptx
Whats new in Azure Functions and .NET 6.pptxCallon Campbell
 
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...Callon Campbell
 
Building stateful serverless orchestrations with Azure Durable Azure Function...
Building stateful serverless orchestrations with Azure Durable Azure Function...Building stateful serverless orchestrations with Azure Durable Azure Function...
Building stateful serverless orchestrations with Azure Durable Azure Function...Callon Campbell
 
Building scalable applications using serverless on the cloud
Building scalable applications using serverless on the cloudBuilding scalable applications using serverless on the cloud
Building scalable applications using serverless on the cloudCallon Campbell
 
Bringing Serverless into the Enterprise (Global Azure Virtual 2020)
Bringing Serverless into the Enterprise (Global Azure Virtual 2020)Bringing Serverless into the Enterprise (Global Azure Virtual 2020)
Bringing Serverless into the Enterprise (Global Azure Virtual 2020)Callon Campbell
 
Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)
Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)
Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)Callon Campbell
 
Centralized configuration with azure app configuration
Centralized configuration with azure app configurationCentralized configuration with azure app configuration
Centralized configuration with azure app configurationCallon Campbell
 
Creating Event Driven Applications with Azure Event Grid
Creating Event Driven Applications with Azure Event GridCreating Event Driven Applications with Azure Event Grid
Creating Event Driven Applications with Azure Event GridCallon Campbell
 
Getting Started with Azure Artifacts
Getting Started with Azure ArtifactsGetting Started with Azure Artifacts
Getting Started with Azure ArtifactsCallon Campbell
 
Serverless Orchestration with Azure Durable Functions
Serverless Orchestration with Azure Durable FunctionsServerless Orchestration with Azure Durable Functions
Serverless Orchestration with Azure Durable FunctionsCallon Campbell
 
Introduction to Azure Event Grid
Introduction to Azure Event GridIntroduction to Azure Event Grid
Introduction to Azure Event GridCallon Campbell
 

More from Callon Campbell (20)

Global Azure 2023 - Building Multitenant SaaS Applications in Azure
Global Azure 2023 - Building Multitenant SaaS Applications in AzureGlobal Azure 2023 - Building Multitenant SaaS Applications in Azure
Global Azure 2023 - Building Multitenant SaaS Applications in Azure
 
Getting started with Azure Functions in Isolated Mode
Getting started with Azure Functions in Isolated ModeGetting started with Azure Functions in Isolated Mode
Getting started with Azure Functions in Isolated Mode
 
Azure Durable Functions: The Festive Magic of Scalable Serverless Workflows f...
Azure Durable Functions: The Festive Magic of Scalable Serverless Workflows f...Azure Durable Functions: The Festive Magic of Scalable Serverless Workflows f...
Azure Durable Functions: The Festive Magic of Scalable Serverless Workflows f...
 
Global Azure 2024 - On-Premises to Azure Cloud: .NET Web App Journey
Global Azure 2024 - On-Premises to Azure Cloud: .NET Web App JourneyGlobal Azure 2024 - On-Premises to Azure Cloud: .NET Web App Journey
Global Azure 2024 - On-Premises to Azure Cloud: .NET Web App Journey
 
Festive Tech Calendar 2021
Festive Tech Calendar 2021Festive Tech Calendar 2021
Festive Tech Calendar 2021
 
Festive Tech Calendar 2022
Festive Tech Calendar 2022Festive Tech Calendar 2022
Festive Tech Calendar 2022
 
BestOfBuild2021 - Azure Functions (15min).pptx
BestOfBuild2021 - Azure Functions (15min).pptxBestOfBuild2021 - Azure Functions (15min).pptx
BestOfBuild2021 - Azure Functions (15min).pptx
 
Whats new in Azure Functions and .NET 6.pptx
Whats new in Azure Functions and .NET 6.pptxWhats new in Azure Functions and .NET 6.pptx
Whats new in Azure Functions and .NET 6.pptx
 
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
 
Building stateful serverless orchestrations with Azure Durable Azure Function...
Building stateful serverless orchestrations with Azure Durable Azure Function...Building stateful serverless orchestrations with Azure Durable Azure Function...
Building stateful serverless orchestrations with Azure Durable Azure Function...
 
Building scalable applications using serverless on the cloud
Building scalable applications using serverless on the cloudBuilding scalable applications using serverless on the cloud
Building scalable applications using serverless on the cloud
 
Bringing Serverless into the Enterprise (Global Azure Virtual 2020)
Bringing Serverless into the Enterprise (Global Azure Virtual 2020)Bringing Serverless into the Enterprise (Global Azure Virtual 2020)
Bringing Serverless into the Enterprise (Global Azure Virtual 2020)
 
Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)
Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)
Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)
 
Centralized configuration with azure app configuration
Centralized configuration with azure app configurationCentralized configuration with azure app configuration
Centralized configuration with azure app configuration
 
Creating Event Driven Applications with Azure Event Grid
Creating Event Driven Applications with Azure Event GridCreating Event Driven Applications with Azure Event Grid
Creating Event Driven Applications with Azure Event Grid
 
Getting Started with Azure Artifacts
Getting Started with Azure ArtifactsGetting Started with Azure Artifacts
Getting Started with Azure Artifacts
 
Serverless Orchestration with Azure Durable Functions
Serverless Orchestration with Azure Durable FunctionsServerless Orchestration with Azure Durable Functions
Serverless Orchestration with Azure Durable Functions
 
Azure DevOps in Action
Azure DevOps in ActionAzure DevOps in Action
Azure DevOps in Action
 
Tour of Azure DevOps
Tour of Azure DevOpsTour of Azure DevOps
Tour of Azure DevOps
 
Introduction to Azure Event Grid
Introduction to Azure Event GridIntroduction to Azure Event Grid
Introduction to Azure Event Grid
 

Recently uploaded

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 

Recently uploaded (20)

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 

Introduction to Azure Functions

  • 1. Introduction to Azure Functions Process events with a serverless code architecture
  • 2. Microsoft Azure About me Callon Campbell Full-stack developer / technical lead. With over 19 years of experience developing desktop, mobile and web enterprise applications using Microsoft .NET Framework, SQL Server and Azure technologies. I have a passion for both frontend development, specifically with Angular and Microsoft's Universal Windows Platform (UWP) and also in the cloud with Microsoft Azure. I blog, tweet and aspire to get an MVP in Azure. Co-founder of ReflectSoftware Inc and one the principle developers of ReflectInsight, a real-time .NET logging/analytics framework and Live/Log Viewer. 2 Email: CallonCampbell@Outlook.com Twitter: @Flying_Maverick, @DevelopAzure Blog: TheFlyingMaverick.com LinkedIn: LinkedIn.com/in/calloncampbell Website: ReflectInsight.com
  • 3. Microsoft Azure Agenda •Overview •Demos – Portal, code and testing locally •Best practices •Common scenarios •Pricing •Wrap up 3
  • 4. Microsoft Azure What is Azure? Microsoft Azure is a flexible, open, and secure public cloud built for business. Any number of consumable services can be chained together to form an entire application. 4
  • 5. Microsoft Azure Azure serverless compute •It’s now becoming easier than ever to create small, targeted microservice architecture using a variety of services •Azure provides many services that can help you achieve a low-friction, high-throughput and low-cost solution •Azure Functions is the newest service in the serverless architecture family 5
  • 7. Microsoft Azure What is Azure Functions? • Azure Functions are a serverless, event driven experience that extends the existing Azure App Service platform • Azure Functions are “nanoservices” that can scale based on demand (only paying for the resources you use) • Think of Azure Functions as…
  • 8. Microsoft Azure What is Azure Functions (cont’d) • Serverless • Don’t worry about the infrastructure and provisioning of servers, especially when your Functions call rate scales up • Accelerate development • Write your code in the portal for immediate execution • Quickly and easily iterate with continuous deployment (Visual Studio Team Services, GitHub, BitBucket) • Bind into services • Easily add bindings to Azure services and external services (Box, DropBox, OneDrive, SendGrid, …) to get input into or output from your Azure Functions 8
  • 9. Microsoft Azure Azure Functions architecture Azure Functions are built on top of Azure App Service and WebJobs SDK. 9
  • 10. Microsoft Azure Features of Azure Functions • Choice of language • Pay-per-use pricing model • Bring your own dependencies (NuGet, NPM) • Integrated security • Simplified integration • Flexible development / deployment • Open-source • Very close to the metal, quickly caches and uncaches 10
  • 11. Microsoft Azure Supported languages and tools •Azure Functions can be created in C#, Node/JavaScript, Python, F#, PHP and scripting languages like PowerShell, Batch and Bash •Azure Functions can even run EXE’s or call into DLL’s 11
  • 12. Microsoft Azure What can I do with Azure Functions? •Azure Functions are great for processing data, integrating systems, working with IoT, simple API’s and microservices •Azure Functions provide templates for a number of key scenarios •Azure Functions supports • Triggers - a way to start execution • Bindings - a way to simplify code for input and output of data 12
  • 13. Microsoft Azure Integrations • Azure Functions can be triggered by virtually any event in Azure, other 3rd party services or even from on-premise systems • These services can trigger your function (startup) or serve as input and output for your code 13 Supported Integrations • DocumentDB • Event Hubs • Mobile Apps (tables) • Notification Hubs • Service Bus (queues, topics) • Storage (blob, queues, tables) • GitHub (webhooks) • Twilio (SMS messages) • On-premises (using Service Bus)
  • 14. Microsoft Azure Available trigger templates • BlogTrigger • EventHubTrigger • Generic webhook • GitHub webhook • HttpTrigger* • QueueTrigger • ServiceBusQueueTrigger • ServiceBusTopicTrigger • TimerTrigger * Every function type with the exception of the HttpTrigger type will require a storage account. 14
  • 15. Microsoft Azure Triggers and bindings 15 • A function can have any number of input and output bindings but can only have a single trigger binding. • The following is a list of different triggers and their available bindings:
  • 16. Microsoft Azure Securing your Azure Functions HttpTriggers can be protected by Oauth providers such as: • Azure Active Directory • Microsoft Account • Facebook • Google • Twitter 16
  • 18. Microsoft Azure Code and test Azure Functions locally •Working in the Azure Portal is great but lacks the following key components: • Debugging • Source control integration • Continuous deployment •Wouldn’t it be nice if we could use Visual Studio… 22
  • 19. Microsoft Azure Introducing Visual Studio Tools for Azure Functions • Provides local development and tooling experience (currently in preview) • Only available for VS2015 (will come to VS2017 after VS2017 releases) • Remote debugging is supported in C# only (for now) • Running locally is handled by the Azure Functions CLI • Provides publish to Azure 23
  • 20. Visual Studio Tools for Azure Functions Demo QueueTrigger Debugging Publishing
  • 21. Microsoft Azure Add new function (cont’d)
  • 22. Microsoft Azure Best practices for Azure Functions 32
  • 23. Microsoft Azure Approach to building functions When building your Azure Functions consider this… “A key to realizing the full value is to write only the smallest unit of logic to do a single scope of work and to keep the dependencies to a minimum.” – Joseph Fultz and Darren Brust, MSDN Magazine 33
  • 24. Microsoft Azure Best practices •Functions should “do one thing” •Functions should be idempotent •Functions should finish as quickly as possible 34
  • 25. Microsoft Azure Where to get started •Start small, replace 1 API or background processing item •Integration is a great place, often it’s a new layer on top of old layers 35
  • 26. Microsoft Azure Scaling & runtime best practices • E2E performance testing • Know the limits of the service • Reduce, Reuse and Recycle your resources • Functions in a Function App share memory • A Singleton can be shared across many Functions (i.e. DB connection pooling, Redis caches, etc) • Be mindful of what you load – memory is averaged over your functions • Get rid of data/objects you don’t need 36
  • 27. Microsoft Azure Common scenarios for Azure Functions 39
  • 28. Microsoft Azure Timer-based processing Azure Functions supports an event based on a timer using CRON job syntax. 40
  • 29. Microsoft Azure Azure service event processing Azure Functions supports triggering an event based on an activity in an Azure service. 41
  • 30. Microsoft Azure SaaS event processing Azure Functions supports triggers based on activity in a SaaS service. 42
  • 31. Microsoft Azure Serverless web application architectures Azure Functions can power a single page app. 43
  • 32. Microsoft Azure Serverless mobile backends A mobile backend can be just a set of HTTP APIs that are called from a mobile client using the WebHook URL. 44
  • 33. Microsoft Azure Real-time stream processing Azure Functions can power an IoT Stream Analytics app. 45
  • 34. Microsoft Azure Real-time bot messaging Azure Functions can be used to customize the behavior of a bot using a WebHook. 46
  • 36. Microsoft Azure Pricing •No upfront cost •No termination fees •Pay only for what you use Only pay for the time your code is running. You’ll be charged based on the number of resources your Azure Functions needs, and only for as long as it takes your code to execute. 48
  • 37. Microsoft Azure Two kinds of pricing plans Consumption plan - When your function runs, Azure provides all of the necessary computational resources. You don't have to worry about resource management, and you only pay for the time that your code runs. App Service plan - Run your functions just like your web, mobile, and API apps. When you’re already using App Service for your other applications, you can also run your functions on the same plan at no additional cost. 49
  • 38. Microsoft Azure Pricing - Consumption Plan • The Consumption Plan is billed based on resource consumption and executions • Consumption Plan pricing includes a monthly free grant of 1 million requests and 400,000 GB-s of resource consumption per month: • This is the recommended plan for scale…but set your limits! 50
  • 39. Microsoft Azure Pricing - App Service Plan • Your functions run on dedicated VMs • Dedicated VM’s are allocated to your App Service apps and function apps are always available whether code is actively running or not • Good option if you have under utilized VMs • A VM decouples the cost from both runtime and memory size – you can limit the cost for long- running functions to the cost of the VMs they run on 51
  • 41. Microsoft Azure Summary •With Azure Functions, the focus is on the code and not managing the infrastructure. •Azure Functions are a key ingredient to serverless compute that is often required for the benefits of PaaS implementations. 53
  • 42. Microsoft Azure Several key benefits When used as the serverless compute component of a serverless architecture, you have the following benefits: • Reduced time to market • Lower total cost of ownership • Pay per execution 54
  • 43. Microsoft Azure Take the Azure Functions challenge https://functionschallenge.azure.com/ 55
  • 45. Microsoft Azure References • https://azure.microsoft.com/en-us/services/functions/ • https://functions.azure.com/ • https://portal.azure.com/ • https://docs.microsoft.com/en-us/azure/azure-functions/ • https://azure.microsoft.com/en-us/pricing/details/functions/ • Azure Functions in Practice • Azure - Serverless Architecture with Azure Functions • Visual Studio Tools for Azure Functions Preview • Azure Storage Explorer 57

Editor's Notes

  1. How many people here know what Azure is? How many people have used Azure? Anyone know what Azure Functions are? In Azure there are many consumable services that can be chained together to form an entire application.
  2. Other serverless Azure services are: Azure Functions Azure Logic Apps Azure Service Fabric Azure Batch Reference: https://www.simple-talk.com/cloud/cloud-development/serverless-architecture-azure/
  3. A new key component of these consumable services is Azure Functions which was introduced last year (2016) at the Microsoft Build developer conference. Microsoft touts Azure Functions as part and parcel of Azure's PaaS solutions portfolio, used primarily for event-driven, pay-as-you-go computing at scale. Azure Functions can provide the serverless compute capability in a complete solution ecosystem. Platform as a service (PaaS) is a complete development and deployment environment in the cloud, with resources that enable you to deliver everything from simple cloud-based apps to sophisticated, cloud-enabled enterprise applications. Like IaaS, PaaS includes infrastructure—servers, storage, and networking—but also middleware, development tools, business intelligence (BI) services, database management systems, and more. PaaS is designed to support the complete web application lifecycle: building, testing, deploying, managing, and updating. PaaS allows you to avoid the expense and complexity of buying and managing software licenses, the underlying application infrastructure and middleware or the development tools and other resources. You manage the applications and services you develop, and the cloud service provider typically manages everything else.
  4. Azure Functions is an event driven, compute-on-demand experience. You can leverage Azure Functions to build HTTP endpoints accessible by mobile and IoT devices. Azure Functions can be considered “nanoservices” that can scale based on demand.
  5. With serverless, you don’t need to worry about the infrastructure and provisioning of servers. Setup continuous deployment of your functions from Visual Studio Tea Services, GitHub and BitBucket. Easily add bindings to Azure or external services.
  6. Key take away is that Azure Functions gets all the benefits of using Azure App Service.
  7. Protect HTTP-triggered functions with OAuth providers such as Azure Active Directory, Facebook, Google, Twitter, and Microsoft Account. Easily leverage Azure services and other software-as-a-service (SaaS) offerings. Code your functions right in the portal or set up continuous integration and deploy your code through GitHub, Visual Studio Team Services, and other supported development tools. The Functions runtime is open-source and available on GitHub
  8. Take that console application you already have an upload it to run as an Azure Function.
  9. Every function type with the exception of the http trigger type will require a storage account.
  10. Any number of input and output bindings, but only have a single trigger.
  11. Only HttpTriggers can be protected.
  12. https://portal.azure.com/ I’ll now show you how to get started creating and running a simple HttpTrigger function from the Azure Portal.
  13. Use the QuickStart process to create a premade function or using the left side navigation, create your own custom function.
  14. There are a number of templates available for different languages including some prebuilt samples. Looking at these samples and experiment functions is a great way to see what you can do.
  15. When you’re function is ready, save and run it immediately in the portal and see the output in the logs. You can also test your functions from the right navigation pane.
  16. Visual Studio tooling for Azure Functions provides local development and debugging experience. Currently in preview and only available for Visual Studio 2015 (coming soon to VS2017). Supports remote debugging for C# only. Executing locally is handled by the Azure Functions CLI When you’re ready it provides the capability to publish to Azure.
  17. I’ll now create a new Azure Function app in Visual Studio, run and debug it locally using the Azure Functions CLI and finally I’ll publish it up to Azure.
  18. File -> New Project, look under Cloud and then select “Azure Functions (Preview)”.
  19. Storage account connection should be “AzureWebJobsStorage”. You will then add your connection string to that keys value in the AppSettings. AppSettings are shared across functions.
  20. Using the Azure Storage Explorer, I can get my connection string for the storage account. Get Primary Connection String and add to AppSettings to key “AzureWebJobsStorage”. I can also insert some sample test data to be consumed by my function.
  21. Adjust timing polling. Open up Host.json and using intellisence, add “queues” : {“maxPollingInterval”: 1000} where this value is in milliseconds.
  22. Smallest unit of logic Single scope of work Keep dependencies to a minimum
  23. Azure Functions should be SINGLE PURPOSE in nature. Think of them as short concise statements rather than compound sentences. Azure Functions should be IDEMPOTENT in nature. This means that the resulting state of the function should be identical if called subsequent times with the same parameters. Azure Functions should be quick and short lived - keeping execution time brief. For longer running jobs consider using Azure WebJobs or hosting the service in Azure Service Fabric.
  24. Start small and look at replacing a single API or perhaps a background processing item. Integration is another great place to start as it’s often a new layer on top of old existing layers.
  25. For example, you could execute code that runs every 15 minutes and cleans up a database table based on custom business logic.
  26. For example, you could execute a function that reads newly discovered log files in an Azure Blob Storage container. The data can then be transformed into a row in an Azure SQL Database table, or DocumentDB or perhaps feed it into another service. C# Azure Function for reacting to Azure Insights Events
  27. For example, when a file is saved in OneDrive, this triggers a function that uses the Microsoft Graph API to modify the spreadsheet, creating additional charts and calculated data.
  28. The app calls functions using the WebHook URL, saving user data and deciding what data to display. Or, you can do simple customizations, such as changing an ad based on user profile information. Node.js Azure Function for generating SAS tokens C# Azure Function for generating SAS tokens
  29. For example, a mobile application could capture an image, then call an Azure Function to get an access token for uploading to blob storage. A second Azure Function is triggered by the blob upload and resizes the image to be mobile-friendly.
  30. For example, IoT devices send messages to Azure Stream Analytics, which then calls an Azure Function to transform the message. This function processes the data and creates a new record in an Azure SQL Database.
  31. For example, you can create an Azure Function that processes a message using Cortana Analytics and call this function using the Microsoft Bot Framework.
  32. On a Consumption compute plan, you are currently limited to 5 minutes of computation. On a regular App Service Plan, running for 10 minutes is quite reasonable. Long-running functions is more on the order of an hour.
  33. Resource consumption in GB-s (gigabyte-seconds) is computed as a combination of memory size and execution time for all functions running in a Function App. Executions counted each time a function is executed in response to an event, triggered by a binding.