SlideShare une entreprise Scribd logo
1  sur  20
Azure Functions
What is Azure Functions
• Run small piece of code (functions) in cloud
• Supported languages – C#, Python, Node.js, PHP
• Serverless Code architecture
• Event driven on-demand compute
• Triggered by events occurring in Azure, 3rd Party systems, OnPrem
• Scale based on demand
• Integrated security
• Leverage existing Azure and other SaaS services
• Pay per-use pricing model
Application of Azure Functions
Azure functions enables you to:
1. Process data based on triggers
2. Working with IOT data
3. Build Simple APIs
4. Microservices
5. Any scheduled operations
Azure Function Integrations
 Azure Cosmos DB
 Azure Event Hubs
 Azure Mobile Apps
 Azure Notification Hubs
 Azure Service bus (Queues and Topics)
 Azure Storage (Tables, Blobs and Queues)
 Github (Webooks)
On Premises (using Service Bus)
 Twilio (using SMS)
Azure Functions - Pricing
Factors determining the Pricing are:
1. Executions – Total number of executions for all functions per month. (0.20$ per million executions)
2. Resource Consumption – Measured in Gigabyte Seconds (GB-s) (Average memory size in GB X
Execution time in seconds) (0.000016 /GB-s)
Storage account is created with each functions App. Any usage is charged at standard storage
rates.
Azure functions Pricing calculator - https://azure.microsoft.com/en-us/pricing/details/functions/
Consumption Plan
Consumption Plan – Pay for the time your code runs
 Dynamic scaling based on the number of incoming requests (Scale out based on load)
 Pricing based on Resource consumption and Executions
 Free grant of 1 million requests and 400,000 GB-s
 Max execution time of 5 mins for a function
 Max memory limit of 1.5 GB per instance of function host.
App Service Plan
 With App Service plan there is no additional cost for running Azure Functions
 Azure functions run on Dedicated VMs (Basic, Standard, Premium) allocated to your App
Service.
 Azure functions host is always running
 When to use App Service Plan:
 Function to run continuously or near continuously
 Need more memory than provided by the consumption plan
 Run longer than maximum execution time provided in the consumption plan
 Under utilized VMs available for consumption.
 VM decouples the both runtime and memory size.
Scale out using Auto scale / different App service plan.
Azure Integration Options
 Azure provides support for gluing disparate systems
 Define input, actions, conditions and output.
 Runs on triggers or schedules
 Some of choices available in Azure are:
◦ Microsoft Flow
◦ Azure Logic Apps
◦ Azure Functions
◦ App Service Web Jobs
Azure Functions vs Web Jobs
WebJobs Core SDK
WebJobs Extensions
WebJobs Scripts Runtime
Triggers
Inputs /
Outputs
Language
Support
Azure Functions Runtime
Azure Functions – Triggers & Bindings
• Triggers are ways to start executing your Azure function code
• Bindings are declarative way to bind data to the Azure function
• All triggers have input data
• Data coming from services become input values for function code
• To output data to another service use the return value of the method.
Supported Triggers and Bindings
Azure Function Code
 Write function in language of choice
 Save the code and configuration files in the same folder
 Configuration is saved in file function.json
 function.json file defines the function bindings and other configuration data
Azure Function App
 Grouping of multiple Azure functions
 All the functions share the same pricing plan, deployment
and runtime version
 Functions can be written in different languages
 Runtime can invoke functions multiple times in parallel.
 Max concurrency depends on the type of trigger and
resource used by other functions in the function App.
 Azure functions pulse can be used to monitor the average
execution time.
Azure Functions CSX for C#
 CSX allows to run less boilerplate code and focus on the function
 Refer any assemblies and namespaces directly
 Parameters are bind to the CSX function based on the name property specified in the
functions.json configuration
 Types of parameter supported depends on each binding
 Use the Tracewrite for any logging
 Reference external assemblies - #r "AssemblyName“
 Reuse .csx code using the load call. (#load "mylogger.csx“)
Azure Functions demo
 Basic Azure Function Example
 Timer Triggered Function Example
 Github Webhook Function Example
 Adding message to Azure Queue using Functions
 Demo Workflow – Github -> Webhook -> Service Bus -> Blob Storage -> Send Grid
Develop and Debug locally
 Support for developing and debugging Azure functions locally using CLI tools
 Need to have installed the Azure Function Core Tools
 Create a new Azure function App ( func init MyFunctionProj )
 Create a new Azure function ( func new --language C# --template HttpTrigger --name
MyHttpTrigger )
 Run functions locally ( func host start )
 Publishing function App to Azure (func azure functionapp publish <FunctionAppName> )
Azure Functions Runtime
 Azure functions runtime enables to run Azure functions on-premises.
 Enables identical development experience as the cloud service.
 Run locally before committing to the cloud.
 Azure functions runtime consist of the following:
 Azure Functions Runtime Management Role – Host for management of functions on-premises
 Azure Functions Worker Role – Windows container used to execute the Azure functions
 Needs Windows Server 2016 or Windows 10 Creators Update with access to a SQL
Server instance.
Azure
Functions
Comparison
References
1. Azure Functions Resources

Contenu connexe

Tendances

Go Serverless with Java and Azure Functions
Go Serverless with Java and Azure FunctionsGo Serverless with Java and Azure Functions
Go Serverless with Java and Azure FunctionsCodeOps Technologies LLP
 
Serverless API with Azure Functions
Serverless API with Azure FunctionsServerless API with Azure Functions
Serverless API with Azure FunctionsAnalben Mehta
 
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESSWRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESSCodeOps Technologies LLP
 
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...Shift Conference
 
Serverless Application Development with Azure
Serverless Application Development with AzureServerless Application Development with Azure
Serverless Application Development with AzureCallon Campbell
 
Monitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
Monitor Azure Kubernetes Cluster With Prometheus by Mamta JhaMonitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
Monitor Azure Kubernetes Cluster With Prometheus by Mamta JhaCodeOps Technologies LLP
 
Improve monitoring and observability for kubernetes with oss tools
Improve monitoring and observability for kubernetes with oss toolsImprove monitoring and observability for kubernetes with oss tools
Improve monitoring and observability for kubernetes with oss toolsNilesh Gule
 
Static web apps by GitHub action
Static web apps by GitHub actionStatic web apps by GitHub action
Static web apps by GitHub actionSeven Peaks Speaks
 
Azure Functions @ global azure day 2017
Azure Functions  @ global azure day 2017Azure Functions  @ global azure day 2017
Azure Functions @ global azure day 2017Sean Feldman
 
Intro to docker and kubernetes
Intro to docker and kubernetesIntro to docker and kubernetes
Intro to docker and kubernetesMohit Chhabra
 
Azure Functions Real World Examples
Azure Functions Real World Examples Azure Functions Real World Examples
Azure Functions Real World Examples Yochay Kiriaty
 
O365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
O365Con18 - Automate your Tasks through Azure Functions - Elio StruyfO365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
O365Con18 - Automate your Tasks through Azure Functions - Elio StruyfNCCOMMS
 
Public v1 real world example of azure functions serverless conf london 2016
Public v1 real world example of azure functions serverless conf london 2016 Public v1 real world example of azure functions serverless conf london 2016
Public v1 real world example of azure functions serverless conf london 2016 Yochay Kiriaty
 
Using Azure Functions for Integration
Using Azure Functions for IntegrationUsing Azure Functions for Integration
Using Azure Functions for IntegrationBizTalk360
 
Building Deploying and Managing Microservices-based Applications with Azure P...
Building Deploying and Managing Microservices-based Applications with Azure P...Building Deploying and Managing Microservices-based Applications with Azure P...
Building Deploying and Managing Microservices-based Applications with Azure P...CodeOps Technologies LLP
 

Tendances (20)

Go Serverless with Java and Azure Functions
Go Serverless with Java and Azure FunctionsGo Serverless with Java and Azure Functions
Go Serverless with Java and Azure Functions
 
Serverless API with Azure Functions
Serverless API with Azure FunctionsServerless API with Azure Functions
Serverless API with Azure Functions
 
Azure web apps
Azure web appsAzure web apps
Azure web apps
 
Java & Microservices in Azure
Java & Microservices in AzureJava & Microservices in Azure
Java & Microservices in Azure
 
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESSWRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
 
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
 
Serverless Application Development with Azure
Serverless Application Development with AzureServerless Application Development with Azure
Serverless Application Development with Azure
 
DEVOPS AND MACHINE LEARNING
DEVOPS AND MACHINE LEARNINGDEVOPS AND MACHINE LEARNING
DEVOPS AND MACHINE LEARNING
 
Monitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
Monitor Azure Kubernetes Cluster With Prometheus by Mamta JhaMonitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
Monitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
 
Improve monitoring and observability for kubernetes with oss tools
Improve monitoring and observability for kubernetes with oss toolsImprove monitoring and observability for kubernetes with oss tools
Improve monitoring and observability for kubernetes with oss tools
 
Static web apps by GitHub action
Static web apps by GitHub actionStatic web apps by GitHub action
Static web apps by GitHub action
 
Azure Functions @ global azure day 2017
Azure Functions  @ global azure day 2017Azure Functions  @ global azure day 2017
Azure Functions @ global azure day 2017
 
Intro to docker and kubernetes
Intro to docker and kubernetesIntro to docker and kubernetes
Intro to docker and kubernetes
 
Azure Functions Real World Examples
Azure Functions Real World Examples Azure Functions Real World Examples
Azure Functions Real World Examples
 
Azure logic app
Azure logic appAzure logic app
Azure logic app
 
O365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
O365Con18 - Automate your Tasks through Azure Functions - Elio StruyfO365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
O365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
 
Public v1 real world example of azure functions serverless conf london 2016
Public v1 real world example of azure functions serverless conf london 2016 Public v1 real world example of azure functions serverless conf london 2016
Public v1 real world example of azure functions serverless conf london 2016
 
Azure functions serverless
Azure functions serverlessAzure functions serverless
Azure functions serverless
 
Using Azure Functions for Integration
Using Azure Functions for IntegrationUsing Azure Functions for Integration
Using Azure Functions for Integration
 
Building Deploying and Managing Microservices-based Applications with Azure P...
Building Deploying and Managing Microservices-based Applications with Azure P...Building Deploying and Managing Microservices-based Applications with Azure P...
Building Deploying and Managing Microservices-based Applications with Azure P...
 

Similaire à Azure Functions - Introduction

Azure Functions.pptx
Azure Functions.pptxAzure Functions.pptx
Azure Functions.pptxYachikaKamra
 
Serverless Computing with Azure Functions Best Practices
Serverless Computing with Azure Functions Best PracticesServerless Computing with Azure Functions Best Practices
Serverless Computing with Azure Functions Best PracticesJuan Pablo
 
Serverless in the Azure World
Serverless in the Azure WorldServerless in the Azure World
Serverless in the Azure WorldKasun Kodagoda
 
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
 
Azure Batch Service Meetup Presentation
Azure Batch Service   Meetup PresentationAzure Batch Service   Meetup Presentation
Azure Batch Service Meetup PresentationGeorge Grammatikos
 
Deep Dive Azure Functions - Global Azure Bootcamp 2019
Deep Dive Azure Functions - Global Azure Bootcamp 2019Deep Dive Azure Functions - Global Azure Bootcamp 2019
Deep Dive Azure Functions - Global Azure Bootcamp 2019Andrea Tosato
 
Going Serverless with Azure Functions #1 - Introduction to Azure Functions
Going Serverless with Azure Functions #1 - Introduction to Azure FunctionsGoing Serverless with Azure Functions #1 - Introduction to Azure Functions
Going Serverless with Azure Functions #1 - Introduction to Azure FunctionsKasun Kodagoda
 
Azure Function Best Practice
Azure Function Best Practice Azure Function Best Practice
Azure Function Best Practice Juan Pablo
 
Play with azure functions
Play with azure functionsPlay with azure functions
Play with azure functionsBaskar rao Dsn
 
Azure Serverless Toolbox
Azure Serverless ToolboxAzure Serverless Toolbox
Azure Serverless ToolboxJohan Eriksson
 
SAFwAD @ Intelligent Cloud Conference
SAFwAD @ Intelligent Cloud ConferenceSAFwAD @ Intelligent Cloud Conference
SAFwAD @ Intelligent Cloud ConferenceRick van den Bosch
 
Building API in the cloud using Azure Functions
Building API in the cloud using Azure FunctionsBuilding API in the cloud using Azure Functions
Building API in the cloud using Azure FunctionsAleksandar Bozinovski
 
JoTechies - Azure Functions Using c#
JoTechies - Azure Functions Using c#JoTechies - Azure Functions Using c#
JoTechies - Azure Functions Using c#JoTechies
 
Getting Started with Serverless Architectures using Azure Functions
Getting Started with Serverless Architectures using Azure FunctionsGetting Started with Serverless Architectures using Azure Functions
Getting Started with Serverless Architectures using Azure FunctionsMarc Duiker
 
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
 

Similaire à Azure Functions - Introduction (20)

Azure Functions.pptx
Azure Functions.pptxAzure Functions.pptx
Azure Functions.pptx
 
Azure Functions
Azure FunctionsAzure Functions
Azure Functions
 
ServerLess by usama Azure fuctions.pptx
ServerLess by usama Azure fuctions.pptxServerLess by usama Azure fuctions.pptx
ServerLess by usama Azure fuctions.pptx
 
Azure functions
Azure functionsAzure functions
Azure functions
 
Serverless Computing with Azure Functions Best Practices
Serverless Computing with Azure Functions Best PracticesServerless Computing with Azure Functions Best Practices
Serverless Computing with Azure Functions Best Practices
 
Serverless in the Azure World
Serverless in the Azure WorldServerless in the Azure World
Serverless in the Azure World
 
Save Azure Cost
Save Azure CostSave Azure Cost
Save Azure Cost
 
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...
 
Azure Batch Service Meetup Presentation
Azure Batch Service   Meetup PresentationAzure Batch Service   Meetup Presentation
Azure Batch Service Meetup Presentation
 
Deep Dive Azure Functions - Global Azure Bootcamp 2019
Deep Dive Azure Functions - Global Azure Bootcamp 2019Deep Dive Azure Functions - Global Azure Bootcamp 2019
Deep Dive Azure Functions - Global Azure Bootcamp 2019
 
Going Serverless with Azure Functions #1 - Introduction to Azure Functions
Going Serverless with Azure Functions #1 - Introduction to Azure FunctionsGoing Serverless with Azure Functions #1 - Introduction to Azure Functions
Going Serverless with Azure Functions #1 - Introduction to Azure Functions
 
slides.pptx
slides.pptxslides.pptx
slides.pptx
 
Azure Function Best Practice
Azure Function Best Practice Azure Function Best Practice
Azure Function Best Practice
 
Play with azure functions
Play with azure functionsPlay with azure functions
Play with azure functions
 
Azure Serverless Toolbox
Azure Serverless ToolboxAzure Serverless Toolbox
Azure Serverless Toolbox
 
SAFwAD @ Intelligent Cloud Conference
SAFwAD @ Intelligent Cloud ConferenceSAFwAD @ Intelligent Cloud Conference
SAFwAD @ Intelligent Cloud Conference
 
Building API in the cloud using Azure Functions
Building API in the cloud using Azure FunctionsBuilding API in the cloud using Azure Functions
Building API in the cloud using Azure Functions
 
JoTechies - Azure Functions Using c#
JoTechies - Azure Functions Using c#JoTechies - Azure Functions Using c#
JoTechies - Azure Functions Using c#
 
Getting Started with Serverless Architectures using Azure Functions
Getting Started with Serverless Architectures using Azure FunctionsGetting Started with Serverless Architectures using Azure Functions
Getting Started with Serverless Architectures using 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)
 

Plus de Venkatesh Narayanan

Plus de Venkatesh Narayanan (9)

Azure ML Training - Deep Dive
Azure ML Training - Deep DiveAzure ML Training - Deep Dive
Azure ML Training - Deep Dive
 
Azure Active Directory - An Introduction
Azure Active Directory  - An IntroductionAzure Active Directory  - An Introduction
Azure Active Directory - An Introduction
 
Angular js 1.0-fundamentals
Angular js 1.0-fundamentalsAngular js 1.0-fundamentals
Angular js 1.0-fundamentals
 
Big data in Azure
Big data in AzureBig data in Azure
Big data in Azure
 
Markdown – An Introduction
Markdown – An IntroductionMarkdown – An Introduction
Markdown – An Introduction
 
Introduction to facebook platform
Introduction to facebook platformIntroduction to facebook platform
Introduction to facebook platform
 
Introduction to o data
Introduction to o dataIntroduction to o data
Introduction to o data
 
Azure and cloud design patterns
Azure and cloud design patternsAzure and cloud design patterns
Azure and cloud design patterns
 
Threading net 4.5
Threading net 4.5Threading net 4.5
Threading net 4.5
 

Dernier

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Dernier (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Azure Functions - Introduction

  • 2.
  • 3. What is Azure Functions • Run small piece of code (functions) in cloud • Supported languages – C#, Python, Node.js, PHP • Serverless Code architecture • Event driven on-demand compute • Triggered by events occurring in Azure, 3rd Party systems, OnPrem • Scale based on demand • Integrated security • Leverage existing Azure and other SaaS services • Pay per-use pricing model
  • 4. Application of Azure Functions Azure functions enables you to: 1. Process data based on triggers 2. Working with IOT data 3. Build Simple APIs 4. Microservices 5. Any scheduled operations
  • 5. Azure Function Integrations  Azure Cosmos DB  Azure Event Hubs  Azure Mobile Apps  Azure Notification Hubs  Azure Service bus (Queues and Topics)  Azure Storage (Tables, Blobs and Queues)  Github (Webooks) On Premises (using Service Bus)  Twilio (using SMS)
  • 6. Azure Functions - Pricing Factors determining the Pricing are: 1. Executions – Total number of executions for all functions per month. (0.20$ per million executions) 2. Resource Consumption – Measured in Gigabyte Seconds (GB-s) (Average memory size in GB X Execution time in seconds) (0.000016 /GB-s) Storage account is created with each functions App. Any usage is charged at standard storage rates. Azure functions Pricing calculator - https://azure.microsoft.com/en-us/pricing/details/functions/
  • 7. Consumption Plan Consumption Plan – Pay for the time your code runs  Dynamic scaling based on the number of incoming requests (Scale out based on load)  Pricing based on Resource consumption and Executions  Free grant of 1 million requests and 400,000 GB-s  Max execution time of 5 mins for a function  Max memory limit of 1.5 GB per instance of function host.
  • 8. App Service Plan  With App Service plan there is no additional cost for running Azure Functions  Azure functions run on Dedicated VMs (Basic, Standard, Premium) allocated to your App Service.  Azure functions host is always running  When to use App Service Plan:  Function to run continuously or near continuously  Need more memory than provided by the consumption plan  Run longer than maximum execution time provided in the consumption plan  Under utilized VMs available for consumption.  VM decouples the both runtime and memory size. Scale out using Auto scale / different App service plan.
  • 9. Azure Integration Options  Azure provides support for gluing disparate systems  Define input, actions, conditions and output.  Runs on triggers or schedules  Some of choices available in Azure are: ◦ Microsoft Flow ◦ Azure Logic Apps ◦ Azure Functions ◦ App Service Web Jobs
  • 10. Azure Functions vs Web Jobs WebJobs Core SDK WebJobs Extensions WebJobs Scripts Runtime Triggers Inputs / Outputs Language Support Azure Functions Runtime
  • 11. Azure Functions – Triggers & Bindings • Triggers are ways to start executing your Azure function code • Bindings are declarative way to bind data to the Azure function • All triggers have input data • Data coming from services become input values for function code • To output data to another service use the return value of the method.
  • 13. Azure Function Code  Write function in language of choice  Save the code and configuration files in the same folder  Configuration is saved in file function.json  function.json file defines the function bindings and other configuration data
  • 14. Azure Function App  Grouping of multiple Azure functions  All the functions share the same pricing plan, deployment and runtime version  Functions can be written in different languages  Runtime can invoke functions multiple times in parallel.  Max concurrency depends on the type of trigger and resource used by other functions in the function App.  Azure functions pulse can be used to monitor the average execution time.
  • 15. Azure Functions CSX for C#  CSX allows to run less boilerplate code and focus on the function  Refer any assemblies and namespaces directly  Parameters are bind to the CSX function based on the name property specified in the functions.json configuration  Types of parameter supported depends on each binding  Use the Tracewrite for any logging  Reference external assemblies - #r "AssemblyName“  Reuse .csx code using the load call. (#load "mylogger.csx“)
  • 16. Azure Functions demo  Basic Azure Function Example  Timer Triggered Function Example  Github Webhook Function Example  Adding message to Azure Queue using Functions  Demo Workflow – Github -> Webhook -> Service Bus -> Blob Storage -> Send Grid
  • 17. Develop and Debug locally  Support for developing and debugging Azure functions locally using CLI tools  Need to have installed the Azure Function Core Tools  Create a new Azure function App ( func init MyFunctionProj )  Create a new Azure function ( func new --language C# --template HttpTrigger --name MyHttpTrigger )  Run functions locally ( func host start )  Publishing function App to Azure (func azure functionapp publish <FunctionAppName> )
  • 18. Azure Functions Runtime  Azure functions runtime enables to run Azure functions on-premises.  Enables identical development experience as the cloud service.  Run locally before committing to the cloud.  Azure functions runtime consist of the following:  Azure Functions Runtime Management Role – Host for management of functions on-premises  Azure Functions Worker Role – Windows container used to execute the Azure functions  Needs Windows Server 2016 or Windows 10 Creators Update with access to a SQL Server instance.

Notes de l'éditeur

  1. Azure Functions is a Worker Role, which is a job that runs in the background. Worker roles in App Services are implemented with WebJobs, a feature of Web Apps, because they run on the same tenant of a deployed Web App. That’s why you can consider Azure Functions like an Azure WebJobs SDK as a Service, because you write a Web Job in a PaaS manner, without having to consider how a WebJob works or how it is structured. Azure Functions obtains the two models that it is able to run from Azure WebJobs: continuous running and triggered running.
  2. Integrated security - Protect HTTP-triggered functions with OAuth providers such as Azure Active Directory, Facebook, Google, Twitter, and Microsoft Account Bring your own dependencies - Functions supports NuGet and NPM, so you can use your favorite libraries. Simplified integration - Easily leverage Azure services and software-as-a-service (SaaS) offerings.  Open-source - The Functions runtime is open-source and available on GitHub
  3. Blog Trigger – Process blobs when they are added to containers Event hub trigger – Respond to events delivered to Azure Event hub Generic webhook – Process webhoot Http requests from any service supports webhooks Github webhook – Responds to events that occur on github repositories HttpTrigger – Trigger an execution of function by using Http request Queue Trigger – Responds to messages that arrive in Azure storage queue. Service Bus Queue / Topic Trigger – Enables to take action for messages delivered on the Azure service bus queue. Timer Trigger – Execute cleanup or batch operation on a predefined schedule.
  4. Azure functions host runs the Azure functions in either mode. Plan cannot be changed after creation. Function App requires an Azure Storage account that supports Blob, Queue, and Table storage.  Internally Azure Functions uses Azure Storage for operations such as managing triggers and logging function executions.  Some storage accounts do not support queues and tables, such as blob-only storage accounts (including premium storage) and general-purpose storage accounts with ZRS replication. 
  5. This plan scales automatically and you are charged for compute resources only when your functions are running. On a Consumption plan, a function can run for a maximum of five minutes. When using the Consumption hosting plan, function code files are stored on Azure Files shares on the main storage account. When you delete the main storage account, this content is deleted and cannot be recovered.+ When using a blob trigger on a Consumption plan, there can be up to a 10-minute delay in processing new blobs if a Function App has gone idle. Once the Function App is running, blobs are processed immediately. Azure Functions uses a component called the scale controller to monitor the rate of events and determine whether to scale out or scale down. The scale controller uses heuristics for each trigger type. For example, when using an Azure Queue Storage trigger, it scales based on the queue length and the age of the oldest queue message. The unit of scale is the function app. When scaled out, more resources are allocated to run multiple instances of the Azure Functions host. Conversely, as compute demand is reduced, function host instances are removed. The number of instances is eventually scaled down to zero when no functions are running within a function app
  6. If you run on an App Service Plan, you should enable the Always On setting so that your Function App runs correctly. On an App Service Plan, the functions runtime will go idle after a few minutes of inactivity, so only HTTP triggers will actually "wake up" your functions. This is similar to how WebJobs must have Always On enabled.+ App Service plans represent a set of features and capacity that you can share across your apps. App Service plans give you the flexibility to allocate specific apps to a set of resources and further optimize your Azure resource utilization.  App Service plans define: 1. Region (West US, East US, etc.) 2. Scale count (one, two, three instances, etc.) 3. Instance size (Small, Medium, Large) 4. SKU (Free, Shared, Basic, Standard, Premium) Azure WebSites or Web Apps Azure Mobile Services or Mobile Apps Azure API Apps Azure Logic Apps
  7. Whether to use Functions or WebJobs ultimately depends on what you're already doing with App Service. If you have an App Service app for which you want to run code snippets, and you want to manage them together in the same DevOps environment, you should use WebJobs. If you want to run code snippets for other Azure services or even 3rd-party apps, or if you want to manage your integration code snippets separately from your App Service apps, or if you want to call your code snippets from a Logic app, you should take advantage of all the improvements in Functions.
  8. The runtime uses function.json to determine the events to monitor and how to pass data into and return data from function execution.  Disabled – True to disable the running of the function Bindings – Each bindings has some common settings and bindings specific settings. Type – Binding type Ex – queueTrigger Direction – in or out – whether receving data into function or sending out Name – Name used for the bound data in the binding. For C# it is arugment name and for JS it is the key value pair
  9. Think of a function app as a way to organize and collectively manage your functions. host.json file contains some runtime-specific configuration and sits in the root folder of the function app. 
  10. 1. Reusing .csx code using #load 2. Environment variables 3. Using NuGet packages with project.json 4. Referencing custom assemblies using bin folder 5. Referencing External Assemblies # r AssemblyName
  11. Azure Functions Management Role - Provides a host for the management of your Functions on-premise. This role performs the following tasks: Hosting of the Azure Functions Management Portal, which is the the same one you see in the Azure portal. This lets you develop your functions in the same way as you would in the Azure portal. Distributing functions across multiple Functions workers. Providing a publishing endpoint so that you can publish your functions direct from Microsoft Visual Studio. Azure Functions Worker Role – Worker roles are deployed in the Windows Container and this where the function code executes You can deploy multiple Worker Roles throughout your organization and is a key way in which customers can make use of spare compute power.