[英]Multiple apps on Azure - one app-per-service or all-in-one?
We are developing a large application that consists of several web apps (under separate domains) as well as a background scheduler (using Quartz.net) which would run on a Worker Role (currently it is a Windows Service but that doesn't make sense on Azure). 我们正在开发一个大型应用程序,该应用程序由几个Web应用程序(在不同的域下)以及一个后台调度程序(使用Quartz.net)组成,该后台调度程序将以Worker角色运行(当前是Windows Service,但没有意义)在Azure上)。 I am trying to figure out what is the best approach for us: separate hosted service for each app or running all apps under a single hosted service/role.
我正在尝试找出最适合我们的方法:为每个应用程序提供单独的托管服务,或者在单个托管服务/角色下运行所有应用程序。 I guess there's a third option of running multiple web roles under a single hosted service but then I need to utilize ARR (app. request routing) which I'm not sure what benefit (if any) it will give me.
我猜还有第三种选择,可以在单个托管服务下运行多个Web角色,但是随后我需要利用ARR(应用程序请求路由),我不确定这会给我带来什么好处(如果有)。 Sounds to me like even more overhead but I could very well be wrong?
在我看来,这似乎需要更多的开销,但我很可能会错吗?
My projects are: 我的项目是:
The public website and dashboard probably should be on a single web role but I am unsure whether the tracking and API projects should be using their own cloud services so they can scale independently or whether I should run everything on a single web role using host headers (except the scheduler of course) and scale everything at once. 公共网站和仪表板可能应该在单个Web角色上,但是我不确定跟踪和API项目是否应该使用自己的云服务,以便它们可以独立扩展,或者我是否应该使用主机头在单个Web角色上运行所有内容(除了排程器),然后立即缩放所有内容。 All hosted services will be running multiple instances so I'm not worried about things going down during deployment (as Azure transitions one instance at a time).
所有托管服务都将运行多个实例,因此我不必担心部署期间发生故障(因为Azure一次转换一个实例)。
Also, is running on a single role going to give me better latency between the client apps (web, dashboard, tracking) and the API or do affinity groups and virtual networks make that point irrelevant? 此外,在单个角色上运行是否会给我带来更好的客户端应用程序(Web,仪表板,跟踪)与API之间的延迟,或者亲缘关系组和虚拟网络是否使这一点无关紧要?
I have been searching for the best answer for a while but haven't found anything conclusive enough. 一段时间以来,我一直在寻找最佳答案,但是还没有确定的结论。
My primary concern is raw performance and scalability. 我主要关心的是原始性能和可伸缩性。 Price is not a deciding factor for us.
价格不是我们的决定因素。
Thank you 谢谢
It depends... 这取决于...
There are a couple of dimensions to your question that you need to consider. 您需要考虑几个方面的问题。
How we have approached this problem: 我们如何解决这个问题:
There can not be one single answer to your question ever. 您的问题永远不可能有一个答案。
As your tracking app is basically based on your API, so i am assuming that there is no direct outside traffic coming to your API and its only used by your tracking app. 由于您的跟踪应用程序基本上基于您的API,因此,我假设没有直接的外部流量进入您的API,并且仅由跟踪应用程序使用。 So in this case i will have both of them in a single web role.
因此,在这种情况下,我会将他们两个都放在一个Web角色中。
However, if you are expecting huge load on your API other than from you tracking, considering that there may be some external clients of your API, then better to have it on a separate web role. 但是,如果除了跟踪之外,还期望API上有巨大的负担,请考虑到API可能有一些外部客户端,那么最好将其放在单独的Web角色上。
Regarding you other 2 web apps, as they don't have much load, you can actually combine them with either of your tracking or api roles. 关于其他2个Web应用程序,因为它们负载不大,所以您实际上可以将它们与您的跟踪或API角色结合使用。 Else, if you really dont care about pricing have a third role to host you public site and dashboard.
否则,如果您真的不在乎定价,则可以扮演第三角色来托管您的公共站点和仪表板。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.