StatefulServiceDescription

Describes a stateful service.

Properties

Name Type Required
ServiceKind string Yes
ApplicationName string No
ServiceName string Yes
ServiceTypeName string Yes
InitializationData array of integer No
PartitionDescription PartitionSchemeDescription Yes
PlacementConstraints string No
CorrelationScheme array of ServiceCorrelationDescription No
ServiceLoadMetrics array of ServiceLoadMetricDescription No
ServicePlacementPolicies array of ServicePlacementPolicyDescription No
DefaultMoveCost string (enum) No
IsDefaultMoveCostSpecified boolean No
ServicePackageActivationMode string (enum) No
ServiceDnsName string No
ScalingPolicies array of ScalingPolicyDescription No
TargetReplicaSetSize integer Yes
MinReplicaSetSize integer Yes
HasPersistedState boolean Yes
Flags integer No
ReplicaRestartWaitDurationSeconds integer (int64) No
QuorumLossWaitDurationSeconds integer (int64) No
StandByReplicaKeepDurationSeconds integer (int64) No

ServiceKind

Type: string
Required: Yes

A discriminator property. Its value must be 'Stateful' for objects of type 'StatefulServiceDescription'.


ApplicationName

Type: string
Required: No

The name of the application, including the 'fabric:' URI scheme.


ServiceName

Type: string
Required: Yes

The full name of the service with 'fabric:' URI scheme.


ServiceTypeName

Type: string
Required: Yes

Name of the service type as specified in the service manifest.


InitializationData

Type: array of integer
Required: No

The initialization data as an array of bytes. Initialization data is passed to service instances or replicas when they are created.


PartitionDescription

Type: PartitionSchemeDescription
Required: Yes

The partition description as an object.


PlacementConstraints

Type: string
Required: No

The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)".


CorrelationScheme

Type: array of ServiceCorrelationDescription
Required: No

The correlation scheme.


ServiceLoadMetrics

Type: array of ServiceLoadMetricDescription
Required: No

The service load metrics.


ServicePlacementPolicies

Type: array of ServicePlacementPolicyDescription
Required: No

The service placement policies.


DefaultMoveCost

Type: string (enum)
Required: No

The move cost for the service.

Specifies the move cost for the service.

Possible values are:

  • Zero - Zero move cost. This value is zero.
  • Low - Specifies the move cost of the service as Low. The value is 1.
  • Medium - Specifies the move cost of the service as Medium. The value is 2.
  • High - Specifies the move cost of the service as High. The value is 3.

IsDefaultMoveCostSpecified

Type: boolean
Required: No

Indicates if the DefaultMoveCost property is specified.


ServicePackageActivationMode

Type: string (enum)
Required: No

The activation mode of service package to be used for a service.

The activation mode of service package to be used for a Service Fabric service. This is specified at the time of creating the Service.

Possible values are:

  • SharedProcess - This is the default activation mode. With this activation mode, replicas or instances from different partition(s) of service, on a given node, will share same activation of service package on a node. The value is zero.
  • ExclusiveProcess - With this activation mode, each replica or instance of service, on a given node, will have its own dedicated activation of service package on a node. The value is 1.

ServiceDnsName

Type: string
Required: No

The DNS name of the service. It requires the DNS system service to be enabled in Service Fabric cluster.


ScalingPolicies

Type: array of ScalingPolicyDescription
Required: No

Scaling policies for this service.


TargetReplicaSetSize

Type: integer
Required: Yes
InclusiveMinimum: 1

The target replica set size as a number.


MinReplicaSetSize

Type: integer
Required: Yes
InclusiveMinimum: 1

The minimum replica set size as a number.


HasPersistedState

Type: boolean
Required: Yes

A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false.


Flags

Type: integer
Required: No

Flags indicating whether other properties are set. Each of the associated properties corresponds to a flag, specified below, which, if set, indicate that the property is specified. This property can be a combination of those flags obtained using bitwise 'OR' operator. For example, if the provided value is 6 then the flags for QuorumLossWaitDuration (2) and StandByReplicaKeepDuration(4) are set.

  • None - Does not indicate any other properties are set. The value is zero.
  • ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The value is 1.
  • QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is 2.
  • StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The value is 4.

ReplicaRestartWaitDurationSeconds

Type: integer (int64)
Required: No
InclusiveMaximum: 4294967295
InclusiveMinimum: 0

The duration, in seconds, between when a replica goes down and when a new replica is created.


QuorumLossWaitDurationSeconds

Type: integer (int64)
Required: No
InclusiveMaximum: 4294967295
InclusiveMinimum: 0

The maximum duration, in seconds, for which a partition is allowed to be in a state of quorum loss.


StandByReplicaKeepDurationSeconds

Type: integer (int64)
Required: No
InclusiveMaximum: 4294967295
InclusiveMinimum: 0

The definition on how long StandBy replicas should be maintained before being removed.