
Estimating the cost of Azure Application Gateway can be a complex task, but understanding the pricing model is key to making informed decisions.
The cost of Azure Application Gateway is based on a tiered pricing model, with three main tiers: Standard, WAF (Web Application Firewall), and WAF Premium.
Each tier has different pricing structures, with the Standard tier being the most cost-effective option, starting at $0.008 per hour for a small instance.
To give you a better idea, a small instance of Azure Application Gateway costs $0.008 per hour, which translates to $58.88 per month.
A WAF instance, on the other hand, starts at $0.015 per hour, with a monthly cost of $103.68 for a small instance.
WAF Premium instances are the most expensive option, starting at $0.025 per hour, with a monthly cost of $172.80 for a small instance.
The cost of Azure Application Gateway also depends on the number of instances you need, with more instances increasing the overall cost.
Azure Application Gateway Pricing
Azure Application Gateway Pricing can be complex, but it's essential to understand the costs involved.
The Pricing calculator can help estimate your expected monthly costs for using any combination of Azure products.
Fixed pricing is calculated based on the number of hours your Application Gateway is running. For example, if you're running it for the entire month, the fixed price would be $0.443 * 730 hours.
Variable costs depend on the number of capacity units required to handle your traffic. In one example, 4 capacity units were required to handle 8.88 Mbps of data transfer, resulting in a variable cost of $42.048.
DDoS Network Protection Cost is a separate charge that can add up quickly, with a monthly cost of $2,944.
Variable costs can also be affected by the number of capacity units used. In another example, using 10 and 20 capacity units for one hour each resulted in a variable cost of $0.24.
Cost Components
Application Gateway for Containers charges on provisioning of each Application Gateway for Containers resource, Application Gateway for Containers Frontends, Application Gateway for Containers Associations, and capacity units.
You'll be charged per instance when using multiple instances. Monthly price estimates are based on 730 hours of usage per month.
Here are the four billable items for Application Gateway for Containers:
- Application Gateway for Containers resource
- Frontend resource
- Association resource
- Capacity units
Data processing charge is based on the amount of data processed by the application gateways, with the exception of Small instances which have unlimited data processing.
Data Processing
Data processing charges are based on the amount of data processed by application gateways. This means you'll pay more for handling large amounts of data.
For Small plans, data processing is unlimited, which is a great perk for small-scale applications. However, the price per GB is not specified, so be sure to check your provider's pricing.
The Medium plan offers a more balanced approach, with the first 10 TB of data included in the price. Any data exceeding this limit will be charged at a rate of $- per GB. This can add up quickly, so be mindful of your data usage.
Large plans offer even more data, with the first 40 TB included in the price. Again, any data exceeding this limit will be charged at a rate of $- per GB. If your application requires a large amount of data, this plan might be the best choice.
Here's a quick rundown of the data processing charges for each plan:
Variable Costs
Variable costs are a crucial aspect of Application Gateway pricing. They can vary depending on the region, pricing tier, and usage.
In the East US region, variable costs for Application Gateway capacity units are $0.008 per hour for standard V2 and $0.0144 per hour for WAF V2. These costs are calculated based on the number of capacity units consumed.
Outbound data transfers from Application Gateways are charged at standard data transfer rates. This means that data sent out of Azure data centers will incur additional costs.
Data processing charges are also variable and depend on the amount of data processed by Application Gateways. For example, in the East US region, the first 10 TB of data processed per month is free for Medium and Large Application Gateway types, while Small Application Gateway type has unlimited data processing at $- per GB.
Here's a breakdown of data processing charges for different Application Gateway types:
Variable traffic demands can result in higher capacity unit consumption, leading to increased costs. For example, if an Application Gateway for Containers resource is used with variable traffic, the costs can add up quickly.
In one scenario, a 1-hour period with variable traffic resulted in a total cost of $124.83, broken down into:
- Application Gateway for Containers resource: $12.41
- Frontend resource: $7.30
- Association resource: $87.60
- Capacity Units: $17.52
Useful Metrics for Estimation
To accurately estimate costs, it's essential to understand the metrics involved.
Current capacity units are a crucial metric, as they represent the number of capacity units consumed to load balance traffic across three key parameters: current connections, throughput, and compute units.
The fixed billable capacity units metric indicates the minimum number of capacity units kept provisioned as per the minimum instance count setting in the Application Gateway configuration.
This setting translates to 10 capacity units per instance, so if you have a single instance, you'll have 10 fixed billable capacity units.
The estimated billed capacity units metric calculates the number of capacity units estimated for billing, taking into account the greater value between current capacity units and fixed billable capacity units.
Here are the key metrics to consider for cost estimation:
- Current capacity units
- Fixed billable capacity units
- Estimated billed capacity units
These metrics can help you identify potential bottlenecks and make informed decisions about capacity units required.
Scalability and Autoscaling
Manual scaling can lead to additional costs if the reserved instances can't handle the traffic.
In situations of high load, reserved instances may be able to provide more than 10 Capacity units of processing capacity. However, it's recommended to provision the number of instances as per your traffic requirements.
Variable costs for manual scaling can be calculated based on the additional capacity units utilized. For example, if 10 additional capacity units were available for use within the reserved instances, the variable costs would be $233.6. However, if only 7 additional capacity units were available, the variable costs would be $216.08.
Autoscaling, on the other hand, allows you to scale up or down based on traffic demand. This can help reduce costs by only provisioning the necessary instances. For example, if you provision a WAF_V2 with autoscaling enabled and set the minimum instance count to 0, your variable costs would be $10.512 if the load is below the capacity of a single capacity unit.
In cases where there's 0 traffic directed to the WAF instance for the entire month, the variable costs would be $0.
Scaling Beyond Provisioned Capacity
Scaling Beyond Provisioned Capacity can be a tricky situation, especially when you're dealing with high traffic demands. In Example 1 (b), we saw that if the traffic exceeds the provisioned capacity, additional compute units (CUs) are required to handle the load. This can lead to increased costs, as seen in the example where the variable costs increased to $233.6.
To avoid this, it's essential to provision the right amount of instances based on your traffic requirements. According to the article, it's recommended to provision the number of instances as per your traffic requirements. This can help prevent overspending on additional CUs.
However, in some cases, even with manual scaling, reserved instances may not be able to provide more than 10 capacity units of processing capacity. This can lead to impact on the availability of your application, as seen in Example 1 (b) where the reserved instances were only able to provide 7 additional CUs.
To give you a better idea, here's a breakdown of the costs associated with scaling beyond provisioned capacity:
As you can see, the costs can vary significantly depending on the number of additional CUs required. It's crucial to carefully plan your instance provisioning to avoid overspending on additional CUs.
Waf_V2 with Autoscaling
Provisioning a WAF_V2 with autoscaling enabled and setting the minimum instance count to 0 can lead to significant cost savings if there's no traffic directed to the WAF instance for the entire month.
The variable costs for such a scenario would be $0, as seen in Example 2, where the calculation is $0.0144 * 0 (capacity units) * 730 (Hours) = $0.
However, if the WAF instance receives consistent but low traffic, the costs can still add up. For instance, with a load of 25 new TLS connections/sec and an average of 8.88-Mbps data transfer, the variable costs would be $42.048, which is equivalent to 4 capacity units required to handle 8.88 Mbps.
In this case, the total costs would be $365.438, which includes the fixed price of $323.39 and the variable costs of $42.048.
It's also worth noting that the WAF_V2 instance would require 4 capacity units to handle the data transfer, which would incur additional costs.
If the WAF instance requires more capacity units, the variable costs would increase accordingly. For example, if 10 capacity units were required, the variable costs would be $0.24.
Waf V2 Autoscaling and Capacity Unit Calculations
With WAF V2 autoscaling, you can provision a WAF instance with a minimum instance count of 0, which means the instance will only be activated when traffic is present. This can help save costs when your application is not receiving traffic.
In Example 3 (a), a WAF_V2 instance with autoscaling and 0 Min scale config is provisioned. The request load on the WAF is minimum but consistently present per hour for the entire month. The load is below the capacity of a single capacity unit.
Variable costs are calculated as $0.0144 * 1 (capacity units) * 730 (Hours) = $10.512.
You can also pre-provision resources by specifying the Instance Count. Each instance guarantees a minimum of 10 capacity units in terms of processing capability.
A single Capacity Unit consists of the following parameters: 2500 Persistent connections, 2.22-Mbps throughput, and 1 Compute Unit. The parameter with the highest utilization among these three parameters is used to calculate capacity units for billing purposes.
Here is a breakdown of the Capacity Unit parameters:
- 2500 Persistent connections
- 2.22-Mbps throughput
- 1 Compute Unit
If any of these parameters are exceeded, then another N capacity units are necessary, even if another parameter hasn't exceed a single capacity unit's limits.
Frequently Asked Questions
Why is the Azure gateway so expensive?
The Azure gateway's cost is based on the time it's provisioned and available, as well as the data it processes, making it a usage-based pricing model. This means you're charged per hour of usage and per unit of data processed, with discounts for multiple instances.
How to reduce Application Gateway cost?
To reduce Application Gateway cost, consider implementing cost-effective strategies such as autoscaling, caching, and efficient WAF rule configuration. By optimizing these settings, you can minimize unnecessary expenses and maximize your application's performance.
Sources
- https://azure.microsoft.com/en-us/pricing/details/application-gateway/
- https://learn.microsoft.com/en-us/azure/application-gateway/understanding-pricing
- https://azure.microsoft.com/en-us/pricing/details/web-application-firewall/
- https://www.linkedin.com/pulse/demystifying-azure-application-gateway-cost-vipulkumar-patel-f6ekf
- https://learn.microsoft.com/en-us/azure/application-gateway/for-containers/understanding-pricing
Featured Images: pexels.com