Deploy a Service Fabric managed cluster with stateless node types
Service Fabric node types come with an inherent assumption that at some point of time, stateful services might be placed on the nodes. Stateless node types change this assumption for a node type. This allows the node type to benefit from features such as faster scale-out operations, support for Automatic OS Upgrades, Spot VMs, and scaling out to more than 100 nodes in a node type.
- Primary node types can't be configured to be stateless.
- Stateless node types require an API version of 2021-05-01 or later.
- This will automatically set the multipleplacementgroup property to true which you can learn more about here. The underlying virtual machine scale set requirements and limitations to enabling this property apply for Service Fabric managed clusters.
- This enables support for up to 1,000 nodes for the given node type.
- Stateless node types can utilize a VM SKU temporary disk.
Enabling stateless node types in a Service Fabric managed cluster
To set one or more node types as stateless in a node type resource, set the isStateless property to true. When deploying a Service Fabric cluster with stateless node types, the setup requires at least one primary node type that isn't stateless in the cluster.
Sample templates are available: Service Fabric Stateless Node types template
- The Service Fabric managed cluster resource apiVersion should be 2021-05-01 or later.
{
"apiVersion": "[variables('sfApiVersion')]",
"type": "Microsoft.ServiceFabric/managedclusters/nodetypes",
"name": "[concat(parameters('clusterName'), '/', parameters('nodeTypeName'))]",
"location": "[resourcegroup().location]",
"dependsOn": [
"[concat('Microsoft.ServiceFabric/managedclusters/', parameters('clusterName'))]"
],
"properties": {
"isStateless": true,
"isPrimary": false,
"vmImagePublisher": "[parameters('vmImagePublisher')]",
"vmImageOffer": "[parameters('vmImageOffer')]",
"vmImageSku": "[parameters('vmImageSku')]",
"vmImageVersion": "[parameters('vmImageVersion')]",
"vmSize": "[parameters('nodeTypeSize')]",
"vmInstanceCount": "[parameters('nodeTypeVmInstanceCount')]",
"dataDiskSizeGB": "[parameters('nodeTypeDataDiskSizeGB')]"
}
}
Migrate to using stateless node types in a cluster
For all migration scenarios, a new stateless node type needs to be added. An existing node type can't be migrated to be stateless. You can add a new stateless node type to an existing Service Fabric managed cluster, and remove any original node types from the cluster.
Next steps
To learn more about Service Fabric managed clusters, see: