Search code examples
azure-service-fabric

Azure Service Fabric machine specifications and service partitioning


  1. Can I have nodes with different machine specifications (e.g, low performer, medium performer, high performer) in my cluster?
  2. Can I target a partition to run on a specific node?
  3. Can I specify I may use up to 100 nodes, initially specify 10 partitions each running on its own node of the 100 (so 10 partitions 10 nodes), but over time drop and add partitions such that hours later I'm using 5 partitions on 5 nodes and later 96 partitions on 96 nodes (all this ignores replicas)?

Solution

    1. Yes, you can use Node Types. NodeType is the node definition used to create the cluster virtual machines. It is based on Virtual Machines Scale Sets, this scale set has the definition of OS, Memory, Disk, and so on. In you case you would create the nodeTypes low performer, medium performer, high performer, and can define how many instances(VMs) each nodeType will have. For more information, check here
    2. On Service Fabric you have placement constraints where you define conditions for your services to be validated before deploying the service to a particular node, for example, one of the constraints you can create is (NodeType==MediumPerformer). This will make SF place your service on any node of Type MediumPerformer. The only caveat is that it use the same rule for all replicas and partitions, if you want different behavior, you would have to create new service named instances with different rules. For more information, check here

    3. Service Partitions are immutable, so you won't be able to change the number of partitions after the service is deployed. You can bypass this limitation by creating multiple named services instead. For more information, check here