Skip to content

Commit 35811a3

Browse files
authored
Docker: Roll back default value of SE_DISTRIBUTOR_SLOT_SELECTOR as empty (#2993)
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent e74cfea commit 35811a3

File tree

5 files changed

+15
-9
lines changed

5 files changed

+15
-9
lines changed

Base/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ ENV SE_BIND_HOST="false" \
206206
SE_SERVER_PROTOCOL="http" \
207207
# Boolean value, maps "--reject-unsupported-caps"
208208
SE_REJECT_UNSUPPORTED_CAPS="false" \
209-
SE_DISTRIBUTOR_SLOT_SELECTOR="org.openqa.selenium.grid.distributor.selector.GreedySlotSelector" \
209+
SE_DISTRIBUTOR_SLOT_SELECTOR="" \
210210
SE_OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED="true" \
211211
SE_OTEL_TRACES_EXPORTER="otlp" \
212212
SE_SUPERVISORD_LOG_LEVEL="info" \

ENV_VARIABLES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,4 @@
154154
| SE_VIDEO_MAXRATE | | | |
155155
| SE_NODE_DELETE_SESSION_ON_UI | true | Enable capability to support deleting session on Grid UI | --delete-session-on-ui |
156156
| 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) | |
157-
| 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 |
157+
| 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 |

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -630,10 +630,16 @@ instructions on top of it.
630630
631631
#### Distributor configuration
632632
633-
| Environment variable | Option | Type | Default value | Description |
634-
|------------------------------|-----------------------------|---------|---------------|--------------------------------------------------------------------------------------------------------------|
635-
| `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. |
636-
| `SE_HEALTHCHECK_INTERVAL` | `--healthcheck-interval` | int | `120` | This ensures the server can ping all the Nodes successfully after an interval. |
633+
| Environment variable | Option | Type | Default value | Description |
634+
|--------------------------------|-----------------------------|---------|---------------|-----------------------------------------------------------------------------------------------------------------------|
635+
| `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. |
636+
| `SE_HEALTHCHECK_INTERVAL` | `--healthcheck-interval` | int | `120` | This ensures the server can ping all the Nodes successfully after an interval. |
637+
| `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. |
638+
639+
Distributor component comes with two main built-in Slot Selector implementations
640+
* `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.
641+
642+
* `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).
637643

638644
___
639645

scripts/generate_list_env_vars/description.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,6 @@
491491
cli: ''
492492
- name: SE_DISTRIBUTOR_SLOT_SELECTOR
493493
description: Full class name of non-default slot selector. This is used to select
494-
a slot in a Node once the Node has been matched. Switch to default, use class
495-
name `org.openqa.selenium.grid.distributor.selector.DefaultSlotSelector`
494+
a slot in a Node once the Node has been matched. Switch to built-in Greedy strategy,
495+
use class name `org.openqa.selenium.grid.distributor.selector.GreedySlotSelector`
496496
cli: --slot-selector

scripts/generate_list_env_vars/value.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
- name: SE_DISTRIBUTOR_PORT
2020
default: '5553'
2121
- name: SE_DISTRIBUTOR_SLOT_SELECTOR
22-
default: org.openqa.selenium.grid.distributor.selector.GreedySlotSelector
22+
default: ''
2323
- name: SE_DRAIN_AFTER_SESSION_COUNT
2424
default: '0'
2525
- name: SE_ENABLE_BROWSER_LEFTOVERS_CLEANUP

0 commit comments

Comments
 (0)