locked
Azure Web App Scale Instance ID in App Setting? RRS feed

  • Question

  • Hello!  With deployment slots there is a WEBSITE_SLOT_NAME App Setting for each deployment slot so that my ASP.NET app can uniquely identify each deployment slot. Is there a way that I can uniquely identify each Instance when I use the Scaling feature? I'm trying to consume messages from an Azure Service Bus Topic from the ASP.NET Web App and each deployment slot has its own uniquely named Subscription on the topic, but if I scale up a deployment slot, I also want each instance to be receiving all messages published on the Topic.

    Any thoughts would be greatly appreciated.

    Thanks!

    Jason.

    Thursday, November 12, 2015 11:43 PM

Answers

  • There is a WEBSITE_INSTANCE_ID environment variable that is unique per instance.  Note though that as your apps move around to different underlying virtual machines, the WEBSITE_INSTANCE_ID will change.  But you are guaranteed that it will be unique per app instance.
    • Marked as answer by jhess001 Friday, November 13, 2015 9:22 PM
    Friday, November 13, 2015 5:31 PM

All replies

  • There is a WEBSITE_INSTANCE_ID environment variable that is unique per instance.  Note though that as your apps move around to different underlying virtual machines, the WEBSITE_INSTANCE_ID will change.  But you are guaranteed that it will be unique per app instance.
    • Marked as answer by jhess001 Friday, November 13, 2015 9:22 PM
    Friday, November 13, 2015 5:31 PM
  • Excellent, Thanks! http://microsoftazurewebsitescheatsheet.info showed me how to see the value of these variables through Kudu: https://<your-website-name>.scm.azurewebsites.net.

    Friday, November 13, 2015 9:26 PM