0

The problem occurs in a standalone Service Fabric cluster.

I need to publish my services to specified nodes that are on dedicated machines. I also want to block current services from allocating on the new node. I read about placement constraints and understand the idea, but when I add a new node to my Service Fabric cluster, a current service with an InstanceCount paramater set on -1 allocates on my new node. How can I avoid situations like this? Do I have to create a new node type? Or is there any constraint for it?

Super Jade
  • 5,609
  • 7
  • 39
  • 61
not_you
  • 31
  • 4
  • Can you share how did you set the placement constraints and how is your cluster structure? – Diego Mendes Jul 26 '18 at 20:40
  • I left it on my computer at work, I wil paste it for few hours. But the main problem is that others application that already exists in cluster escalate on my new node and I have to reconfigure new node. Should I create new node type? – not_you Jul 26 '18 at 22:00
  • if you have multiple nodetypes, you can keep the `InstanceCount = -1` but you have to add a placement constraint to your service to identify which nodes your services can run, otherwise they will go to any node available. See my extended answer below – Diego Mendes Jul 27 '18 at 10:09

1 Answers1

0

Service Fabric has the concept of NodeTypes, it is used to identify a pool of Nodes\Machines\VMs with equal configurations. If your workload has specific requirements that needs a specific hardware\software, a scenario can be a API receiving a job, and background job running a GPU computation application, and you want to isolate the load to these nodes to your specific applications, your have to:

  • Create a NodeType to host the API, let's call here FrontEntNodeType, that will be pool of resources that your apis will be deployed to. In your APIs service you have to add the placement constraint NodeType == FrontEntNodeType

  • Create a NodeType to host the Worker, lets call here GPUWorkerNodeType, In your worker services you have to add the placement constraint NodeType == GPUWorkerNodeType

When you deploy your services, they will target the correct machines, and only services with GPUWorkerNodeType constraint will go to the GPU node to process work.

The big catch of placement constraints is: if you don't specify a PlacementContraint on your service, it will go to any node available to receive load. So, it won't restrict older services that were deployed without placement constraints, you will have to update these to keep the cluster tidy.

You can do the same using Node Properties, by default the nodes contains the properties NodeName & NodeType. You can have nodes with different framework versions participating on the same NodeType, if you want to upgrade the framework on some nodes to verify the load & behaviour before you apply to all nodes, you could upgrade a few nodes with a new framework version, add a NodeProperty to the node like DotNetFrameworkVersion=4.7, and put some services with DotNetFrameworkVersion==4.7 and other (DotNetFrameworkVersion!=4.7)

You can find these information on the following link: https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-resource-manager-cluster-description#node-properties-and-placement-constraints

Diego Mendes
  • 10,631
  • 2
  • 32
  • 36