3

I currently have an Azure Application Gateway that is configured for a minimum of 2 instances and a maximum of 10 instances. It's Tier is "WAF V2" and autoscaling is enabled.

If autoscaling is enabled, then theoretically there should be somewhere between 2 and 10 instances. So where can I go to check the current number of instances that the gateway has scaled up to? This seems like important information if you want to figure out if your gateway is overloaded.

4c74356b41
  • 69,186
  • 6
  • 100
  • 141
bnsmith
  • 1,667
  • 19
  • 30

3 Answers3

2

I currently have been pointed out by Microsoft to this topic after asking them the same question. My assumption on this that I take, and may not be acurate, is that I look at the Current Capacity Units metric, to see how many are in use for a certain moment. Since, documentation says one instance uses around 10 capacity units, I do the simple math to know how many instances we are using, and if we need to increase the max, or lower the minimum.

https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-autoscaling-zone-redundant

"Each capacity unit is composed of at most: 1 compute unit, or 2500 persistent connections, or 2.22-Mbps throughput."

"Note

Each instance can currently support approximately 10 capacity units. The number of requests a compute unit can handle depends on various criteria like TLS certificate key size, key exchange algorithm, header rewrites, and in case of WAF incoming request size. We recommend you perform application tests to determine request rate per compute unit. Both capacity unit and compute unit will be made available as a metric before billing starts."

Nuno Silva
  • 73
  • 1
  • 8
2

I've tried to obtain this value with Logs analytics. Enable it and use this query:

AzureDiagnostics
| where TimeGenerated > ago(30m)
    | summarize dcount(instanceId_s) by bin(TimeGenerated, 1m)

You will have the different request grouped by the distinct instance name every minute. Consider adding some additional filter to the query, since you may only be interested in certain types of events.

I think it can be a good approximation

massisenergy
  • 1,764
  • 3
  • 14
  • 25
1

I don't think it shows you the current number of instances (if you switch to manual it will show you the instance count under properties blade), because it doesn't make sense. That's what autoscale is for, you don't really care how many instances are running, what you care is request latency\failed requests. If you see those increase, you can increase the number of maximum Application Gateway instances.

Api gives the following response with autoscale enabled:

"sku": {
  "name": "Standard_v2",
  "tier": "Standard_v2"
},

And this without autoscale enabled:

"sku": {
  "name": "Standard_v2",
  "tier": "Standard_v2",
  "capacity": 4
},

so I guess it hidden from the api, so no way to know it.

4c74356b41
  • 69,186
  • 6
  • 100
  • 141
  • That is interesting. I think that I can see where you're coming from, but it seems inconsistent with some other parts of Azure. For example, if you go to "Virtual Machine Scale Sets", you can see how many instances are currently rolled out. If this information is simply not made available by Azure, then I guess that I will just have to accept that. – bnsmith May 06 '19 at 14:37
  • Thanks for your help! I guess it looks like Azure doesn't allow this question to be answered. That still seems strange to me... but I guess that's the way it is. As long as there is basically no other way that a request latency spike can occur aside from having too few instances, then I guess their system can work OK. – bnsmith May 06 '19 at 15:00
  • I'm interested to know number of running instances for billing purposes. – Ondřej Hlaváček Apr 02 '20 at 14:00