Open In App

What is Microsoft Azure Functions?

Last Updated : 27 Jul, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Microsoft Azure provides us with different templates for Azure functions to be used to handle key scenarios. It supports bindings which makes it simple for us to take input and output data. It also supports triggers that help us in the execution of the code. 

What is Azure Function?

Azure Functions is a serverless computing service provided by Microsoft Azure to help us run tasks on a schedule like processing data, working with the Internet of Things (IoT), and integrating systems. We can also use them to develop server-less applications, simple APIs, and microservices. This helps us be efficient by just writing code to solve our current problem.
There are many more integration and automation services that can be used to automate the process and define inputs, conditions, actions, and output.

Create Your First Function In The Azure Portal

Step 1: Login into the Azure portal and select on Azure function.

Click on Function APP

Step 2: Click on Create a function to configure the setting according to your requirement.

Click on Create

Step 3: Configure all the requirements and the runtime stack that you required according to your requirements.

Basic Configurations

Step 4: If you want insights into your function each and every time then you need to turn on the monitoring.

Monitoring

Step 7: Click on review+create after configuring all the requirements. Like the code of the application and all other configurations.

Review+Create

Step 8: In the below image you can see that the function is deployed successfully you can check by going to resources.

Azure functions are Deplyed

Language Supported By Azure Functions

Below are some languages which you can run on both Windows and Linux operating systems.

  1. C#
  2. JavaScript
  3. Python
  4. Java

There are some other languages but which are mentioned above are the most commonly used languages.

Hosting Plans For Azure Functions 

Microsoft Azure provides us with five hosting plans for Azure functions which helps us dictate how our app will be scaled, the resources available to each virtual machine, and support for advanced functionality, such as Azure virtual network connectivity. 

Hosting Plans are:

1. Consumption Plan: This plan is the default hosting plan. It provides us with an auto-scaling option and we only pay for computing resources used. Instances are dynamic i.e.; added and removed based on the number of incoming events. 

2. Functions Premium Plan: This plan also provides us with auto-scaling based on demand using pre-warmed workers. This helps in running applications with no delay after being idle, connects to virtual networks, and runs on more powerful instances. 

3. App Service Plan: This plan runs our functions within an app service plan at regular rates. We should use this for long-running scenarios where durable functions can’t be used. 

4. Kubernetes: This plan provides us with a fully isolated and dedicated environment running on top of the Kubernetes platform. 

5. ASE: App Service Environment (ASE) is an App service feature that provides us with a dedicated environment and completely isolated environment for securely running App Service apps at a high scale.

Features of Azure Functions

  1. It is built on the Azure app service and supports features such as authentication, source control integration, monitoring, and application insights integration.
  2. We can create complex orchestrations using Azure functions by writing code and using the durable functions extension. 
  3. There are about a dozen built-in binding types for connection; we only need to write code if we need custom bindings. 
  4. We can monitor it using Azure Application Insights and manage them using REST API and visual studio. 
  5. We can run it locally or in the cloud
  6. Azure functions offer more developer productivity, development environments, pricing, and programming languages than WebJobs and Azure App Service do.

Pricing of Azure Functions

Depending upon the type of plan you are choosing you will be charged there are three types of plans

  1. Consumption Plan
  2. Premium Plan
  3. App Service Plan

1. Consumption plan

In this plan, the pricing is based on the time that the resource is active per second consumption. You get a monthly free grant of 1 million requests and 400,000 GB-s of resource consumption per month per subscription

2. Premium Plan

In the premium plan, you will be charged according to the resource consumption per minute and how many CPUs and GB are utilized.

3. App Service Plan

You will be charged according to the other resources charged like App service is charged.

Azure Functions vs Web Jobs

Azure Functions

Web Jobs

Azure functions are event-driven the function is triggered based on the changes that happen in Azure blob storage and HTTP request and son on

Web jobs will run in the context of Azure App Services.

Azure functions are stateless functions where they didn’t store any type of data.

Web jobs are stateful they will maintain state in between the executions.

Azure functions are purely based on the amount of resources you consumed like the pay-as-you-go model

You will be charged regardless of the consumption or running time.

Azure Functions Vs Logic Apps

Azure Functions

Logic Apps

Azure functions are serverless computing platforms.

Logic apps also belong to the same category of serverless computing.

Not suited for complex workflows which are having multiple steps.

Well suited for complex workflows which are having multiple steps.

Less Expensive compared to Logics apps.

More expensive compared to logics apps.

FAQs On Azure Functions

1. Is Azure Functions a PaaS or IAAS app?

Azure Functions is a serverless platform as a service (PaaS)

2. What type of service is Azure Functions?

Azure function is an serverless computing service.



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads