📜  Node.js 中 Web 角色和工作者角色的区别

📅  最后修改于: 2021-09-16 10:19:57             🧑  作者: Mango

Web 角色: Web 角色是 Azure 中的一个云服务角色,它被定制为运行由 IIIS(互联网信息服务)支持的编程语言开发的基于 Web 的应用程序,就像我们有 Node JS。

辅助角色:辅助角色是 Azure 中自定义为在后台服务进程中运行应用程序以及 Web 角色以频繁完成服务级别任务的任何角色。

Web 角色和 Worker 角色都是与在端口 80 上的 Azure 云服务上运行应用程序有关的角色。这两种服务都可以在同一个 Azure 实例上以相同的方式进行管理和部署。

Web 角色与辅助角色之间的区别:这两个角色之间的主要区别在于角色托管在虚拟机 (VM) 上的方式,例如 Web 服务器通过 IIS 托管应用程序,而辅助角色独立运行应用程序。

Web role

Worker Role

Web Role is a Cloud Service role in Azure. Any role in Azure that runs applications and performs certain tasks can be a worker role.
It is suited to run web applications that are developed on programming languages supported by IIIS. It is suited to run applications and services level tasks.
Web Role automatically deploys and hosts the app through IIS. It does not use IIS, and it runs your app standalone.
This primary role is to create web-based applications easily. It is used to perform supporting background processes along with Web Roles.
IIS is installed by default. IIS is not installed by default.
For some complex applications, incoming requests from the user can be handled by web role.  For some complex applications, incoming requests are passed to the worker role for processing.