Creating services (or actors in the case of Reliable Actors) in the Service Fabric application VS template is effortless. Defining node types in the Azure portal is also easy. But how do you map a service/actor to run on a specific node type?
Node type: Defines the size and other properties of a VM type. Each node type in a cluster has to be a separate VM scale set. Scale set: A set of VMs managed as one.
Copy or download the standalone package for Service Fabric for Windows Server to the VM/machine and unzip the package. Run PowerShell with elevated privileges and go to the location of the unzipped package. Run the AddNode. ps1 script with the parameters describing the new node to add.
A single Service Fabric node type/scale set can not contain more than 100 nodes/VMs. To scale a cluster beyond 100 nodes, add additional node types.
Service Fabric has the concept of seed nodes. These are nodes that maintain the availability of the underlying cluster. Seed nodes help to ensure that the cluster stays up by establishing leases with other nodes and serving as tiebreakers during certain kinds of failures.
You can do that using placement constraints.
More information on that can be found in the "Placement constraints and node properties" section of this article.
In short, you'd need to set placement properties on your cluster and then set placement constraints on the service using StatefulServiceDescription.PlacementConstraints.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With