Redigera

Dela via


ResourceOptimizedPlacement Class

Definition

A placement strategy which attempts to optimize resource distribution across the cluster.

public sealed class ResourceOptimizedPlacement : Orleans.Runtime.PlacementStrategy
type ResourceOptimizedPlacement = class
    inherit PlacementStrategy
Public NotInheritable Class ResourceOptimizedPlacement
Inherits PlacementStrategy
Inheritance
ResourceOptimizedPlacement

Remarks

It assigns weights to runtime statistics to prioritize different resources and calculates a normalized score for each silo. Following the power of k-choices algorithm, K silos are picked as potential targets, where K is equal to the square root of the number of silos. Out of those K silos, the one with the lowest score is chosen for placing the activation. Normalization ensures that each property contributes proportionally to the overall score. You can adjust the weights based on your specific requirements and priorities for load balancing. In addition to normalization, an online adaptive algorithm provides a smoothing effect (filters out high frequency components) and avoids rapid signal drops by transforming it into a polynomial-like decay process. This contributes to avoiding resource saturation on the silos and especially newly joined silos.

Silos which are overloaded by definition of the load shedding mechanism are not considered as candidates for new placements.

This placement strategy is configured by adding the ResourceOptimizedPlacementAttribute attribute to a grain.

Constructors

ResourceOptimizedPlacement()

Properties

IsUsingGrainDirectory

Gets a value indicating whether or not this placement strategy requires activations to be registered in the grain directory.

(Inherited from PlacementStrategy)

Methods

Initialize(GrainProperties)

Initializes an instance of this type using the provided grain properties.

(Inherited from PlacementStrategy)
PopulateGrainProperties(IServiceProvider, Type, GrainType, Dictionary<String,String>)

Populates grain properties to specify the preferred placement strategy.

(Inherited from PlacementStrategy)

Applies to