简体   繁体   English

具有多个接口/端点的Azure Web角色

[英]Azure Web Role with Multiple Interfaces/Endpoints

I've seen various attempts to place two or more web sites (URLs) on an Azure Cloud Service Web Role. 我已经看到了将两个或多个网站(URL)放置在Azure云服务Web角色上的各种尝试。 The solution is basically to hack up the ServiceDefinitions.csdef file which is a bit of overkill and doesn't appear to be supported by Visual Studio (VS forces you to have a dummy 'master' role and your web sites are manually patched into the configuration file. This is a big red flag that the architecture of multiple websites in a single role isn't anticipated by Azure.) 解决方案基本上是破解ServiceDefinitions.csdef文件,这有点过分了,Visual Studio似乎不支持(VS强制您扮演虚拟的“主”角色,并且将网站手动修补到配置文件。这是一个很大的危险信号,Azure不会预期单个角色的多个网站的体系结构。)

Instead of hacking the config file, is it possible to create multiple endpoints and associate them with interfaces, such as with WCF? 除了破解配置文件,还可以创建多个端点并将其与接口(例如与WCF)关联吗? As I mentioned in my original question , I have three ways I want the users to connect into an Azure 'Role': one for the data model (CRUD operations), one for the operator console (start, stop, statistics, etc.), one for the user-defined functions (the web site should be extensible). 正如我在最初的问题中提到的那样,我希望用户通过三种方式连接到Azure“角色”:一种用于数据模型(CRUD操作),一种用于操作员控制台(启动,停止,统计信息等)。 ,一种用于用户定义的功能(网站应该是可扩展的)。 I would like a separate endpoint for each of these major function groups (that is, well defined interfaces). 我想要每个主要功能组(即定义明确的接口)的单独端点。 It's trivial to do in WCF but I don't see how it's done in Azure. 在WCF中这样做很简单,但我看不到它在Azure中是如何完成的。

Web Roles support up to 25 input endpoints per deployment, allowing you to host multiple services in the same role (independent of instance count), just by setting up your service to listen on a specific named endpoint which you create ahead of time (it's part of the service definition). Web角色每个部署最多支持25个输入终结点,只需设置服务以侦听您提前创建的特定命名终结点(这是一部分),您就可以以同一角色(与实例数无关)托管多个服务。服务定义)。

As you scale out to multiple instances, the input endpoints will likewise be load-balanced across your role instances. 当您扩展到多个实例时,输入端点将同样跨角色实例进行负载平衡。

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

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