Testing / Selenium Interview questions
Explain the architecture of Selenium Grid 4?
Selenium Grid 4 was rebuilt around a set of composable components communicating over events, replacing the older monolithic Hub/Node model with independently scalable pieces.
flowchart LR
A[New Session Request] --> B[Router]
B --> C[Distributor]
C --> D[Session Queue]
C --> E[Node 1]
C --> F[Node 2]
E --> G[Session Map]
F --> G
B --> G
The Router receives incoming requests and forwards new session requests to the Distributor, which tracks each Node's available capacity and assigns the session to a matching Node, queueing it if none is free. The Session Map records which Node is running which active session so subsequent commands for that session get routed correctly by the Router, without the Router needing to track session state itself. Each Node registers its own available browser/version combinations, which is what lets Grid 4 scale nodes independently rather than requiring one big statically-configured Hub as in Grid 3.
More Related questions...