简体   繁体   English

在Azure上部署WCF服务:Web角色还是辅助角色?

[英]Deploying WCF Service on Azure : Web Role or Worker Role?

I am evaluating the various options to deploy a web service in Azure. 我正在评估在Azure中部署Web服务的各种选项。 Presently, the web service would be consumed only by a front end UI which will be deployed as a separate web role within the same cloud service that would be hosting the web service. 当前,Web服务将仅由前端UI消耗,该前端UI将作为单独的Web角色部署在将托管Web服务的同一云服务中。 However, the web service would be exposed in its own right at a later stage. 但是,该Web服务将在以后阶段自行暴露。 Apparently, web services can be hosted from within either Web Role or from a worker role. 显然,可以从Web角色或工作角色中托管Web服务。 Could you please throw some light on pros and cons of either approach? 您能否说明这两种方法的利弊? Which of these approaches would you recommend for my scnario? 您会为我的方案推荐以下哪种方法?

A web role assumes that the application will be hosted in IIS. Web角色假定该应用程序将托管在IIS中。 If your service does not require any of the benefits provided by IIS or its HTTP stack, then hosting it in a worker role may do you perfectly fine and also provide you a lower resource utilization for that service (since there's no "overhead" for the IIS server). 如果您的服务不需要IIS或其HTTP堆栈提供的任何好处,那么将其托管在工作角色中可能会很好,并且会降低该服务的资源利用率(因为该服务没有“开销”) IIS服务器)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM