在Windows Azure的同一个实例的多重角色 [英] Multiple roles on the same instance in Windows Azure

查看:192
本文介绍了在Windows Azure的同一个实例的多重角色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能在同一个实例上部署多个角色?

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

我有三个Web角色(网址在asp.net MVC3和两个WCF服务的实例)和两个辅助角色(窗口服务)。

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

此应用程序的负载是非常小的,所以我不希望创建Windows Azure中如此多的情况下,现在支付的所有实例。相反,我想我的部署在同一个实例的所有应用程序,并在以后更改它,如果我将我的应用程序获得一些收入。

The load for this application is very small, so I don't want to create so many instances in Windows Azure and pay for all of the instances now. Instead I want to deploy all my application in the same instance and change it later if I will get some income from my applications.

我用Google搜索,发现了一些论坛的帖子超过了它的可能的,有的比这是不可能的......但我无法找到信息,该怎么办呢......

I Googled and found some forum posts than it's possible and some than it's not possible... but I can't find information how to do it...

于是两个问题:
是否可以?
我该怎么办呢?

So two questions: Is it possible? How can I do it?

推荐答案

一个稍微不同的答案比@西门的......一个角色实际上是一个Windows Server 2008的模板VM(见的这太问题以及)。每个角色都有一个或多个实例,并且可以运行任何你想要的任何角色。

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.

您绝对可以运行自己的网站,并在一个单一的角色所有的WCF服务。现在,您将扩展您的应用程序上/下(VM大小)和输出/输入(实例#)作为一个单独的刻度单位。比如说,如果你的WCF服务是CPU密集型的,导致虚拟机实例,以减缓为您的网站访客,你会需要进行扩展,足以应对这些游客。

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.

一旦达到显著的流量负载,这是值得考虑单独的角色。这样,你可以在虚拟机的大小和数量决定的每个角色的。也许你有2或3的Web角色实例小来处理网站上的用户流量,以及辅助角色也许2中的实例来处理WCF服务(就像一个例子)。你有更多的角色,更细晶粒缩放你,但你必须运行的每个角色,其中休息制度基准成本提升您的至少一个实例。

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.

这篇关于在Windows Azure的同一个实例的多重角色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆