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
}