0

I have an Azure app service (asp.net MVC web app) and I have enabled auto-scaling (max 3 instances). Now I want that when new instances are scaled out I want what is its order no? For example: if currently 1 instance is running and then a scale-out happens then that new instance should identify that it is no 2 from the app startup. Again if a scale-out now happen then that instance should identity it is no 3 from app startup.

How can I do this in C#? In start up class ->

    public void Configuration(IAppBuilder app)
    {
          // How can I get the order of the newly created instance from here
    }
Keyur Ramoliya
  • 1,900
  • 2
  • 16
  • 17
Sumon154
  • 1
  • 1
  • 5

1 Answers1

0

As a workaround. We can create a Azure SQL Database to store the order number and in our web app, we can store it in cache(something like static variable).

More information for your reference:

Create an Azure SQL database in the Azure portal

Lee Liu
  • 1,981
  • 1
  • 12
  • 13