Class GreedySlotSelector

java.lang.Object
org.openqa.selenium.grid.distributor.selector.GreedySlotSelector
All Implemented Interfaces:
SlotSelector

public class GreedySlotSelector extends Object implements SlotSelector
A greedy slot selector that aims to maximize node utilization by minimizing the number of partially filled nodes. The algorithm works as follows: 1. Sort nodes by their utilization load (descending). 2. Among nodes with the same utilization, prefer those with fewer total slots. 3. Then sort by the last session created (oldest first). This approach helps to: - Fill up nodes that are already partially utilized - Minimize the number of nodes that are partially filled - Distribute load evenly across nodes