Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Quota dynamically #34

Open
dhorbach opened this issue Sep 28, 2016 · 1 comment
Open

Updating Quota dynamically #34

dhorbach opened this issue Sep 28, 2016 · 1 comment

Comments

@dhorbach
Copy link

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 #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
Copy link
Member

vania-pooh commented Sep 29, 2016

@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 request a browser from already updated instance and get a session from a newly added host
  • The second request goes to another instance with old quota and fails with 404 because new hosts are not present in quota
    This state can last a few seconds and we know about it. However with sufficiently big number of hosts behind grid router this situation is not very probable.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants