Azure Functions is the serverless computing service hosted on the Microsoft Azure public cloud. Azure Functions, and serverless computing, in general, is designed to accelerate and simplify application development.
Traditional application development demands a consideration of the underlying IT infrastructure. For cloud computing, an IT team must create, monitor and pay for cloud computing instances — regardless of how much work that instance actually does for the business.
The idea behind serverless computing, also known as function as a service, is to eliminate those infrastructure considerations for the user. With serverless, a user can simply create and upload code, and then define the triggers or events that will execute the code. Triggers can come from a wide range of sources, including another user’s application or other cloud services, such as databases and event and notification hubs.
Once a trigger or event occurs, it is the cloud provider’s responsibility to load the code into a suitable execution environment, run the code and then release the compute resources. There are still servers involved, but the user no longer needs to provision or manage compute instances. In addition, rather than pay for those compute instances and other associated resources each month, users pay for serverless computing based on the amount of time a function runs in a given billing cycle.
Azure Functions uses
Serverless computing functions are typically not complete, full-featured applications. Instead, functions handle specific, short-lived tasks. Most functions involve some form of data processing, such as image or order processing, as well as file maintenance or data collection from the internet of things (IoT) devices.
Some examples of how an IT team uses Azure Functions include:
- The Azure Event Hub can deliver different events that trigger functions related to conditions in the cloud environment or a user account.
- A generic web hook can process HTTP requests, which allows triggers to come from websites or GitHub repositories.
- Message traffic can trigger functions. For example, messages that arrive in an Azure Storage queue can trigger functions.
- Timers can also trigger Functions, which allows users to execute regular tasks, such as file cleanups, on a regular schedule.
Users can also chain functions together, or associate one with another, to create more comprehensive application program interfaces (APIs) and micro-services applications.
Functions integrates with Azure software as a service (SaaS) offerings, including Azure Cosmos DB, Azure Mobile Apps, and Azure Service Bus.
Developing code for Azure Functions
Azure Functions alleviates the need to provision, manage and pay for long-term compute resources in the cloud, which enables organizations to focus more on code development. This makes many of the features in Azure Functions beneficial to software developers.
Azure Functions pricing, limits, and requirements
Businesses can currently select between two pricing plans for Azure Functions: consumption and Azure App Service. In the consumption pricing plan, users pay for the time that each function actually runs. The other plan is for users that already employ Azure App Service to run web, mobile and API-based apps. These users can run Azure Functions at no added cost.