TOPIC 17/1916 MINNOT STARTED

Selenium Grid in Docker: a hub, browser nodes and two tests at once

Start a Selenium Grid from a compose file, read its status page, point a remote WebDriver at the hub and run two tests side by side.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: a taxi rank with one dispatcher. Passengers do not walk up to a driver. They tell the dispatcher where they want to go, and the dispatcher sends a free taxi. If every taxi is busy, the passenger waits in the queue. The wait is not a broken taxi.

The dispatcher is the hub. Each browser node is a taxi. The board that shows free taxis is the status page.

Tom, a tester at Daily List, a to-do list app, wants two tests to ride at the same time. Mei watches the status page for free slots.

What it is: Selenium drives a browser, and a is a hub plus browser nodes running as Docker containers. The hub hands a session to a free node. The on port 4444 shows nodes and slots, and the remote WebDriver session address is that hub address. A local webdriver.Chrome() call is the neighbour. That call starts a browser on your own machine.

Why it matters: Daily List browser tests are slow if they run one at a time on every laptop. Grid in Docker runs more than one Chrome session without installing Chrome on each laptop. If there is only one free slot, the second test waits. Tom can see that queue on the status page instead of calling the test hung.

PLAIN WORDS · 1 in this section
selenium
A free tool that drives a web browser for checks.

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.

THE REAL JOB A taxi rank with one dispatcher.

  1. Dispatcher
  2. Taxi
  3. Seat
Taxi rank

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
The dispatcherThe hub
A taxi with a driverA browser node
A seat in a taxiA slot
The board showing free taxisThe status page

WHERE THIS PICTURE STOPS

  • A taxi can go anywhere, but a node runs only the browsers it has.
  • A passenger can wait in a queue, and a queued test is not a failed test.
  • Taxis do not share seats, but two tests must not share data.

HOOK

Dispatcher, taxis, free seats.

TELL A FRIEND

One dispatcher sends tests to free taxis.

OFTEN MIXED UP WITH Selenium Grid and cloud grids: run tests on many browsers. That topic explains what a Grid and a are. This one starts a hub and nodes in Docker and runs two tests at once.

PRACTISE AND KEEP

Sources for this topic — 5 sources
  1. Market practice

    Selenium Grid Components (Selenium documentation) ↗ — Selenium project · Selenium Grid pages: the Grid can run as a hub with nodes, and tests reach it through a remote WebDriver and the Grid address

    Describes Grid 4 as a Router, Distributor, Session Map, New Session Queue, Node and Event Bus, deployed as Standalone, Hub and Node, or Distributed. Project documentation. Practitioner guidance, not a standard. · Checked 2026-11-06

    Primary publisher body opened and relevant sections read on 6 November 2026; selected-section reading, not a claim every page or external link was read. See docs/research/v16-testing-automation-literacy-audit-20261106.md for exact sections, version and limitations.

  2. Market practice

    Remote WebDriver (Selenium documentation) ↗ — Selenium · Selenium Remote WebDriver pages: the client needs an address and an options object, and the Grid listens on port 4444 by default

    The Selenium pages on Remote WebDriver: the client needs an address and a browser options object. The Grid listens on port 4444 by default. Python uses webdriver.Remote with a command address and options. Older Grid versions used a path ending in wd/hub. · Checked 2026-10-31

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  3. Market practice

    Grid endpoints (Selenium documentation) ↗ — Selenium · Selenium Grid endpoints pages: the status endpoint on port 4444 reports each node, its sessions and its slots

    The Selenium pages on Grid endpoints: a GET request to the status endpoint on port 4444 reports each node, its availability, its sessions and its slots. Availability is up, draining or down, and draining means no new sessions. · Checked 2026-10-31

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  4. Market practice

    Dev and beta channel browsers via docker-selenium (Selenium blog) ↗ — Selenium · Selenium blog example: a hub service and Chrome node services, with nodes pointing at the hub by service name

    An older Selenium blog example with a hub service and Chrome node services. Each node points at the hub by service name, the hub publishes ports 4442 to 4444 and each node asks for extra shared memory. The tags are old, so check the version you use. · Checked 2026-10-31

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  5. Market practice

    docker-selenium README ↗ — SeleniumHQ (GitHub) · Actual docker-selenium README concurrency section and compose example: one session per container by default, matching nodes, SE_EVENT_BUS_HOST and shared memory; read6November2026.

    Ready-made Selenium images for Chrome, Firefox and Edge; browser images need extra shared memory such as shm-size 2g. · Checked 2026-10-19

    Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.