The consumption-based model, pricing models and serverless
Buying servers and paying for cloud services are two very different ways of spending money. AZ-900 expects you to know both terms and which one the cloud uses.
CapEx and OpEx
- Capital expenditure (CapEx) is a large, up-front spend on physical things that you own and that lose value over time: buying servers, building a data centre.
- Operational expenditure (OpEx) is ongoing spending on services you use, billed as you go: electricity, staff, and cloud services.
Moving to the cloud shifts spending from CapEx to OpEx. You no longer buy hardware; you pay for computing as an operating cost.
The consumption-based model
Cloud providers use a consumption-based model: you pay only for the resources you use, when you use them.
- No up-front cost. Nothing to buy before you start.
- No wasted capacity. You do not pay for servers that sit idle "just in case".
- Pay for more when you need more. Busy month? You pay more. Quiet month? You pay less.
- Stop paying when you stop using. Delete a resource and its charges stop.
Cloud pricing models
Pay-as-you-go is the default, but it is not the only way to buy cloud capacity. The more you can commit to, the less you pay per hour.
| Model | How it works | Best for |
|---|---|---|
| Pay-as-you-go | billed per second, minute or hour of use, with no commitment | unpredictable, short-term or new workloads |
| Reservations (reserved instances) | commit to a specific resource, such as a VM size in a region, for one or three years, in return for a large discount | steady workloads that won't change for years |
| Savings plan for compute | commit to spend a fixed amount per hour on compute for one or three years; the discount follows your usage across VM sizes, regions and services | steady spending on compute that changes shape over time |
| Spot pricing | use spare capacity at a deep discount; Azure can take it back (evict it) at short notice | interruptible work such as batch jobs and tests |
Two more ways to pay less are worth knowing:
- Azure Hybrid Benefit lets you bring existing Windows Server and SQL Server licences (with Software Assurance) to Azure, so you don't pay for the licence twice.
- Free tiers and the free account: many services have an always-free allowance.
Serverless
Serverless computing means you run code without managing servers at all. The provider runs, scales and maintains the infrastructure; you deploy the code and pay for what it uses.
What makes something serverless:
- No infrastructure to manage: no VMs to size, patch or keep running.
- Event-driven: code runs in response to an event (a file upload, an HTTP request, a message, a timer).
- Automatic scaling, including down to zero when nothing is happening.
- Pay per execution: you are billed for the work done, not for idle servers.
Azure examples:
- Azure Functions runs small pieces of code in response to events.
- Azure Logic Apps runs automated workflows that connect apps and services, often with little or no code.
- Azure Container Apps runs containers serverlessly, scaling them with demand.
Servers still exist, of course. "Serverless" means they are entirely the provider's problem.