Key takeaway
- Azure serverless computing: how to choose between Flex Consumption, Premium and Container Apps, plan for the Linux Consumption retirement and control cost.
Azure serverless computing is the set of Microsoft Azure services that run your code, workflows and containers without you provisioning or patching servers, with the platform handling scaling. The best known is Azure Functions, and it sits beside services for workflows, events and containers.
This guide is for architects and engineering leaders choosing or reviewing Azure serverless hosting. It centres on the hosting plan decision, because Microsoft's Azure Functions scale and hosting page now recommends one plan for new apps and marks another as legacy. It also covers limits, cost, and where serverless is the wrong choice. For the basics, see our introduction to serverless computing.
Which Azure Functions hosting plan should you choose?
The hosting table lists five options: Flex Consumption, Premium, Dedicated, Container Apps and Consumption (legacy). Microsoft states: "For new serverless function apps, use the Flex Consumption plan." It says existing Consumption apps should be migrated to Flex Consumption.
| Plan | What to know | When it fits |
|---|---|---|
| Flex Consumption | Linux-based. Billed on demand for execution time, or for always ready instances. Scales to 1,000 instances and supports virtual network integration | Variable, event-driven workloads that need private networking |
| Premium | Event-driven scaling with prewarmed workers; at least one instance is billed | Apps that run continuously or need steady performance |
| Dedicated | Runs on App Service plan capacity | Predictable billing or reuse of spare App Service capacity |
| Container Apps | Containerised function apps on Azure Container Apps | Teams that need control of the container image or run functions beside microservices |
| Consumption (legacy) | Original pay per execution plan | Existing Windows apps that are not yet migrated |
Check each row against the Microsoft page for your region and runtime before you decide, because plan features and limits change.
What is changing with the Consumption plan?
The scale page says "the option to host function apps on Linux in a Consumption plan is retiring on 30 September 2028", that the Linux Consumption plan is not getting new features or language versions, and that apps running on Windows in a Consumption plan are not currently affected. It also warns that function apps still on the end-of-life v3 runtime on Linux in a Consumption plan stop running after 30 September 2026, so move them to the v4 runtime.
Flex Consumption is Linux only, so Windows apps need a separate decision. Plan the move as a new app and a redeploy rather than an in-place switch, and test it before switching traffic.
What limits should architects design around?
| Plan | Default timeout | Maximum timeout |
|---|---|---|
| Flex Consumption | 30 minutes | Unbounded |
| Premium | 30 minutes | Unbounded |
| Dedicated | 30 minutes | Unbounded, requires Always On |
| Container Apps | 30 minutes | Unbounded |
| Consumption | 5 minutes | 10 minutes |
Whatever the plan, Microsoft states that "230 seconds is the maximum amount of time that an HTTP triggered function can take to respond to a request". Long work needs an asynchronous pattern. The Flex Consumption documentation adds two limits that shape design. Flex Consumption scales to a maximum of 1,000 instances, and the default regional quota for all Flex Consumption app instances combined is 250 cores. Always ready instances count against that quota, so set maximum instance counts deliberately.
How do cost and networking work on Flex Consumption?
The Flex Consumption page describes two billing modes. In on demand mode you are billed only for the time function code is executing, with no minimum instance count. With always ready instances enabled, you are billed for the memory provisioned across them, known as the baseline, and "in always ready billing, there are no free grants". The minimum billable execution period is 1,000 ms.
On networking, Flex Consumption adds virtual network integration, so apps can reach Azure services secured inside a virtual network. Always ready instances keep chosen instances running, which reduces cold starts at the price of a baseline charge.
Which other Azure services complete a serverless design?
Most enterprise designs combine services. These roles are general descriptions, so confirm details on the Microsoft documentation for each service.
| Service | Role in the design |
|---|---|
| Azure Functions | Event-driven code triggered by HTTP, queues and other event sources |
| Durable Functions | Long-running, stateful workflows written as code |
| Azure Logic Apps | Low-code integration workflows across business systems |
| Azure Event Grid | Event routing between producers and consumers |
| Azure Container Apps | Serverless containers for microservices and jobs |
If you need full Kubernetes control instead of a serverless abstraction, Azure Kubernetes Service is the usual alternative. For a step-by-step build, see building a serverless application on Azure.
How do AI agents change Azure serverless design?
Agents trigger and are triggered by events, so serverless functions and workflows often become the actions an agent can take. That makes timeouts, identity, private networking and cost limits part of agent safety: a runaway trigger is a runaway agent. Each action should run under a managed identity with narrow permissions, and each decision should be recorded. ElixirClaw, the AI agents computing platform, is where teams build and run such agents.
When is Azure serverless the wrong choice?
- Steady, high load. Constant utilisation often costs less on a Premium or Dedicated plan than on per-execution billing.
- Strict first-request latency. Scale from zero can add cold starts. Always ready instances reduce them at a baseline cost.
- Windows-only dependencies. Flex Consumption is Linux only.
- Full cluster control. Use AKS if you need Kubernetes APIs or node-level tuning.
To compare clouds, read our guides to AWS serverless computing and Google Cloud Platform serverless computing. For help running Azure in production, see our Microsoft Azure managed services.
What should you do first?
- List every function app by plan, operating system and runtime version.
- Move any app on the v3 runtime to v4 straight away.
- Make Flex Consumption the default for new event-driven code, with approved exceptions.
- Set maximum instance counts and managed identities on every app.
- Plan the migration of Linux Consumption apps well before 30 September 2028.
Next Steps in Azure Serverless Computing
Talk to our experts about implementing a compound AI system with Azure Serverless Computing. Discover how industries and departments leverage Agentic Workflows and Decision Intelligence to become decision-centric. Utilize AI to automate and optimize IT support and operations, enhancing efficiency and responsiveness.
To map one decision your agents make, and the data and policy it depends on, book a Context Workshop. See what happens in the workshop.
Frequently asked questions
What is the recommended Azure Functions plan for new serverless apps?
Microsoft states that for new serverless function apps you should use the Flex Consumption plan.
Is the Azure Functions Consumption plan being retired?
It is listed as legacy. Hosting function apps on Linux in a Consumption plan retires on 30 September 2028, while apps on Windows in a Consumption plan are not currently affected.
How long can an Azure Function run?
On Flex Consumption, Premium, Dedicated and Container Apps the default timeout is 30 minutes with no enforced maximum. The Consumption plan allows up to 10 minutes. HTTP triggered functions must respond within 230 seconds on any plan.
Does Flex Consumption support virtual networks?
Yes. Flex Consumption adds virtual network integration, so apps can connect to Azure services secured inside a virtual network.
How is Flex Consumption billed?
On demand mode bills only for the time function code is executing. If always ready instances are enabled, you are also billed for their provisioned memory, with no free grants for always ready billing.
Follow XenonStack on LinkedIn: XenonStack on LinkedIn for new guides on agentic AI, data and platform engineering.
Ready to put AI agents to work? Explore ElixirClaw, the agentic OS platform to build, orchestrate and govern AI agents.
Explore the XenonStack platform family: ElixirData · ElixirClaw · ElixirHub · NexaStack · MetaSecure · Neural AI · AgentGRC · AgentSRE · AgentAnalyst · AgentInstruct · AgentRAI · AgentScrum · AgentSearch · AgentForce · AI Aviator · SAIF Aviator · CohortIQ · XenonStack AI · XenonStack UAE