How to choose modes?

31 views
Skip to first unread message

Gyurkan Mehmed

unread,
Jan 22, 2023, 10:56:18 PM1/22/23
to Selenium Users
I need to setup infrastructure for parallel testing on selenium-grid, but which one of the two modes I should choose - hub/node vs distributed? Ok on the documentation it says if you need to run more than 100 test concurrently which is my case one should choose distributed mode, but it is not said why. What is the advantage of the Distributed mode vs Hub with multiple nodes on different VMs?

⇜Krishnan Mahadevan⇝

unread,
Jan 22, 2023, 11:05:51 PM1/22/23
to seleniu...@googlegroups.com
Can you please share the documentation link which mentions that if one needs more than 100 tests concurrently then one should use the distributed mode ?

The Hub is basically an encapsulation of a couple of the grid components (router + distributor + session map + new session queue + event bus).

So when you run in Hub+node mode, and when you have a large number of tests that are going to run (100 concurrent tests for e.g.,) then the JVM that runs the hub is going to be strained because it has to perform multiple roles all within the same JVM and it can start becoming demanding on resources ( CPU and RAM for e.g.,)

The distributed mode on the other hand basically has a separate JVM running for each of the above components.

So it all boils down to whether 1 JVM can handle multiple roles at a given load (or) do we want to spawn multiple JVMs (each hosting a specific role) so that it handles the load.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/


On Mon, Jan 23, 2023 at 9:26 AM Gyurkan Mehmed <thepcm...@gmail.com> wrote:
I need to setup infrastructure for parallel testing on selenium-grid, but which one of the two modes I should choose - hub/node vs distributed? Ok on the documentation it says if you need to run more than 100 test concurrently which is my case one should choose distributed mode, but it is not said why. What is the advantage of the Distributed mode vs Hub with multiple nodes on different VMs?

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/3f06aaac-9459-4b31-afa1-c2bb6eaefdbcn%40googlegroups.com.

Gyurkan Mehmed

unread,
Jan 23, 2023, 4:28:41 AM1/23/23
to Selenium Users

⇜Krishnan Mahadevan⇝

unread,
Jan 23, 2023, 4:32:52 AM1/23/23
to seleniu...@googlegroups.com
Am guessing that you were specifically hinting at this section https://www.selenium.dev/documentation/grid/getting_started/#grid-sizes

I thought so as well. Just wanted to confirm it. I hope the explanation I shared earlier adds some insights into the rationale of those recommendations.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/

Gyurkan Mehmed

unread,
Jan 23, 2023, 4:54:52 AM1/23/23
to Selenium Users
Yes thanks, the explanation makes perfects sense. Does it make sense to you if I use docker swarm to deploy each component on different VMs with Distributed mode?

⇜Krishnan Mahadevan⇝

unread,
Jan 23, 2023, 5:02:24 AM1/23/23
to seleniu...@googlegroups.com
Yeah, that should work and it should also help you manage the load by allowing you to scale the individual components.

There are some helm charts already defined for the grid here https://github.com/SeleniumHQ/docker-selenium/tree/trunk/charts/selenium-grid

You can perhaps check that to get some head start.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/

Reply all
Reply to author
Forward
0 new messages