Homeβ€Ί Blogβ€Ί Azure Architecture Series #98 β€” Application Gateway v2 Autoscaling and Zone Redundancy…
Azure Architecture Azure Architecture Series

Azure Architecture Series #98 β€” Application Gateway v2 Autoscaling and Zone Redundancy

Verified against current vendor documentation on 19 November 2026. Pricing, limits and API behaviour were checked against the official docs on that date. Cloud services change fast — if you are reading this much later, treat the specifics as a starting point and re-check the linked sources.

Business Challenge

#97 described how a request finds its way through this gateway. This post is about the thing underneath that: how many gateways there actually are, where they sit, and what the meter is counting.

The first fact resolves a question yesterday's post left open. #97 set out two different mechanisms for deciding which listener wins — rule order on v1, explicit priority on v2 — and presented them as a live choice. They are not:

v1 is gone, and the hardware is being decommissioned

“Microsoft announced the deprecation of Azure Application Gateway V1 on April 28, 2023. Application Gateway V1 retired on April 28, 2026, and Microsoft no longer supports V1 resources. There's no service-level agreement (SLA) for V1 resources. As Microsoft decommissions the hardware that supports V1, traffic passing through remaining V1 resources can't be guaranteed.”

So the listener-ordering tables that still carry a v1 column are documenting a SKU that retired seven months ago. The order question has one answer now: rule priority. The v1 column is history, kept because some deployments still exist — and the documentation is explicit about what happens to those: “Microsoft blocks the data path and deletes the resources”, after a notification.

That makes this the third retirement in four posts. #95: Basic Load Balancer, retired 30 September 2025. #96: default outbound access, changed 31 March 2026. Now Application Gateway v1. The Azure load-balancing family has had its entire first generation withdrawn inside about eighteen months, and in every case the documentation still reads as a comparison against the thing that is gone.

Architecture

Diagram: Application Gateway v2 autoscaling, capacity units and zones, across four bands. The first band defines the capacity unit, which is the billing and sizing unit. One capacity unit is two thousand five hundred persistent connections, or one gigabyte per hour of throughput which is two point two two megabits per second, or one compute unit; and critically the parameter with the highest utilization among those three is the one used, so the unit is a maximum rather than a sum. A compute unit itself is roughly fifty connections per second on Standard version two with an RSA two thousand and forty eight bit certificate, roughly ten on Basic version two, and roughly ten concurrent requests per second on WAF version two. The second band shows what a single instance is worth, and the answer is not one number. One Standard version two instance handles twenty five thousand persistent connections, five hundred megabits per second of throughput, and ten compute units. Divide each by its capacity unit figure and the connections path gives ten capacity units, the compute path gives ten, but the throughput path gives about two hundred and twenty five. So an instance carrying connection-heavy or compute-heavy traffic is worth ten capacity units while the same instance carrying throughput-heavy traffic is worth roughly twenty two times more, for the same hourly fixed cost. The third band covers the scaling controls and their timing. Minimum instance count ranges from zero to one hundred and reserves ten capacity units per instance that are billed whether or not they are used; zero reserves nothing. Maximum instance count ranges to one hundred and twenty five and defaults to ten when unspecified. Manual mode requires one to one hundred and twenty five. A new instance takes roughly three to five minutes to provision, instances scale out in groups whose size grows as the current count grows, and a scale-in drains connections for five minutes before closing them. Lowering the maximum does not take effect immediately: it is applied only after a scale-in brings the count below the new value, and if scale-in thresholds are never met the new maximum is never applied. The fourth band covers zones. Zone redundant means Azure spreads instances across two or more availability zones and manages failure detection and failover itself, with interruptions lasting seconds. Zonal means every instance sits in one chosen zone, which the documentation states does not by itself provide resiliency to a zone outage. Availability zone support cannot be disabled, and converting a zone redundant gateway to zonal requires building a new one. Every gateway always runs at least two instances even when the portal displays one. And the service level agreement requires the gateway to be either zone redundant or configured to use autoscale.
A billing unit that is a maximum, an instance worth 10 or 225 of them, and an SLA with a condition attached.

The capacity unit is a maximum, not a sum

One capacity unit, three definitions

“A single Capacity Unit consists of the following parameters: 2,500 Persistent connections · 1 GB per hour (2.22-Mbps) throughput · 1 Compute Unit. The parameter with the highest utilization among these three parameters is used to calculate capacity units for billing purposes.”

Three dissimilar measurements, and whichever is furthest along its own scale sets the number. The documented metrics example shows it working: compute units 17.38, throughput 10.96 Mbps, connections 123.08k — and the answer is max(17.38, 10.96/2.22, 123.08k/2500) = 49.232. Connections won, by a wide margin, and the other two measurements contributed nothing.

Which means capacity planning here cannot be done on an average. You need to know which of the three parameters your traffic maxes out first, because that one is your bill and the others are free.

What one instance is actually worth

ParameterPer Standard_v2 instancePer capacity unitInstance = how many CU
Persistent connections25,0002,50010
Compute units10110
Throughput500 Mbps2.22 Mbps~225

The documentation states the consequence plainly: “in cases where the dominant factor is either compute units or persistent connections, each instance can handle 10 capacity units. In cases where the dominant factor is throughput, each instance can handle approximately 225 capacity units.”

That is a factor of roughly twenty-two in what the same hourly fixed cost buys you, decided entirely by the shape of your traffic. A gateway fronting large file downloads and a gateway fronting a chatty API with many idle keep-alives have nothing in common from a sizing perspective, even at identical request rates.

What the money looks like

ComponentStandard_V2WAF_V2
Fixed, per hour (illustrative, East US)$0.246$0.443
Capacity unit, per hour$0.008$0.0144
Derived: WAF premium on the fixed component0.443 ÷ 0.246 = about 1.8×
Monthly basis730 hours

Two structural properties of that table matter more than the rates, which are illustrative and will move.

First, “the number of instances running at any point of time isn't considered in calculating fixed costs” — the fixed component is per gateway, per hour, flat. Second, a partial hour is billed as a full hour. So a gateway that exists is costing money whether or not anything is talking to it, and the instance count moves only the variable half.

One cross-service note worth carrying from #87: “When Azure DDoS Network Protection is enabled on your application gateway with WAF you're billed at the lower non-WAF rates.” The DDoS subscription absorbs the WAF premium.

Why This Architecture Holds Up

Because the minimum instance count is a bill, not a safety net

Reserved capacity is billed whether you use it or not

“The manually set scale for instance count and the minimum instance count in autoscale config reserves 10 capacity units/instance. These reserved capacity units are billed as long as the application gateway is active regardless of the actual resource consumption.”

So a minimum instance count of 6 is a standing order for 60 capacity units an hour, forever, used or not. The documented billing metric makes the arithmetic explicit: Estimated Billed Capacity units is “the greater value between Current capacity units… and Fixed billable capacity units”.

The opposite choice is available and genuinely free of reservation: “Zero signifies no reserved capacity and is purely autoscaling in nature”, and “even if you configure autoscaling with zero minimum instances the service is still highly available, which is always included with the fixed price”. A gateway at minimum zero with no traffic bills the fixed cost and nothing else.

The cost of choosing zero is latency on the first burst, which brings us to the number that decides whether that is acceptable.

Because scale-out takes minutes and bursts do not wait

“Provisioning a new instance may take approximately three to five minutes.”

That is the whole argument for a non-zero minimum, and it is an argument about traffic shape rather than cost. A workload whose load ramps over tens of minutes can autoscale from zero reserved capacity and never notice. A workload that goes from quiet to peak in ninety seconds will be under-provisioned for the first few minutes of every such event, and no setting shortens that.

There is a partial mitigation built in, and it is unusual enough to note: “These instances scale out in groups, and the group size is increased proactively when the current instance count is higher.” A larger gateway adds instances in larger batches, so the service scales faster the bigger it already is. Which is the correct behaviour and also means the cold-start case is the slowest case.

On the way down, the behaviour is gentler and worth knowing for connection-sensitive workloads: “Application Gateway drains existing connections for 5 minutes on the instance that is subject for removal. After 5 minutes, existing connections are closed and the instance removed.” That is a hard ceiling on a connection's survival across a scale-in, independent of the connection draining setting #97 covered for backend pool changes.

Because lowering the maximum may never take effect

A cost control that waits for permission

“If the maximum instance count is updated to a value less than the current instance count, the new setting will not take immediate effect. The newly updated maximum will only be enforced after a scale-in operation brings the current count below newly updated maximum count. If the scale-in operation does not occur because the autoscaling scale in thresholds are not met, the new maximum setting will not be applied.”

Read that as an operator reaching for the maximum to cap a cost overrun during sustained load. The change is accepted, the portal shows the new value, and nothing happens — because the condition for applying it is a scale-in, and sustained load is precisely what prevents one. The control works when you do not need it and does not when you do.

The companion default is worth checking on existing deployments too: “The default value for maximum instance count is 10 if not specified.” Ten instances is 100 capacity units of compute-bound or connection-bound headroom. A gateway that was never given an explicit maximum has one anyway.

Because “zonal” is not a weaker form of zone redundancy

Zone-redundantZonal
PlacementInstances across two or more zonesAll instances in one zone you choose
Zone outage detectionMicrosoft's, automaticYours
FailoverAutomatic, no customer actionYou fail over to a secondary gateway you built
Expected downtimeInterruptions of a few secondsUnavailable until the zone recovers
Default in the portalYesNo

The names suggest a spectrum. They are opposites: “By itself, a zonal gateway doesn't provide resiliency to an availability zone outage.” Zonal exists for one documented reason — “only recommended when cross-zone latency is too high for your needs” — and buying it means taking on detection, failover and failback yourself.

Two properties constrain how you get there. Availability zone support “can't be disabled”, so every gateway in a zone-capable region is one or the other. And the conversion is one-way in practice: “If you need to move from a zone-redundant gateway to a zonal configuration, you need to deploy a new gateway.”

A detail that resolves a common piece of confusion: “each gateway is always created with a minimum of two instances. However, the Azure portal may indicate that your gateway has a single instance, even though it actually has two.” The portal under-reports. Nobody is running one.

And the zone spread is a range rather than a guarantee: in a three-zone region a zone-redundant gateway has instances in “at least two of those zones… instances might be spread across two zones or three zones”, because the underlying scale set does “best-effort zone balancing” and “scaling operations might not occur when the capacity can't be evenly divided between zones (+/- 1 instance)”.

Because the SLA has a configuration condition

Two ways to qualify, and you need one of them

“For a gateway to be eligible for the Application Gateway availability SLA, it must… either be zone redundant, or it must be configured to use autoscale.”

A manually scaled, zonal gateway is outside the SLA. That is a configuration most people would describe as deliberate and conservative — a fixed instance count, pinned to a known zone — and it is exactly the combination that forfeits the guarantee. Either lever alone satisfies it.

Because the subnet has to have room for instances you never asked for

Autoscaling and maintenance both create instances, and instances need addresses:

“To maintain your expected capacity during an upgrade, the platform automatically adds extra instances of your gateway during the upgrade process. However, you need to ensure that the gateway's subnet has sufficient free IP address space for the temporary instances to be created.”

The same applies during a zone outage, where “the platform attempts to maintain the capacity of your gateway by creating temporary instances in other availability zones”. A subnet sized exactly to the current instance count works perfectly until the first platform upgrade or the first zone failure — which is to say, until the moment it matters. This is #62's address-planning argument arriving with a specific number attached to it.

Key Architecture Decisions

DecisionChoiceWhy
Running anything on v1 Migrate now V1 retired 28 April 2026, has no SLA, and remaining deployments face data-path blocking and deletion as the hardware is decommissioned.
Sizing method Identify which of the three capacity unit parameters saturates first A capacity unit is the maximum of connections, throughput and compute — not a blend. The other two contribute nothing to the bill.
Estimating instances needed 10 capacity units per instance, unless throughput dominates A throughput-bound instance carries about 225 capacity units — roughly 22 times more for the same fixed cost.
Minimum instance count Set from burst shape, not from peak load It reserves 10 capacity units per instance billed regardless of use. Zero is genuinely free of reservation and still highly available.
Minimum zero for spiky workloads Avoid A new instance takes three to five minutes, and scale-out batches are smallest when the instance count is lowest.
Using maximum instance count as a cost control Don't rely on it under load Lowering it below the current count is only applied after a scale-in, and sustained load prevents the scale-in from happening.
Leaving the maximum unset Set it explicitly The default is 10 instances, which is a cap whether or not anyone chose it.
Zonal deployment Only for a measured cross-zone latency problem It provides no resiliency to a zone outage by itself, and you own detection, failover and failback.
Converting zone-redundant to zonal Treat as a rebuild It requires deploying a new gateway; zone support cannot be disabled at all.
Manual scaling with a pinned zone Avoid — it forfeits the SLA SLA eligibility requires the gateway to be zone redundant or configured to use autoscale.
Gateway subnet sizing Leave headroom beyond the maximum instance count Platform upgrades and zone outages both create temporary instances that need free addresses in the subnet.
Multi-region availability Separate gateways plus Front Door or Traffic Manager Application Gateway v2 is a single-region service; if the region is unavailable, so is the gateway.
Reading instance count in the portal Don't trust a displayed count of one Every gateway runs at least two instances; the portal may show one.

Closing Thought

The interesting thing about this service's scaling model is that it refuses to pretend capacity is one-dimensional. A capacity unit is openly a maximum across connections, bytes and compute, and the documentation publishes the arithmetic rather than hiding it behind a t-shirt size. That is more honest than most cloud sizing models, and it is also why nobody can size this gateway from a request-per-second figure alone.

What follows from that honesty is a set of controls that each do something slightly different from what their name suggests. Minimum instance count is a spend commitment. Maximum instance count is a cap that may decline to apply itself. Zonal is not a lighter zone redundancy, it is the absence of it. And the SLA is not automatic — it has a configuration predicate attached, which a cautious manual deployment can fail without ever being told.

And the one that reframes the cost conversation

The fixed component does not move with instance count. Scaling a v2 gateway up and down changes only the variable half, and a gateway that exists at all is billing its fixed hourly rate with a partial hour counted as a whole one. The expensive decision is not how big to make it — it is how many of them to have.

Which is the right note on which to leave the layer 7 gateway, because the next question in this series is what sits in front of several of them.

Comments

How was your experience?
Your feedback helps improve this site.
PoorExcellent