karthik_u94 karthik_u94 - 1 year ago 71
C# Question

Replication of Services deployed on Azure Service Fabric Cluster

Is there any way to configure the number of replicas for individual services deployed on Azure Service Fabric Cluster?

The Reliability tier set during provisioning the cluster decides the number of replicas, but what if I need to change the number of replicas for some particular service -some service that needs higher reliability than the rest of the services?

I'm using a Visual Studio Service Fabric Application, so probably something that can be set in the config files?

Answer Source


Take a look at the app manifest XML file YouApp/ApplicationPackageRoot/ApplicationManifest.xml, under the DefaultServices node, you will notice all the services referenced for your application.

To change the number of replicas for a Stateful Service, set the TargetReplicaSetSize property.

You can also set the minimum number of replicas by setting the MinReplicaSetSize property.

As a side note, don't confuse Reliability tier for a specific node type of your cluster, it is different from replica size of a service. A Reliability tier is used to specify the minimum number of replicas of the system services that you want to run in the cluster for a node type.

Let's say you have a node type with a Gold Reliability tier, it will be replicated on 7 different machines or more. If this node type goes under 7 replicas because of a failure for example, it will then be considered as unhealthy.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download