Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
I understand that you would like to know how to get the number of instances of App Gateway when Auto Scaling is enabled.
You are right, currently we do not have a mechanism to check the number of instances in App Gateway.
However, if your primary concern is cost management, I don't think so you would require the instances count.
See : Pricing for Azure Application Gateway.
- The pricing is based on the Capacity Units and not based on number of instances.
- And the number of Capacity Units being used is available in Azure Metric Logs.
- This means, you can always gather the value from peak performance time window from the Metric and determine the corresponding Instance Count.
- Each instance guarantees a minimum of 10 capacity units in terms of processing capability.
- So a "20 capacity units" would mean 2 Instances, and "22 capacity units" would mean 3 Instances.
I understand this is not straightforward, but I hope the above gives more clarity.
Should you wish that this should be implemented, you may post this in the Azure Feedback Hub forum.
All the feedback shared in these forums are monitored and reviewed by the Microsoft engineering teams responsible for building Azure
Please let us know if we can be of any further assistance here.
Thanks,
Kapil