azurecontainer-instancescontainerscost-optimization

Azure Container Instances cost: per-second vCPU and memory, no cluster

Azure Container Instances bills per vCPU-second and memory-GB-second while a container runs, with no cluster to manage or idle. It suits bursty and short-lived containers; steady workloads are cheaper on AKS. Here is the model.

The C3X Team··4 min read

Quick answer

Azure Container Instances (ACI) bills per vCPU-second and memory-GB-second for the duration a container runs, with no cluster to provision or idle. It is ideal for bursty, short-lived, or event-driven containers. For steady, always-on workloads, AKS (or Container Apps) is usually cheaper per unit; ACI trades some efficiency for zero orchestration overhead.

Azure Container Instances runs a single container or container group without any cluster to manage. You pay for the resources it uses while it runs, per second, so an ACI container that runs for two minutes costs for two minutes and nothing after. That makes it cheap for the right workloads and expensive for the wrong ones.

Per-second resource billing

ACI bills per vCPU-second and per memory-GB-second for the container's runtime, based on the vCPU and memory you allocate to it. There is no cluster fee, no idle node cost, and no orchestration layer to pay for. Cost is resources times runtime, so a short-lived container is inexpensive.

When ACI fits

WorkloadACI fit
Bursty, event-driven containersGreat, pay only while running
Short-lived batch tasksGreat, no idle cost
CI/CD build agentsGood, spin up and down
Steady, always-on servicesPoor, AKS is cheaper per unit

ACI shines for bursty, short-lived, and event-driven containers, and for scaling out infrequently. For a service that runs continuously, the per-second rate over a full month exceeds the cost of the same container on a right-sized AKS node, so steady workloads belong on AKS or Container Apps, the tradeoff in Container Apps versus AKS.

Controlling ACI cost

Right-size the vCPU and memory allocated to each container, use ACI for bursty and short-lived workloads rather than always-on services, and stop containers as soon as their work is done since billing is per second of runtime. For anything running continuously, compare against AKS, where a right-sized node serving the same container is usually cheaper.

FAQ

How is Azure Container Instances priced?

Per vCPU-second and memory-GB-second for the duration a container runs, based on the resources you allocate, with no cluster fee or idle node cost. Cost is resources times runtime, so a short-lived container is inexpensive and there is nothing to pay when it is not running.

Is ACI cheaper than AKS?

For bursty, short-lived, and event-driven workloads, yes, because you pay only while containers run with no cluster overhead. For steady, always-on services, AKS is usually cheaper per unit, since the per-second ACI rate over a full month exceeds a right-sized AKS node serving the same container.

When should I use Azure Container Instances?

For bursty and event-driven containers, short-lived batch tasks, and CI/CD build agents that spin up and down, where paying only for runtime with no cluster is ideal. Avoid it for continuously-running services, which are cheaper on AKS or Container Apps.

How do I reduce ACI cost?

Right-size the vCPU and memory allocated to each container, use ACI for bursty and short-lived workloads rather than always-on services, and ensure containers stop as soon as their work is done since billing is per second. For continuous workloads, compare against AKS.

Does ACI charge when a container is not running?

No. ACI bills per second only while a container runs, with no cluster or idle cost, so a stopped or completed container incurs no compute charge. This is what makes it economical for bursty and short-lived workloads that would waste money on always-on infrastructure.

Does C3X estimate Azure Container Instances cost?

ACI cost is driven by vCPU and memory allocation times runtime, which are usage inputs. C3X prices the surrounding infrastructure, and you model container resources and runtime to estimate the per-second ACI charges.

What to do next

Compare ACI and AKS for your containers before you choose. C3X reads your Terraform and prices your resources against a live catalog. Start with the quickstart.

Try C3X on your own Terraform

Free and open source. No API key required. One command to install, one command to estimate.