简体   繁体   English

为 Service Fabric 配置 Azure 部署

[英]Configure Azure deployment for Service Fabric

I'm studying for Azure certification and I've got this problem:我正在学习 Azure 认证,我遇到了这个问题:

You are developing a Web API by using ASP.NET Core.您正在使用 ASP.NET 内核开发 Web API。 You plan to deploy the Web API to a 5-node Service Fabric cluster that is hosted in Azure.您计划将 Web API 部署到托管在 Azure 中的 5 节点 Service Fabric 群集。

Requirements:要求:

  • You must be able to debug the Web API on a local Service Fabric instance before deploying to Azure.在部署到 Azure 之前,您必须能够在本地 Service Fabric 实例上调试 Web API。
  • The Web API must run on every node in the Service Fabric cluster when deployed to Azure.当部署到 Azure 时,Web API 必须在 Service Fabric 群集中的每个节点上运行。
  • The Service Fabric configuration must support scaling of additional nodes. Service Fabric 配置必须支持扩展其他节点。

You need to configure the Web API for local and Azure deployment, setting the right property from "MinReplicaSetSize", "InstanceCount" and "TargetReplicaSetSize".您需要为本地和 Azure 部署配置 Web API,从“MinReplicaSetReplicaSetSize”、“InstanceCount.

I haven't find very helpful documentation or examples on this properties.我没有找到有关此属性的非常有用的文档或示例。

My solution is to set InstanceCount = 5 for Local and InstanceCount = -1 for Azure environment.我的解决方案是为Local设置InstanceCount = 5 ,为Azure环境设置 InstanceCount = -1 But I'm not sure of this.但我不确定这一点。

Is that the right property to set?这是正确的设置属性吗?

Yes, your solution is correct.是的,您的解决方案是正确的。

InstanceCount = 5 => Deploy on 5 nodes of the local cluster(For this you have to start the cluster with the 5 Node mode) InstanceCount = 5 =>部署在本地集群的 5 个节点上(为此,您必须以5 节点模式启动集群)

InstanceCount = -1 => Deploy on all available node on the remote cluster and need to worry about the mode. InstanceCount = -1 =>部署在远程集群上的所有可用节点上,需要担心模式。

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

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