docker-selenium
docker-selenium copied to clipboard
[🚀 Feature]: Allow multiple Hub pods for high availability
Feature and motivation
Currently when running Selenium Grid in Kubernetes via the Helm-chart, the hub becomes unreachable when deploying changes. This is due to there only being one replica.
Given multiple replicas, a rollout will keep the hub reachable during a deploy.
Usage example
Having multiple replicas will make the Grid more robust.
@BeyondEvil, thank you for creating this issue. We will troubleshoot it as soon as we can.
Info for maintainers
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template label.
If the issue is a question, add the I-question label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-* label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer label.
Thank you!
This is not possible yet because several components cannot run several instances. Like the Distributor.
This is something we need help with because the team is very small these days.
This issue is looking for contributors.
Please comment below or reach out to us through our IRC/Slack/Matrix channels if you are interested.
Thanks for the fast reply @diemol !
I figured as much. Even tho it's been quite some time since I was a heavy user of a self-hosted Grid, what I could remember of the architecture meant it wouldn't support HA.
I tried searching but found nothing, so at least now if others are looking for some answers they'll hopefully find it here.
Adding HA to Grid (Hub components) is quite an advanced topic and would likely require some significant changes. Lots of considerations to have for an application like Grid.
It is "easier" now than in Grid 3, because the different pieces are broken into components. Some of them already can have their data backed in things like a database or Redis. But others need the work to be done.
@diemol Can you comment on which components support multiple replicas and which wouldn't? From my understanding, only the browser and router deployments support multiple replicas, and all the other components can only scale vertically. Is that correct?
Multiple replicas: Router, SessionMap (if backed by JDBC or Redis), Node Need changes to support multiple replicas: SessionQueue, Distributor Needs improvements: EventBus (it is all in memory, and might need an implementation that has storage).
@diemol, I understand that nodes support multiple replicas based on your latest comment. Do hub deployments support multiple replicas in Selenium Grid 4?
No
@diemol : I have a setup with replica count set to 2 for the selenium-chrome-node, however the tests are always run on a single pod and the other pod sits idle. The pods are behind a k8 clusterIP service. Should the I enable/set anything on the Hub to send requests to both the pods ?