Containers are typically optimized to run just a single application, but the exact needs of those applications can differ greatly. Azure Container Instances provides optimum utilization by allowing exact specifications of CPU cores and memory. You pay based on what you need and get billed by the second.
Pricing Example
Example 1:
You create a Linux container group with a 1 vCPU, 1 GB configuration once daily during a month (30 days). The duration of each container group is 5 minutes (300 seconds).
Memory duration:
Number of container groups * memory duration (seconds) * GB * price per GB-s * number of days
1 container group * 300 seconds * 1 GB * $0.000005 per GB-s * 30 days = $0.045
vCPU duration:
Number of container groups * vCPU duration (seconds) * vCPU(s) * price per vCPU-s * number of days
1 container groups * 300 seconds * 1 vCPU * $0.000014 per vCPU-s * 30 days = $0.126
Total billing:
Memory duration (seconds) + vCPU duration (seconds) = total cost
$0.045 + $0.126 = $0.171
Example 2:
You create a Linux container group with a 1 vCPU, 2 GB configuration 50 times daily during a month (30 days). The container group duration is 150 seconds.
Memory duration:
Number of container groups * memory duration (seconds) * GB * price per GB-s * number of days
50 container groups * 150 seconds * 2 GB * $0.000005 per GB-s * 30 days = $2.25
vCPU duration:
Number of container groups * vCPU duration (seconds) * vCPU(s) * price per vCPU-s * number of days
50 container groups * 150 seconds * 1 vCPU * $0.000014 per vCPU-s * 30 days = $3.15
Total billing:
Memory duration (seconds) + vCPU duration (seconds) = total cost
$2.25 + $3.15 = $5.40
https://learn.microsoft.com/en-us/azure/container-instances/container-instances-overview
https://azure.microsoft.com/en-us/pricing/details/container-instances/