Azure Functions

Azure Functions

You can use Azure Functions to run short amounts of code (called “functions”) without having to worry about application infrastructure. The cloud infrastructure delivers all the up-to-date servers you need to keep your application functioning at scale using Azure Functions. When a client sends an HTTP request, these functions are called.

The Consumption Plan, or on-demand scaling and pricing, was the most essential innovation offered by Functions. A function can execute on up to 100 server nodes in parallel with the Consumption Plan, and it auto-scales based on load. You just pay for what you use. It’s a serverless Function-as-a-Service solution (FaaS). This implies you’ll pay less for a more scalable service. An App Service Plan can also run Functions, but that isn’t its key selling point.

How Azure Function Work

Azure functions are actions that are triggered by events. Triggers are the events that cause a function to execute. A trigger specifies how a function is called, and each function must have only one. The Framework considers everything that causes an Azure Function to run to be an Event. On Azure Functions, events are platform events.

  1. HTTP Trigger (REST API)
  2. Scheduled timer (Run every 5 minutes)
  3. Service Bus Queue trigger (A work item from another Function)
  4. IoT/Event Hub message (A message from a device or service)
  5. Webhook fires (GitHub project update)

Our Azure function is running as a result of the above events. You must choose the event trigger on which your azure function code will be executed.

Azure Function= Event + Code

When any event occurred is occurred then code will run

How many Azure Function

When we create new azure function in azure it creates 3 essential components. Which required to run the function

  1. App Service Plan (Function require compute power to host)
  2. Storage Account (Function need some type of storage for operations)
  3. Runtime scaling (Function scale up and down as per demand)

App Service plan
Azure Functions infrastructure scales CPU and memory resources by adding additional instances of the Functions host, based on the number of events that its functions are triggered on. Each instance of the Functions host in the Consumption plan is limited to 1.5 GB of memory and one CPU. An instance of the host is the entire function app, meaning all functions within a function app share resource within an instance and scale at the same time. Function apps that share the same Consumption plan are scaled independently.

Storage account
Azure function app requires a general Azure Storage account, which supports Azure Blob, Queue, Files, and Table storage. This is because Azure Functions relies on Azure Storage for operations such as managing triggers and logging function executions

Runtime scaling
Azure Functions uses a component called the scale controller to monitor the rate of events and determine whether to scale out or scale in. The scale controller uses heuristics for each trigger type.

Share this post

Comment (1)

  • Stacee Christy Reply

    Your mode of describing everything in this paragraph is genuinely
    nice, all be capable of simply be aware of it, Thanks a lot.

    January 12, 2022 at 7:59 AM

Leave a Reply

Your email address will not be published.