Azure Functions is a serverless, cross-platform and open source solution that enables a developer to implement functionality with minimal code on managed infrastructure.
Azure Functions scales dynamically and supports several programming languages such as .NET, Java, Javascript, Python, etc.
Azure Functions should be triggered to execute and can be connected to different sources and targets through bindings.
To host a Function in Azure, a function app is required which will logically group together functions for easier management, deployment, scaling and sharing of resources.
Various hosting plans are available to host a function app:
Plan
Advantages
Disadvantages
Consumption Plan
1. Pay only when your functions are executed.
2. Dynamically scale for usage and demand.
1. Cold starts – a brief delay when the function starts executing.
Premium Plan
1. Perpetually warm instances.
2. VNet connectivity
3. Unlimited execution duration.
4. Premium instance sizes.
1. Price
Dedicated Plan
1. Dedicated VMs
2. Reuse your existing app services.
1. Not serverless
Anatomy of a Function App
Core Files
host.json
The host.json file contains global configuration options and will impact all functions within the function app.
The local.settings.json file contains local configuration settings for your application. Local configuration settings are ignored by Git and Azure. If you’re developing a function app with .Net Core, you can use the IConfiguration infrastructure to easily read environment variables, user secrets and other configuration providers in addition to the local.settings.json file.