seleniumkit / gridrouter

Selenium-based solution to serve 1000+ browsers
Other
152 stars 36 forks source link

Updating Quota dynamically #34

Open dhorbach opened 7 years ago

dhorbach commented 7 years ago

Hi,

My assumption is that quota.xml contains static list of hubs for balancing. What if we have scalable environment (hub servers are added dynamically) - is there any API to add new hubs to quota on top of default configuration? We can't restart gridrouter or selenograph because it might impact existing sessions.

This is different to what I requested in https://github.com/seleniumkit/gridrouter/issues/32 but related to the same scaling strategy - add new hub servers dynamically

Would be great to know what strategy you have in-house.

vania-pooh commented 7 years ago

@dhorbach currently gridrouter does two things: reads XML files on start and re-reads them on XML change. So if you dynamically change XML using some hooks from the cloud side - it will work. However having several instances of Gridrouter behind load balancer you can have a situation when one instance has already loaded a new XML and another one - has not. In that case with round-robin load balancing the following can happen:

You may also want to look at our recently open-sourced Selenium Hub replacement: https://github.com/seleniumkit/selenoud This stuff uses Docker API to start container with browser for each session. You can prepare containers for all browsers and have homogenous nodes with Selenoud behind GridRouter.