What Is Azure Functions

What Is Azure Functions

In this Azure tutorial, we will discuss What Is Azure Functions. Along with this, as part of this Azure functions tutorial, we will also discuss the below topics.

  • Features of Azure Functions
  • What are the benefit(s) to use azure functions?
  • What is Azure Functions Used For
  • Azure Functions Triggers
  • How Do Azure Functions Work
  • Azure Functions Versions
  • What languages can be used for azure functions?
  • What is a function app?

What Is Azure Functions

Azure Function is an Azure Service from Microsoft that helps you to run some pieces of code smoothly without getting worried about the infrastructure for your application.

In other words, Azure Functions is an event-based service from Microsoft that helps the existing Azure application platform to execute a few lines of code that trigger some events to perform some operations without getting worried about your application infrastructure.

In another way, Azure Functions is simply a “Functions-as-a-service” that provides the solution to run a few lines of code or functions in the cloud environment. You just need to worry about writing the code. No need to take any headache for the whole application or the infrastructure.

Azure Functions is called the serverless computing service ( Serverless means runs the code without needing to bother the hosting and infrastructure ), that is hosted on the cloud. The main purpose of the Azure Function to make easy application development.

Features of Azure Functions

Well, we discussed What Is Azure Functions?. Now is the time to discuss the features of Azure Functions. There are many features available for Azure Functions. Let’s discuss on few key features of the Azure Functions

Multiple Language Support

Azure Functions support many languages. You can write the functions in different languages of your choice like C#, Python, Java,Javascript,PHP,Node.js, etc.

Serverless applications support

With serverless, we can simply create and upload the code for the application, and then we just need to define the triggers or events that will execute the function. It reduces the developer’s time and the unnecessary headache to worry about the infrastructure as a developer.

Pay-as-you-use pricing model 

Azure functions provide the pay-as-you-use pricing model that helps to save a lot of costs. You just need to pay for the time the code is run. Microsoft will calculate the charge based on the time the Azure function runs per the billing cycle.

Easy integration with Azure services and other 3rd-party services

Another cool feature of Azure Function is, You can easily integrate the Azure Function with different Azure services Along with that, you can also easily integrate with different 3rd-party services like Azure DevOps services, Github, Azure CosmosDB, Azure Event Grid, etc.

Continuous Deployment and Integration support

Azure Function supports Continuous deployment and integration because Developers still need them along with GitHub, Microsoft Visual Studio Team Services, Eclipse, etc.

Integrated security

Azure Functions provides integrated security with different applications like Azure Active Directory, Facebook, Google account, etc.

These are a few key features of Azure Functions as described above.

What Are The Benefit(s) To Use Azure Functions?

There are many benefits of Azure Functions. We will discuss a few key benefits of Azure Functions.

Development became Easy

With the introduction of Azure Function, the developer task becomes easy. As part of the development activity, the Developer will only concentrate on the coding part. Developers will not bother with the management of the infrastructure.

No server maintenance

In the case of Azure Function, No server maintenance is needed. No headache for the server maintenance now.

Independent scaling

Another very interesting benefit of Azure Function is, it supports independent scaling. This feature has met with early success in cloud environments.

These are the benefit(s) to use the Azure functions.

What is Azure Functions Used For

As we already discussed, Azure Functions makes the app development process easier and helps to process the data, integrate with Azure services and other 3rd party services, Helps to build serverless applications, etc

Azure Functions are best for many purposes. Let’s discuss few key usages of Azure Functions.

  • Best for image processing
  • Best for the purpose of processing orders
  • Timer-based processing task
  • File maintenance activities
  • Azure service event processing activities
  • Serverless web application development and Architectural task
  • Best for the requirement of running a scheduled task
  • Better for the Real-time stream processing activities
  • Best for Mobile backend development activities.
  • Good for the bot messaging on Real-time

There are many purposes Where the Azure Functions are used for. But out of those purposes, above are some key uses of the Azure functions.

Azure Functions Triggers

Azure Functions can be triggered based on the different events from any third-party service or on-premise system.

Azure functions provide different templates for this purpose as a trigger. Below are a few examples of those

  • HTTP Trigger: Triggers the execution of your lines of code based on the HTTP Request.
  • Timer Trigger: Triggers the execution of your code based on some Scheduled time.
  • Queue Storage Trigger: This trigger responds to the messages from the Azure Queue storage.
  • Blob Storage Trigger: This storage trigger responds to the messages that come from Azure Blob Storage.
  • Azure CosmosDB Trigger: Responsible to process the documents of Azure CosmosDB when they are getting modified.
  • EventGrid Trigger: Azure Event Grid trigger reacts to the events delivered to a subscription in Azure Event Grid with the filters applicable.
  • EventHub Trigger: AzurEvent Hub trigger reacts to a more number of events hub events. Good for workflow processing scenarios as well as IoT scenarios.
  • Service Bus Queue Trigger: ServiceBus Queue Trigger responds to the messages from the Service Bus Queue.
  • Service Bus Topic Trigger: Service Bus Topic Trigger reacts to the messages from the Service Bus topic.

The above are different Azure function triggers as explained.

How Do Azure Functions Work

Well, let’s discuss an important concept like How Do Azure Functions Work? exactly.

How Do Azure Functions Work

As we discussed already, we need to have a valid Azure subscription and a storage account before creating a function.

The first work of the developer is to write the code for the function that they will deploy to the cloud and performs the individual actions, for example, processing the individual files, Handling API calls, etc.

Developers can write their code for the Azure functions using different languages like C#, Python, PHP, Javascript, Node.j and Java, etc.

As we know already, Azure Functions is an event-driven technology. A developer simply writes the code into a function and the rest will be handled by Azure like patching, scaling, etc

Developers can save a lot of time as they don’t need to write the code from scratch. Azure functions get triggered with the help of different ways like HTTP triggers, Changes in Azure Storage Blob containers, Azure queues, etc.

A single function will have only one trigger that defines how the function will get executed meaning the execution details.

The Azure function triggers the code based on the data as well as one more thing is it plays one more role to access and process that data. That particular data is connected with different input and output bindings. These bindings help the developer to access the data sources and developers not need to take any headaches to bother about the flow of data.

One more way, you can take it as the Developer needs to provide the input as a parameter to the Azure Functions and then after the function processes it and provides the result as the Output.

Developers can configure the triggers and bindings in the function.json file in Azure Portal. The events are monitored and when the event triggers, the functions are used to process the events.

The cloud provider performs the scaling activities of the resources automatically. It can also be done to scale up or down based on the demand.

The Azure Functions have different templates that contain a set of predefined functions that we have already discussed in the Azure Functions Triggers section.

Azure Functions Pricing

Azure Functions Use Cases

As discussed already, Azure Functions are code-based and event-driven. You can build and test them on our local system. Azure Functions are portable and more flexible for different languages. Some common use cases for the Azure Functions are

  • Scheduled based triggers
  • Software as a service event processing activities
  • Different service Azure event processing activities
  • serverless web application and mobile application development.

This is When should I use Azure functions?. Again you can create some of the Azure functions based on your business requirement.

Azure Functions Versions

The Azure Functions versions are equivalent to the .NET versions. Azure function runtime version 1.x is available and the equivalent .Net framework version is 4.6. The next version of Azure functions runtime version is 2.x is available with the equivalent .Net core 2.x version. And then the other Azure functions version is 3.x which is in Preview mode and the relevant .Net core 3.x version.

What languages can be used for azure functions?

As we already discussed Azure functions support different languages. You can use a language based on your choice. That is one of the great advantages of Azure Functions. The support of the languages is based on the Azure Functions runtime versions as well.

Check out Azure Functions Languages for the complete details.

What is Azure function app

The Azure function app is an execution context where exactly the Azure Functions are hosted on. In another way, if you are creating a project, you can call the Function app the Project where you want to deploy your functions.

As a prerequisite, what we need here is, We need a valid Azure Subscription or Azure Account and then we need a valid Service plan based on the pricing plan for the Azure Function.

The second thing that we need is one Storage account that needs to be created before starting with the Azure Function app. The storage account is used to link to the function app. internally, it uses this storage account for storing the function code and configuration details.

This is about what is azure function app is.

There are multiple ways to create a function app. Those are like using the Azure Portal, Using Azure CLI, Using Visual Studio, and Using Visual Studio Code as well.

You can check out How To Create Azure Function Apps In The Azure Portal, Creating an Azure Functions app in Visual Studio 2019 for more information.

You may also like following the below articles


Well, here in this article we discussed, What Is Azure Functions, Features of Azure Functions, What are the benefit(s) to use azure functions?, What is Azure Functions Used For, Azure Functions Triggers. Along with this, we also discussed, How Do Azure Functions Work, Azure Functions Versions, and finally we discussed, What languages can be used for azure functions? and What is a function app?. Hope you have enjoyed this article !!!