Azure Container Apps Pricing Comparison
Exploring the cloud landscape for your next deployment? Choosing the right platform can significantly impact your project’s success. In today’s digital era, Azure stands as a powerhouse in the realm of cloud computing, offering loads of services tailored to diverse needs. Among its offerings, Azure Container Apps and Azure App Services emerge as two prominent choices for hosting applications, each with its own set of advantages and costs. In this comprehensive comparison, we delve into the pricing structures of Azure Container Apps and Azure App Services, dissecting their features and cost implications to help you make an informed decision for your next venture.
Azure Container Apps
Azure Container Apps introduces a flexible and transparent pricing model designed to accommodate varying workloads and usage patterns. At its core, the pricing of Azure Container Apps revolves around resource consumption, offering a pay-as-you-go approach that scales with your application’s demands. Users are billed based on the resources consumed by their containerized workloads, including CPU cores, and memory usage. Azure Container Apps also provides the option for both consumption-based and reserved instance pricing, allowing customers to optimize costs based on their long-term deployment strategies. Additionally, Azure’s commitment to transparency means users can easily estimate and track their expenditures through detailed usage reports and cost management tools, ensuring cost predictability and control over their cloud spending.
Azure App Services
Azure App Services presents a straightforward and accessible pricing model tailored to meet the needs of developers and businesses alike. With Azure App Services, customers can choose from several pricing tiers, ranging from a free tier suitable for basic experimentation and small projects to premium tiers offering enhanced performance and scalability features. Pricing is primarily determined by the chosen tier, which dictates factors such as available resources, support for custom domains, SSL certificates, and auto-scaling capabilities. Additionally, Azure App Services offers the flexibility of scaling resources both vertically and horizontally to accommodate fluctuating demands, with costs adjusting accordingly. This transparent pricing structure allows users to align their expenses with their application’s requirements, ensuring cost-efficiency and scalability as their projects evolve.
This comparison
Because the pricing structure between both is so different, comparing them is a challenge because it feels like comparing apples with oranges. So to set the stage, we aim for a small-load production web application. During the day, the application receives a fair amount of requests (1 to 5 thousand requests per hour) with some peaks of 10 to 20 thousand requests. At night, the website seems pretty quiet. This means that we may need an automated way to scale the app so it scales down at night to save some costs, scale up at daytime, and can scale up during the peak hours so it can handle the peak loads.
For App Services
Standard or Premium App Service Plans provide a 99.95% SLA. These plans maintain App Services on Azure virtual machines located in an Availability Set with fault domains and update domains. Because we need the app to automatically scale up and down depending on the load (amount of requests / second) we need the Premium plan. Standard does not support auto-scaling.
For Azure Container Apps
Unfortunately, there are no increased SLAs specifically for Azure Container Apps. The SLA for Azure Container Apps remains at 99.95%, regardless of whether or not you use availability zones. However, it’s essential to configure your environment properly to take advantage of the reliability features provided by availability zones. Pricing for Azure Container Apps is per resource / per second. Container Apps can be scaled back to 0 resulting in no costs at all because no resources are effectively used.
Azure App Services allows you to reserve instances or take advantage of cost-saving plans that may reduce costs between 13% and 43% if you reserve resources for 3 years or more. These advantages are not taken into account for this comparison.
And finally… Costs may differ in various Azure regions and may change over time. This blog post has the intent to compare costs between two different Azure services and not to provide detailed information about the costs of these services.
The pricing comparison
Again, this pricing comparison focuses on this specific workload, you should consider your personal situation and investigate your workload. Given the service is quiet for 8 hours at night, active for 13 hours at daytime, and scaled up to 3 instances (replicas) during peaks.
Azure App Services
Given we need the premium plan to host our service in Azure, and the workload is considered to be fairly low, we can go for the smallest Premium SKU. When you run your App Service on a Linux machine, this will cost around $84 per month (per instance). You could run one instance, but with two you comply with the SLA promising a 99.95% uptime. This will result in a $170 per month app service.
Time | State | Costs |
---|---|---|
Night (8 hours) | Idle | $0.8218 |
Daytime (13 hours) | 1 instance | $1.508 (13 hours running one instance) |
Peak hours (3 hours) | Peak (3 instances) | $1.044 |
This makes the App Service run for around $3.3738 per day resulting in a roughly $101 per month cost.
Azure Container Apps
For Azure Container Apps, I don’t recommend scaling back to 0. This is because when receiving the first request, the app needs to scale to one replica, resulting in downloading the container image from a container registry and spinning that up. Depending on the image size of your container and the time it takes your app to spin up will take at least 5 to 10 seconds but potentially more. This means that the user using your application must wait that amount of time before receiving a response. This is only for the first required. When the app is up and running, this latency is reduced.
One of the biggest advantages that comes with Azure Container Apps is the reduced costs when the service is idle. So although technically, there are resources reserved for your services, when those resources are not actively used, you only pay 20% of the resource costs. Keeping at least one replica up and running during the night is therefore fairly cheap, while still having a rapid response time when the first request in the morning comes in.
For the vCPU, Azure Container Apps cost $0.1224 per hour, and $0.0144 per hour for memory. That is $3.2832 per day, per vCPU / Memory Second. And… The first 180,000 vCPU seconds are free, the first 360,000 memory seconds are free and the first 2 million requests are free. That means you can run the same service at almost the same costs, but there are some advantages.
Daily costs
Time | State | Costs |
---|---|---|
Night (8 hours) | Idle | $0.2188 (20% resource costs because of the idle time) |
Daytime (13 hours) | 1 replica | $1.7784 (13 hours running one replica active) |
Peak hours (3 hours) | Peak (3 replicas) | $1.2312 |
So for $3.1284 a day, you can run this service with an auto scaler and all we need, making the total cost around $94.00 a month. But, I did not take the free 180,000 vCPU and 360,000 free Memory seconds into account here, lowering the cost to around $88.00
My personal experience
I Have a demo app running on Azure Container Apps, that consists of 5 services and runs at least one instance at all times. It is a demo app that I use at my conference talks, a game played by the entire audience. So most of the time, the game services are all idle, giving me the 20% advantage. When the game is actively played, it scales up rapidly because thousands of requests per second are received. Then within a couple of minutes, the service is scaled back to one replica and will idle again. Now in this scenario, using Container Apps is a huge advantage. The image above shows the pricing of the service per month. Notice the Azure Container Apps service cost my -only- €19.05 (roughly $20.00) per month.
Conclusion
The conclusion is that when you look at the workloads for different scenarios during the day, the cost advantage varies. When you know or can predict this load for your service, this allows you to run the service with the most economical setup for your service. It is worth taking the idle time of Azure Container Apps into account if you expect idle times. If you have a service that requires a constant load, Azure App Service is great. Easy to use and get up and running. If you have a service that can or must be scaled, Azure Container Apps could be a better fit and may save you some dollars.