I already have a hosted service deployment which has 2 worker role instances, I want to add another 3 worker role instances to the same hosted service and at the same time, I don’t want existing 2 worker role instances to be restarted.
While I can create another hosted service and put the new 3 instances into it, But, I have heard that Azure supports only 6 hosted services per account. Is that true?
As my application will use cloud drive function, so I will only create 1 instance per role.
I’m not sure I am fully understanding your question here, but here are some ideas. 1) As has been noted, if you want to add instances of existing worker roles that can be done, and you should (I believe even in Java) be able to keep the existing instances from restarting.
2) If you do want to create new roles (new definitions) it is possible to do this, and as suggested it is possible to go past the ‘limit’ of 6 services. And if you want to add new roles without restarting everything it is also possible – see http://blogs.msdn.com/b/windowsazure/archive/2011/10/19/announcing-improved-in-place-updates.aspx for more information.
3) You also mention a desire to run a single instance of each role because of the use of the ‘cloud drive’ I’m not sure I understand the issue here. If you are mounting the same drive it does not matter if it is mounted from a single instance of a role or many, or mounted by different roles – in any case it is only possible to mount it from one instance for writing, but you can mount it from multiple instances for reading.
I hope this is helpful. Please let me know if I have misunderstood your issues/questions and we’ll see if we can find the right answer!
Thanks and good luck!