3
votes

I'm studying for Azure certification and I've got this problem:

You are developing a Web API by using ASP.NET Core. You plan to deploy the Web API to a 5-node Service Fabric cluster that is hosted in Azure.

Requirements:

  • You must be able to debug the Web API on a local Service Fabric instance before deploying to Azure.
  • The Web API must run on every node in the Service Fabric cluster when deployed to Azure.
  • The Service Fabric configuration must support scaling of additional nodes.

You need to configure the Web API for local and Azure deployment, setting the right property from "MinReplicaSetSize", "InstanceCount" and "TargetReplicaSetSize".

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. But I'm not sure of this.

Is that the right property to set?

1
What is your reasoning regarding your answer?Peter Bons
My reasoning was about the answer of Deepak Tatyaji Ahire, since "-1" value indicate to use all the available nodes. So I supposed that in local you must explicitly indicate the value.giuse-g
I'd say set it to 1 locally as you have only one physical machine. You can set it to 3 or 5 but yoi can get port conflicts as only one app can use a specific port on a single machinePeter Bons

1 Answers

4
votes

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 = -1 => Deploy on all available node on the remote cluster and need to worry about the mode.