Understanding the Consumption Plan
The Consumption Plan for Azure Functions allows you to run your functions without incurring upfront costs. You are charged only for the actual resources consumed by your functions during execution.
This plan is ideal for development, testing, and infrequent production scenarios where you don't need a dedicated host.
Example Code Snippet (Illustrative - Function in Node.js)
function HttpTriggerFunction (req, res) {
console.log('HTTP Trigger function processed a request.');
res.status(200).send('Hello from Azure Functions Consumption Plan!');
}
Key Features
The Consumption Plan includes these features:
- Pay-as-you-go pricing: You only pay for the time your functions are running and the number of executions.
- No host charges: You don't pay for the underlying compute infrastructure.
- Automatic scaling: Functions automatically scale based on demand.