Azure Functions
- Azure functions are serverless. Serverless means - You don't have worry about hosting, scaling, monitoring, managing and maintaining as all these things will be done by Microsoft Azure.
- Service allows you to run small piece of code as function.
- We develop the code and deploy the functions.
- We get billed only for the amount we use the functions.
- Storage account: For azure functions you must have storage account in place.
- Azure functions invoke
- Timer Trigger
- Http Trigger- trigger when http request came.
- Blob Trigger - when new blob is created or exiting blob is updated
- Queue Trigger - When there is a message is azure storage queue.
- Service bus Trigger - Where there is a message in service queue or topics
- plans:
- Consumption plan: Pay only for the time code runs.
- App service plan: Re use the exiting plan for cost efficient. Always On Functionality is present in app service plan.
- Premium plan: More compute when required.
- Azure Durable Functions:
- Trigger functions --> Orchestrator Functions --> Activity Function
- Batch size can be changed from host.json
Azure functions are best suited for smaller apps have events that can work independently of other websites.
Some of the common azure functions are sending emails, starting backup, order processing, task scheduling, image processing, run task on schedule, such as database cleanup, sending notifications, messages, and IoT data processing\
Real life example: We send two parameters like location code and Total Amount and based on this azure function does some calculation behind the scenes and bring up the percentage of variable value we have to apply. it's a small calculator function. We are using Http trigger for this function, and we are passing two parameters as query string to these functions. Function is writer in C# deployed on Linux box.
----------------------------------------------------------------------------------------------------------------------------
Always On Functionality of App service plan

No comments:
Post a Comment