Serverless compute that scales automatically and lets you pay only for what you use.
The Azure Functions Consumption plan offers a truly serverless experience. You write your code, and Azure handles the underlying infrastructure. It automatically scales your functions based on incoming events and charges you only for the compute time your code consumes. This makes it incredibly cost-effective for applications with variable or infrequent traffic.
You are billed based on the number of executions and the resources consumed (memory and execution time) during each execution. No idle costs!
Azure Functions automatically scales your application up or down based on the event load, ensuring your application is always available without manual intervention.
When your functions are not running, you pay nothing for compute. This is ideal for development, testing, and applications with unpredictable demand.
Seamlessly integrates with a wide range of Azure services and external event sources like HTTP requests, timers, message queues, and more.
The Consumption plan is a powerful choice for many scenarios:
When an event triggers your Azure Function, the platform provisions compute resources to run your code. Once the execution is complete, the resources are de-provisioned. This dynamic allocation ensures you only pay for the compute time you use.
Consider a simple HTTP-triggered function that returns a greeting:
// Example: JavaScript HTTP Trigger
module.exports = async function (context, req) {
context.log('JavaScript HTTP trigger function processed a request.');
const name = (req.query.name || (req.body && req.body.name));
const responseMessage = name
? "Hello, " + name + "!"
: "This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response.";
context.res = {
// status: 200, /* Defaults to 200 */
body: responseMessage
};
};
When this function is invoked via an HTTP request, Azure Functions allocates resources, runs the code, sends the response, and then deallocates the resources. You are billed for the time the code was actively running.
The Consumption plan includes a generous free grantEach month, your first 1 million executions and the first 400,000 GB-seconds of resource consumption are free.. Beyond that, you pay based on execution count and resource consumption (GB-seconds).
Key metrics for billing:
This model ensures that for low-traffic applications, the cost can be effectively zero.
Start building event-driven applications today with Azure Functions Consumption Plan.
Get Started with Azure Functions