Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ ENV SE_BIND_HOST="false" \
SE_SERVER_PROTOCOL="http" \
# Boolean value, maps "--reject-unsupported-caps"
SE_REJECT_UNSUPPORTED_CAPS="false" \
SE_DISTRIBUTOR_SLOT_SELECTOR="org.openqa.selenium.grid.distributor.selector.GreedySlotSelector" \
SE_DISTRIBUTOR_SLOT_SELECTOR="" \
SE_OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED="true" \
SE_OTEL_TRACES_EXPORTER="otlp" \
SE_SUPERVISORD_LOG_LEVEL="info" \
Expand Down
2 changes: 1 addition & 1 deletion ENV_VARIABLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,4 @@
| SE_VIDEO_MAXRATE | | | |
| SE_NODE_DELETE_SESSION_ON_UI | true | Enable capability to support deleting session on Grid UI | --delete-session-on-ui |
| SE_UPDATE_CHROME_COMPONENTS | | Applicable for node-chrome, standalone-chrome (arch linux/amd64). Update the latest version of Chrome and ChromeDriver at the beginning of the container startup. Read more: [#2872](https://github.com/SeleniumHQ/docker-selenium/pull/2872) | |
| SE_DISTRIBUTOR_SLOT_SELECTOR | org.openqa.selenium.grid.distributor.selector.GreedySlotSelector | Full class name of non-default slot selector. This is used to select a slot in a Node once the Node has been matched. Switch to default, use class name `org.openqa.selenium.grid.distributor.selector.DefaultSlotSelector` | --slot-selector |
| SE_DISTRIBUTOR_SLOT_SELECTOR | | Full class name of non-default slot selector. This is used to select a slot in a Node once the Node has been matched. Switch to built-in Greedy strategy, use class name `org.openqa.selenium.grid.distributor.selector.GreedySlotSelector` | --slot-selector |
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -630,10 +630,16 @@ instructions on top of it.

#### Distributor configuration

| Environment variable | Option | Type | Default value | Description |
|------------------------------|-----------------------------|---------|---------------|--------------------------------------------------------------------------------------------------------------|
| `SE_REJECT_UNSUPPORTED_CAPS` | `--reject-unsupported-caps` | boolean | `false` | Allow the Distributor to reject a request immediately if the Grid does not support the requested capability. |
| `SE_HEALTHCHECK_INTERVAL` | `--healthcheck-interval` | int | `120` | This ensures the server can ping all the Nodes successfully after an interval. |
| Environment variable | Option | Type | Default value | Description |
|--------------------------------|-----------------------------|---------|---------------|-----------------------------------------------------------------------------------------------------------------------|
| `SE_REJECT_UNSUPPORTED_CAPS` | `--reject-unsupported-caps` | boolean | `false` | Allow the Distributor to reject a request immediately if the Grid does not support the requested capability. |
| `SE_HEALTHCHECK_INTERVAL` | `--healthcheck-interval` | int | `120` | This ensures the server can ping all the Nodes successfully after an interval. |
| `SE_DISTRIBUTOR_SLOT_SELECTOR` | `--slot-selector` | string | `` | Full class name of non-default slot selector. This is used to select a slot in a Node once the Node has been matched. |

Distributor component comes with two main built-in Slot Selector implementations
* `org.openqa.selenium.grid.distributor.selector.DefaultSlotSelector`: Grid’s default strategy (used if you don’t configure anything else). It follows the balanced, least-recently-used approach described above. The `DefaultSlotSelector` will choose the Node that has been free for the longest time, ensuring no single node is overused when others are idle. This simple strategy has minimal overhead and works well for most general testing scenarios where an even distribution of sessions is desired.

* `org.openqa.selenium.grid.distributor.selector.GreedySlotSelector`: An alternative built-in provided. The `GreedySlotSelector` aims to maximize node utilization by concentrating sessions on one node before using another. As noted, it will tend to fill up a node’s slots one by one, reducing the number of nodes that are partially utilized at any given time. This strategy is beneficial for resource-intensive or high-concurrency scenarios (for example, load testing or running in an environment where you scale nodes on demand). More insight, let's refer to [#2990](https://github.com/SeleniumHQ/docker-selenium/issues/2990).

___

Expand Down
4 changes: 2 additions & 2 deletions scripts/generate_list_env_vars/description.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,6 @@
cli: ''
- name: SE_DISTRIBUTOR_SLOT_SELECTOR
description: Full class name of non-default slot selector. This is used to select
a slot in a Node once the Node has been matched. Switch to default, use class
name `org.openqa.selenium.grid.distributor.selector.DefaultSlotSelector`
a slot in a Node once the Node has been matched. Switch to built-in Greedy strategy,
use class name `org.openqa.selenium.grid.distributor.selector.GreedySlotSelector`
cli: --slot-selector
2 changes: 1 addition & 1 deletion scripts/generate_list_env_vars/value.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- name: SE_DISTRIBUTOR_PORT
default: '5553'
- name: SE_DISTRIBUTOR_SLOT_SELECTOR
default: org.openqa.selenium.grid.distributor.selector.GreedySlotSelector
default: ''
- name: SE_DRAIN_AFTER_SESSION_COUNT
default: '0'
- name: SE_ENABLE_BROWSER_LEFTOVERS_CLEANUP
Expand Down
Loading