0

I want to scale down the deployment. Typically Fabric closes the instance with higher instance ID, but I would like to control which one it closes.
So when changing instance count if I trap InfrastructureChange and return true would this prevent instance from closing? So far I got mixed results from my testing.

Also, does anybody know if Windows Azure allows closing specific instance?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
user2159200
  • 11
  • 1
  • 1

1 Answers1

1

You cannot control which instance is shutdown in Windows Azure and as you mentioned, generally the last one to be created is the first one to be deleted. The best you can do, is run cleanup code during the Stopping event and delegate unfinished code to a different instance.

Overall, Azure wants your instances to be doing small chunks of highly distributed work, not long-running jobs.

Igorek
  • 15,716
  • 3
  • 54
  • 92