Multiple roles on the same instance in Windows Azure

前端 未结 4 1506
执念已碎
执念已碎 2020-12-09 03:49

Is it possible to deploy multiple roles in the same instance?

I have three web roles (website in asp.net mvc3, and two WCF services instances) and two worker roles (

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-09 04:27

    A slightly different answer than @Simon's... A Role is actually a template for a Windows Server 2008 VM (see my answer on this SO question as well). Each role has one or more instances, and you can run whatever you want on any role.

    You can absolutely run your website and all your WCF services in a single role. You'll now scale your application up/down (VM size) and out/in (# of instances) as a single scale unit. If, say, your WCF services are CPU-intensive, causing the VM instances to slow down for your web visitors, you'll need to scale out enough to handle those visitors.

    Once you reach a significant traffic load, it's worth considering separate roles. That way, you can decide on VM size and quantity per role. Maybe you have 2 or 3 Small instances of a Web role to handle your user traffic on the website, and maybe 2 Medium instances of a Worker role to handle WCF services (just as an example). The more roles you have, the finer-grain scaling you have, but you must run at least one instance of each role, which elevates your "system at rest" baseline cost.

提交回复
热议问题