StatelessServiceDescription Class
Describes a stateless service.
All required parameters must be populated in order to send to Azure.
- Inheritance
-
azure.servicefabric.models._models_py3.ServiceDescriptionStatelessServiceDescription
Constructor
StatelessServiceDescription(*, service_name: str, service_type_name: str, partition_description, instance_count: int, application_name: Optional[str] = None, initialization_data=None, placement_constraints: Optional[str] = None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: Optional[bool] = None, service_package_activation_mode=None, service_dns_name: Optional[str] = None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, min_instance_count: Optional[int] = None, min_instance_percentage: Optional[int] = None, flags: Optional[int] = None, instance_close_delay_duration_seconds: Optional[int] = None, instance_lifecycle_description=None, instance_restart_wait_duration_seconds: Optional[int] = None, **kwargs)
Parameters
- service_type_name
- str
Required. Name of the service type as specified in the service manifest.
The initialization data as an array of bytes. Initialization data is passed to service instances or replicas when they are created.
- partition_description
- PartitionSchemeDescription
Required. The partition description as an object.
- placement_constraints
- str
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)".
- service_placement_policies
- list[ServicePlacementPolicyDescription]
The service placement policies.
The move cost for the service. Possible values include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh'
- is_default_move_cost_specified
- bool
Indicates if the DefaultMoveCost property is specified.
- service_package_activation_mode
- str or ServicePackageActivationMode
The activation mode of service package to be used for a service. Possible values include: 'SharedProcess', 'ExclusiveProcess'
- service_dns_name
- str
The DNS name of the service. It requires the DNS system service to be enabled in Service Fabric cluster.
- min_instance_count
- int
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.
- min_instance_percentage
- int
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.
- flags
- int
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 1 then the flags for InstanceCloseDelayDuration is set.
- None - Does not indicate any other properties are set. The value is zero.
- InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 1.
- InstanceRestartWaitDuration - Indicates the InstanceRestartWaitDurationSeconds property is set. The value is 2.
- instance_close_delay_duration_seconds
- <xref:long>
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. Note, the default value of InstanceCloseDelayDuration is 0, which indicates that there won't be any delay or removal of the endpoint prior to closing the instance.
- instance_lifecycle_description
- InstanceLifecycleDescription
Defines how instances of this service will behave during their lifecycle.
- instance_restart_wait_duration_seconds
- <xref:long>
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.
Feedback
Submit and view feedback for