October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

Selenium Architecture and Setup: How WebDriver and Grid Fit Together

Selenium uses language bindings, WebDriver, and browser-specific drivers for automation. Learn when local setup is enough and how Grid routes remote sessions.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Selenium connects test code to a browser through a language binding, the WebDriver protocol, and a browser-specific driver. A local test usually needs no Selenium Server: install a language binding and browser, then follow that binding’s first-script guide. Add Selenium Grid when you need browser sessions routed to remote machines or distributed across multiple browsers and platforms.

How Selenium’s architecture works

Selenium is a set of tools for browser automation, not a browser. Its central interface is WebDriver: a language-neutral API and protocol for issuing browser commands. A language binding lets your test code use that interface; a browser-specific driver receives WebDriver commands and delegates them to the browser. The Selenium project describes WebDriver as “an interface to write instruction sets that can be run interchangeably in many browsers.” Selenium’s overview introduces the project’s components and language bindings.

As an Amazon Associate I earn from qualifying purchases.

  1. Test code and binding: your script uses Selenium’s binding for its programming language.
  2. WebDriver: the binding sends commands using the WebDriver API and protocol.
  3. Browser driver: the driver implementation for the chosen browser handles those commands.
  4. Browser: the driver controls the browser and returns results through the same chain.

For a local run, these pieces work together on your machine. Grid adds a remote routing layer: the client sends a request to Grid, which selects a suitable browser session on a Node and forwards commands to it. The Grid overview describes this as routing WebDriver scripts to remote browser instances.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What happens inside Grid

Grid’s architecture has six components. The Router is the client-facing entry point; it forwards new-session requests and traffic for existing sessions. The New Session Queue holds requests while the Distributor looks for a matching Node slot. Nodes host browser sessions, and the Session Map records which Node owns each session ID. The Event Bus carries asynchronous events between components.

For calls that need a response, Grid uses synchronous REST-like JSON over HTTP. The Event Bus is for asynchronous messages such as broadcasts where a response is not required. A slot’s stereotype describes the browser capabilities it can provide; a slot is not, by itself, a guarantee of a particular overall concurrency level.

Choose local WebDriver or Grid

Setup Best fit Where it runs Main trade-off
Local WebDriver Writing, debugging, or running tests on one machine Test code, driver, and browser are used locally Simple to start, but does not provide Grid’s remote routing across machines
Grid Standalone A quick Grid setup, development, or CI on one machine All Grid components run together in one process One-machine capacity and failure boundary
Hub/Node A central endpoint with browser capacity on multiple Nodes Hub routes requests to Nodes, which may run on separate machines More capacity and diversity, with added network and administration needs
Distributed Grid Separately deploying Grid components Components run in separate processes or locations Greater deployment flexibility and operational complexity

Use local WebDriver unless remote execution solves a real need. Standalone is the simplest way to try Grid or provide one-machine CI routing. Hub/Node is useful when you need a central endpoint and Nodes with different operating systems, browser versions, or additional capacity. Distributed mode separates Grid roles for deployments that need that separation. Selenium’s Grid getting-started guide explains the modes and their startup options.

Set up a local Selenium test

The exact package command and first script depend on your programming language and browser. Start with the official guide for the binding you intend to use; install that binding and the browser, then follow its first-test instructions. The binding’s Selenium Manager workflow can manage drivers automatically in supported setups, so a separate manual driver installation may not be necessary.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Selenium Manager is a Rust command-line tool for browser and driver management. The project overview says Selenium bindings use it by default. That statement is about local binding workflows, not a universal Grid server setting: the Grid server CLI documents --selenium-manager as false by default. If you rely on Grid to manage drivers, check the options for the server version you actually run. See Selenium Manager documentation and the Grid CLI options.

Start a single-machine Grid

The Selenium Grid quick start lists Java 11 or higher, browsers, and either browser drivers on PATH or Selenium Manager enabled for Grid as prerequisites. Java is a documented requirement on that page; check the documentation for the Selenium Server release you plan to use, since requirements and options can change.

  1. Install Java and the browser or browsers you intend to automate.
  2. Download the current Selenium Server JAR from the Selenium downloads page.
  3. Start the server in Standalone mode:
    java -jar selenium-server-<version>.jar standalone
  4. Configure the test client to use http://localhost:4444, the documented default endpoint for RemoteWebDriver requests.

Standalone combines Grid components in one process on one machine. It does not turn a local test into a multi-machine Grid; use Hub/Node or Distributed when you need separate Nodes or components.

Scale to Hub/Node or Distributed mode

In Hub/Node mode, the Hub provides the central entry point and Nodes host browser sessions. A Node can register with the Hub using the documented pattern --hub http://<hub-ip>:4444. Nodes may be placed on other machines to provide different browsers, operating systems, or versions. This arrangement also lets you adjust Node capacity without shutting down the entire Grid.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Distributed mode runs Grid components separately and is intended for deployments where those roles need independent placement. Nodes and the Hub communicate over HTTP and the Event Bus. If you change the default Hub ports, configure the Grid port and publish/subscribe Event Bus endpoints consistently. CLI flags and defaults are version-sensitive; consult the configuration help from the server JAR you installed rather than copying flags from a different release.

To inspect the installed server’s guidance, use:

java -jar selenium-server-<version>.jar info config
java -jar selenium-server-<version>.jar info security

These commands provide configuration and security help derived from that installed code version. The Grid CLI documentation describes the available command-line options.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Plan Grid capacity realistically

Selenium’s Grid guide offers rough planning guidance of about 1 GB of RAM per browser session and says default concurrency is generally CPU-based; it also documents Safari as limited to one session. These are project guidance, not benchmark results or capacity guarantees. Actual use depends on browser, workload, machine resources, and configuration, so measure concurrency in the environment that will run your tests. See the Grid getting-started guide.

The same guide labels its size categories as approximate: small Grid is Standalone or Hub/Node with up to five Nodes; medium is Hub/Node with six to sixty Nodes; large is Hub/Node with sixty to one hundred Nodes or Distributed with more than one hundred. These ranges are orientation, not thresholds at which a deployment must change modes. Select a mode based on workload, browser and platform coverage, isolation needs, failure impact, and the effort your team can operate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Protect and check your Grid

A Grid endpoint is an automation control surface, not a public service to expose casually. Selenium warns that outside access can let third parties use Grid infrastructure, reach internal web applications or files, and run custom binaries. Restrict network access with appropriate firewall rules and keep Grid reachable only by trusted clients. The Grid documentation covers architecture and security considerations.

  • Open the Grid UI at the configured endpoint to see registered Nodes and available browser capabilities.
  • Request /status at the Grid endpoint to check whether the server is ready.
  • If a session request cannot be matched, check that a Node is registered and that its available slot stereotype matches the requested browser capabilities.
  • If documented flags do not match your server, use its info config and info security commands to verify version-specific help.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.