简体   繁体   English

Azure上的多个应用程序-每个服务一个应用程序还是多合一?

[英]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: 我的项目是:

  • Public facing website - low load 面向公众的网站-低负载
  • Private dashboard - moderate load 专用仪表板-中等负载
  • Tracking (analytics) app that tracks impressions, clicks, etc. - high load - 5+ million clicks/month 跟踪展示次数,点击次数等的跟踪(分析)应用-高负载-每月5+百万点击
  • API - also high load as the Tracking app relies on it API-跟踪应用程序也依赖于它
  • Quartz.net scheduler (worker role) Quartz.net调度程序(工作者角色)

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. 您需要考虑几个方面的问题。

  • Deployment and versioning - Do you wish to be able to version and deploy parts of the system separately? 部署和版本控制-您是否希望能够分别对系统的各个部分进行版本控制和部署? There is an added cost to maintaining separate deployments, but the benefits are increased flexibility and ability to deploy changes in isolation. 维护单独的部署会增加成本,但是好处是可以提高灵活性并能够独立部署更改。 This is the most important aspect of your decision. 这是您决定中最重要的方面。
  • Team structure - Do you have multiple teams working on the system? 团队结构-您是否有多个团队在系统上工作? I would highly recommend separating deployment and versioning along team lines. 我强烈建议按照团队划分部署和版本控制。
  • Scalability - Both options are equally scalable from a performance perspective. 可伸缩性-从性能的角度来看,这两个选项均具有相同的可伸缩性。
  • UI performance - This shouldn't be a primary concern of your deployment design. UI性能-这不是您的部署设计的主要关注点。

How we have approached this problem: 我们如何解决这个问题:

  • Each system/sub-system has its own deployment and its own storage account. 每个系统/子系统都有自己的部署和自己的存储帐户。 This allows for easy versioning and operational management. 这样可以简化版本控制和操作管理。
  • Our systems/sub-systems are designed to perform a number of highly cohesive responsibilities. 我们的系统/子系统旨在履行许多高度凝聚的职责。
  • Inter-systems communication is message based (Azure queues for example). 系统间通信是基于消息的(例如,Azure队列)。
  • Each backend worker role's responsibilities (what we call "Role Services") can be easily moved between different Azure deployment roles via configuration depending upon the required performance characteristics. 每个后端工作角色的职责(我们称为“角色服务”)可以通过配置轻松地在不同的Azure部署角色之间转移,具体取决于所需的性能特征。
  • All backend work should be performance on a worker role. 所有后端工作都应该是在工作者角色上的表现。 IIS is a terrible host for background processes. IIS是后台进程的糟糕宿主。
  • UI performance is achieved by materializing all views (either into blob storage or memory). 通过实现所有视图(到Blob存储或内存)来实现UI性能。 A cache could be used as well. 也可以使用缓存。

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.

相关问题 多合一外壳扩展代码示例下载-CSShellExtContextMenuHandler - All-In-One shell extension code sample download - CSShellExtContextMenuHandler 在C#中使用DS创建“多合一”功能 - Create an “all-in-one” function using DS in C# 为什么4月份从All-In-One代码框架中删除了所有C#Shell扩展示例? - Why were all the C# Shell Extension Examples removed from the All-In-One code framework in April? 是否可以将2个单独的MVC应用程序部署到一个Azure Web App中? - Is it possible to deploy 2 separate MVC apps into one Azure Web App? 为Visual Studio 2008 C#应用程序创建安装包,为Mschart ALL-IN-ONE创建另一个安装包...这可能吗? - Creating an installation package for a Visual Studio 2008 C# application and another installation for Mschart ALL-IN-ONE… Is this possible? 此多合一XML加密/解密MSDN示例有何不正确之处? - What is incorrect from this All-In-One XML encryption/decryption MSDN sample? 通过 JSON 发送的日期时间在 Azure 应用服务上减去一天 - DateTime send through JSON subtract one day on Azure App Service 多个 Blazor 应用程序,相同的托管。 从第一个应用程序重定向到第二个应用程序。 Azure 应用服务 - Multiple Blazor apps, same hosting. Redirecting from the first app to the second. Azure App service 在一项云服务中的80端口使用Azure多个WebRoles - Azure multiple WebRoles at 80 port in one Cloud Service 多个 Visual Studio 解决方案在一个 Azure Function 服务中 - Multiple Visual Studio Solutions in one Azure Function service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM