Share via


ServiceDescription.PlacementConstraints Property

Definition

Gets or sets the placement constraints for this service.

public string PlacementConstraints { get; set; }
member this.PlacementConstraints : string with get, set
Public Property PlacementConstraints As String

Property Value

Returns the placement constraints.

Remarks

Placement constraints are Boolean statements which allow services to select for particular node properties (and the values of those properties) in order to control where it is legal to place them. Node properties are key value pairs that define some additional metadata about a node, usually related to the hardware capabilities of the node. Examples of hardware characteristics that could be exposed as node properties are “HasDisk”, “MemorySize”, “StorageSize”, “NumberOfCores” etc. When deploying a service, an administrator can define the properties that the service cares about as well as simple Boolean operators which define requirements for the values of those properties. Ex: (HasDisk==true && MemorySize>=2048). During runtime, Service Fabric load balancing will only place services on nodes that have properties with values which match those required by the service.

Applies to