microsoft / service-fabric

Service Fabric is a distributed systems platform for packaging, deploying, and managing stateless and stateful distributed applications and containers at large scale.
https://docs.microsoft.com/en-us/azure/service-fabric/
MIT License
3.03k stars 399 forks source link

Set global placement constraints #528

Open hbuckle opened 4 years ago

hbuckle commented 4 years ago

Is there a way to set a global placement constraint at the cluster level? We want to ensure that no applications can run on the system nodes - currently it seems if a developer does not set up placement constraints in their application settings the application will be deployed on all nodes in the cluster.

masnider commented 4 years ago

There is no global config – placement rules are explicitly per-service today. The other way we’ve seen people solve this is to have a metric and capacity for that metric set on the primary node type (say 1), and have all services specify a load that is greater than this specified capacity (2). On the nodes you do want the workload placed on, you don’t need to specify a capacity. Note that this also requires service-specific modifications, since all this is really per-service today. The real best solution I’ve seen is people injecting this rule as a part of the CI/CD pipeline. Append “&& (NodeType != {PrimaryNodeTypeName})” – in any case you’re going to have to have some association between the environment and the service.

steve-hawkins commented 4 years ago

this means centralised control of the CI/CD pipelines for all potential applications deployed to the cluster rather than dissolved control of individual node types

something similar to taint and toleration controls in Kubernetes would be ideal