How cloud billing works
How cloud billing works
Bronze
The cloud bills by meters, and each kind of service has its own. A server is billed for every second it runs — whether it is busy, idle or stuck. A managed service such as a queue or a storage bucket is billed for what you use — per request, or per gigabyte. A serverless function is billed per call plus the memory it holds for as long as it runs, and costs nothing while nobody calls it. Around these sit smaller charges that are easy to miss — disks, addresses, logs and data sent out to the internet. To read a bill, find the meter behind each line; to estimate a month, multiply the hourly rate by about 730.
- Use when
- Estimating what a design will cost before building it · Reading a bill to find which resource or meter drives it · Comparing a server, a managed service and a function for the same job
- Avoid when
- Picking the cheapest option without checking it still meets the latency and availability targets · Treating a pricing-calculator estimate as exact — real traffic, free grants and discounts change the bill
- Trade-offs
- Paying per hour is predictable but bills idle time; paying per use bills nothing idle but grows with every request · Managed and serverless services move work off your team, at a higher price per unit of work · Every meter you add (requests, GB, transfer) is one more line that can grow on its own
- Requires
- Server capacity & scaling up
3 objectives · 11 misconceptions
- explain Explain how a server, a per-request managed service and a serverless function are each billed, and which of them still costs money when no traffic arrives.
- predict Predict a design's monthly bill from its hourly rates and request volumes, and which line grows when traffic doubles.
- choose Choose which resources still bill after an app is switched off or deleted — disks, addresses, snapshots, data sent out — and which stop.
- Not true: A server that gets no traffic costs nothing.
- Not true: A server that has crashed or hung stops billing until it is fixed.
- Not true: You pay for the CPU a server actually uses, not for the size you picked.
- Not true: A managed service costs a fixed monthly fee, however much you use it.
- Not true: Serverless is free.
- Not true: Deleting a virtual machine stops every charge that came with it.
- Not true: Moving data costs nothing — only compute and storage are billed.
- Not true: A month of a server is always 720 hours.
- Not true: The bill is the finance team's problem, not an engineering decision.
- Not true: A serverless function bills for the time it is deployed or switched on, like a server, even with no calls.
- Not true: A stopped server still bills its full hourly rate.
Learn
How cloud billing works~13 minPractice
No katas practice this yet.
Check
Station test-out80% to passNeighborhood
builds onServer capacity & scaling up
→How cloud billing works→