2. What is Azure Functions
Azure Functions is a serverless solution that allows you to write less code,
maintain less infrastructure, and save on costs. Instead of worrying about
deploying and maintaining servers, the cloud infrastructure provides all the up-to-
date resources needed to keep your applications running. Functions provides
serverless compute for Azure.
Azure Functions allows you to run small pieces of code (Called Functions)
without about application infrastructure
3. Where can we use Azure functions
Reminders and notifications
Scheduled tasks and messages
File processing
Data or data streams processing
Running background backup tasks
Computing backend calculations
Lightweight Web APIs and Proof of Concepts, MVPs
4. Features of Azure Functions
Integration with Other Azure Services :- As part of Microsoft Azure, you can easily incorporate
Functions with Azure Event Hubs, Notification Hubs, Service Bus, Event Grids, and more.
Supports Different Programming Languages :-Functions support major languages such as Python,
Java, JavaScript, C#, F#, PHP, and Node.js. In this way, you can use different programming models
for activities like HTTP-based API building.
Continuous Integration and Continuous Deployment (CICD)
Serverless Applications
Pay-per-use pricing model
Integrated Security
Flexible Development
Serverless Applications
5. What we can do with Azure Functions
Azure Functions is a Great solution for processing bulk data, integrating systems, working with IOT and building simple APIs and
micro services.
You can run Azure Functions on various events or Triggers.
HTTP Request
Schedule Timer
Document Addition or modification in Azure Cosmos DB etc.
Azure Function App :- Will Facility the execution of Azure Functions .We can use Function App to Group Functions as logical unit
for easier management, deployment.
Azure Functions Topics
How to create a Function App project in visual studio.
Run the Function locally
Publish the project to Azure
Test your Function in Azure
What is Function .JSON File
Understand configuration in function .JSON File
7. Function
Chaining
In the function chaining pattern, a sequence of
functions executes in a specific order. In this pattern,
the output of one function is applied to the input of
another function
8. Fan-out/Fan-in
In the fan out/fan in pattern, you execute
multiple functions in parallel and then wait
for all functions to finish. Often, some
aggregation work is done on the results that
are returned from the functions.
9. Async HTTP APIs
The async HTTP API pattern
addresses the problem of
coordinating the state of long-
running operations with
external clients. A common way
to implement this pattern is by
having an HTTP endpoint
trigger the long running action.
Then, redirect the client to a
status endpoint that the client
polls to learn when the
operation is finished.
10. Monitoring
The monitor pattern refers to a flexible,
recurring process in a workflow. An
example is polling until specific
conditions are met. You can use a
regular timer trigger to address a basic
scenario.
11. Human interaction
Many automated processes involve
some kind of human interaction.
Involving humans in an automated
process is tricky because people aren’t
as highly available and as responsive as
cloud services. An automated process
might allow for this interaction by using
timeouts and compensation logic.
12. Aggregator (stateful Entities)
The sixth pattern is about aggregating event data
over a period of time into a single, address able
entity. In this pattern, the data being aggregated may
come from multiple sources, may be delivered in
batches, or may be scattered over long-periods of
time. The aggregator might need to take action on
event data as it arrives, and external clients may need
to query the aggregated data.
13. Compare Azure Functions and Azure Logic Apps
Compare Azure Functions and Azure Logic Apps DURABLE FUNCTIONS LOGIC APP S
Development Code-first (imperative) Designer-first (declarative) Connectivity About a dozen built-in
binding types, write code for custom bindings Large collection of connectors, Enterprise Integration
Pack for B2B scenarios, build custom connectors Actions Each activity is an Azure function; write code
for activity functions Large collection of ready-made actions Monitoring Azure Application Insights
Azure portal, Azure Monitor logs, Microsoft Defender for Cloud Management REST API, Visual Studio
Azure portal, REST API, PowerShell, Visual Studio Execution context Can run locally or in the cloud
Runs only in the cloud Compare Functions and Web Jobs Web Jobs and the Web Jobs SDK Functions
and Logic Apps are Azure services that enable serverless workloads. Azure Functions is a serverless
compute service, whereas Azure Logic Apps provides serverless workflows. Both can create complex
orchestrations. An orchestration is a collection of functions or steps, called actions in Logic Apps, that
are executed to accomplish a complex task.
14. Function.Json file
For Compiled language function .json file generated automatically from annotation in your code . For
scripting languages , you must provide the config file yourself.
The Function .json file defines trigger , bindings, and other configuration settings of Azure Functions .
Every Function has one and only one trigger.
Azure Function runtime will determine what events to monitor and how to pass data into and return
data from a Azure Function using this Function .json details.
Every Function has one and only one trigger.
Azure Functions runtime will determine what events to monitor and how to pass data into and return
data from a Azure function using this Function .json file details.
15. Azure Functions hosting
When you create a function app in Azure , you must choose a hosting plan for
your app. There are three basic hosting plans available for Azure Functions.
Consumption plan
Premium plan
Dedicated (App Service) plan
The hosting plan you choose dictates the following behaviors:
How your function app is scaled.
There sources available to each function app instance.
Support for advanced functionality, such as Azure Virtual Network connectivity
16. Consumption plan
When you're using the Consumption plan, instances of the Azure Functions
host are dynamically added and removed based on the number of
incoming events. The Consumption plan is the fully serverless hosting
option for Azure Functions.
Consumption plan Benefits
Scale automatically and only pay for compute resources when your
functions are running.
Default hosting plan.
Pay only when your functions are running.
Scales automatically, even during periods of high load.
17. Billing
Billing is based on number of executions, execution time, and memory used.
Usage is aggregated across all functions within a function app.
Create a Consumption plan function app
Azure command-line interface (Azure CLI)
Azure portal
Azure Resource Manager template
18. Premium plan
The Azure Functions Elastic Premium plan is a dynamic scale hosting option for function apps.
For other hosting plan options.
Automatically scales based on demand using pre-warmed workers, which run applications with
no delay after being idle, runs on more powerful instances, and connects to virtual networks.
Premium plan Benefits
Avoid cold starts with perpetually warm instances
Virtual network connectivity.
Unlimited execution duration, with 60 minutes guaranteed.
Premium instance sizes: one core, two core, and four core instances.
More predictable pricing, compared with the Consumption plan.
High-density app allocation for plans with multiple function apps.
19. Dedicated hosting
Run your functions just like your web apps. If you use App Service for your other applications,
your functions can on the same plan at no additional cost.
You have existing, underutilized VMs that are already running other App Service instances.
Predictive scaling and costs are required.
20. App Service Environment
App Service Environment (ASE) is an App Service feature that provides a
fully isolated and dedicated environment for securely running App Service
apps at high scale.
ASEs are appropriate for application workloads that require:
Very high scale.
Full compute isolation and secure network access.
High memory us
21. Kubernetes
Kubernetes provides a fully isolated and dedicated environment running on top of the
Kubernetes platform.
Kubernetes is appropriate for application workloads that require:
Custom hardware requirements.
Isolation and secure network access.
Ability to run in hybrid or multi-cloud environment.
Run along side existing Kubernetes applications and services.
37. Async :- The async keyword
turns a method into an async
method, which allows you to
use the await keyword in its
body. When the await keyword
is applied, it suspends the
calling method and yields
control back to its caller until
the awaited task is complete.
await can only be used inside
an async method.
38. Binding Expression Patterns
One of the Most powerful features of triggers and bindings is binding expressions.
We can use these Bindings Expressions in Function .json file or in Trigger and Binding Attributes
These Expressions will resolve to values when you execute your function.
Most of times, binding Expression are identified by wrapping them in curly braces.
Types of Binding Expressions
App Settings
Trigger File Name
Trigger Meta Data
39. Azure Blob storage
trigger for Azure
Functions
Blob Storage Bindings :- Azure
Functions integrated with
Azure Storage via Triggers and
Bindings.
Integration with Blob storage
helps to build Azure functions
with which will react to
changes in Blob storage and
read data from Blob storage
and write Data to Blob storage
40. Blob Input /Output Binding
The input binding allows you to read blob storage data as input to an Azure Function.