Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will Azure ever run 2 instances of my worker role?

I have a worker role that installs a legacy Windows service. If more than one instance of the service ever runs at the same time it would be problematic. So I'm trying to understand if this can ever happen (note we are only running 1 medium instance).

I've noticed with our Azure cloud service that the actual VM our site runs on gets switched/reimaged every week or so. I assume the way that Azure does this is that it builds a new VM with our web and worker roles then does a VIP switch from the old VM to the new VM when the new VM is ready. My question is, during this period of switching could the service be running on both the old and new VMs at the same time? Or does Azure not start the worker role until after the VIP switch?

Lots of assumptions there that I could be way off on, but hopefully you get the basic idea of the question. Any thoughts? Thanks in advance!

like image 287
NorthFork Avatar asked Apr 30 '13 15:04

NorthFork


1 Answers

If you only have your deployment set up to run 1 instance, you'll only get 1 instance. You won't get a VIP-swap. During Guest OS (or Host OS) update, your service will be offline for a short period of time (there's no single-instance SLA). Note: If you have two or more instances, then indidiual instances are updated one at a time (or in groups) based on how many update domains you have. During this period, traffic is still round-robin'd to the remaining instances. Then, with your new instance up, it will start receiving traffic while another gets taken down. And so on.

Also: Guest OS images are updated ~monthly, not weekly. It's possible you'll see an occasional reboot for various reasons, but not from weekly Guest OS rollouts.

like image 123
David Makogon Avatar answered Sep 21 '22 22:09

David Makogon