다음을 통해 공유


StatelessServiceDescription.InstanceCount Property

Definition

Gets or sets the instance count of this service partition.

public int InstanceCount { get; set; }
member this.InstanceCount : int with get, set
Public Property InstanceCount As Integer

Property Value

The instance count of this service partition.

Remarks

The InstanceCount property indicates the number of instances to be created for this service. The specified number of instances will be maintained by Service Fabric. For a partitioned stateless service, InstanceCount indicates the number of instances to be kept per partition.

Note, -1 is a special value for InstanceCount. If InstanceCount is set to -1, the number of instances to be kept per partition is equal to the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service.

Applies to