StatelessServiceUpdateDescription
Describes an update for a stateless service.
Properties
Name | Type | Required |
---|---|---|
Flags |
string | No |
PlacementConstraints |
string | No |
CorrelationScheme |
array of ServiceCorrelationDescription | No |
LoadMetrics |
array of ServiceLoadMetricDescription | No |
ServicePlacementPolicies |
array of ServicePlacementPolicyDescription | No |
DefaultMoveCost |
string (enum) | No |
ScalingPolicies |
array of ScalingPolicyDescription | No |
ServiceDnsName |
string | No |
TagsForPlacement |
NodeTagsDescription | No |
TagsForRunning |
NodeTagsDescription | No |
InstanceCount |
integer | No |
MinInstanceCount |
integer | No |
MinInstancePercentage |
integer | No |
InstanceCloseDelayDurationSeconds |
string | No |
InstanceLifecycleDescription |
InstanceLifecycleDescription | No |
InstanceRestartWaitDurationSeconds |
string | No |
Flags
Type: string
Required: No
Flags indicating whether other properties are set. Each of the associated properties corresponds to a flag, which if set, indicates 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 -> 110) then the flags for PlacementConstraints (2 -> 010) and PlacementPolicyList (4 -> 100) are set.
Flag | Value |
---|---|
None | 0x0000 |
InstanceCount | 0x0001 |
PlacementConstraints | 0x0002 |
PlacementPolicyList | 0x0004 |
Correlation | 0x0008 |
Metrics | 0x0010 |
DefaultMoveCost | 0x0020 |
ScalingPolicy | 0x0040 |
MinInstanceCount | 0x0080 |
MinInstancePercentage | 0x0100 |
InstanceCloseDelayDuration | 0x0200 |
InstanceRestartWaitDuration | 0x0400 |
ServiceDnsName | 0x0800 |
RestoreReplicaLocationAfterUpgrade | 0x1000 |
TagsForPlacement | 0x2000 |
TagsForRunning | 0x4000 |
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 it like this: "NodeColor == blue)."
CorrelationScheme
Type: array of ServiceCorrelationDescription
Required: No
The correlation scheme.
LoadMetrics
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.VeryHigh
- Specifies the move cost of the service as VeryHigh. The value is 4.
ScalingPolicies
Type: array of ScalingPolicyDescription
Required: No
Scaling policies for this service.
ServiceDnsName
Type: string
Required: No
The DNS name of the service.
TagsForPlacement
Type: NodeTagsDescription
Required: No
Tags for placement of this service.
TagsForRunning
Type: NodeTagsDescription
Required: No
Tags for running of this service.
InstanceCount
Type: integer
Required: No
InclusiveMinimum: -1
The instance count.
MinInstanceCount
Type: integer
Required: No
MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node.
The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ).
Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service.
MinInstancePercentage
Type: integer
Required: No
MinInstancePercentage is the minimum percentage of InstanceCount that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node.
The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ).
Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service.
InstanceCloseDelayDurationSeconds
Type: string
Required: No
Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster upgrade and disabling node.
The endpoint exposed on this instance is removed prior to starting the delay, which prevents new connections to this instance.
In addition, clients that have subscribed to service endpoint change events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), can do
the following upon receiving the endpoint removal notification:
- Stop sending new requests to this instance.
- Close existing connections after in-flight requests have completed.
- Connect to a different instance of the service partition for future requests.
InstanceLifecycleDescription
Type: InstanceLifecycleDescription
Required: No
Defines how instances of this service will behave during their lifecycle.
InstanceRestartWaitDurationSeconds
Type: string
Required: No
When a stateless instance goes down, this timer starts. When it expires Service Fabric will create a new instance on any node in the cluster.
This configuration is to reduce unnecessary creation of a new instance in situations where the instance going down is likely to recover in a short time. For example, during an upgrade.
The default value is 0, which indicates that when stateless instance goes down, Service Fabric will immediately start building its replacement.