Skip to content

Commit

Permalink
Adding the self-healing page
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe Hanrigou committed Mar 9, 2010
1 parent 59e6797 commit 8a2b864
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
target
doc/website/faq.html
doc/website/configuring-and-tuning.html
doc/website/self-healing.html
examples/ruby/tmp
test-output
.dotest
Expand Down
87 changes: 87 additions & 0 deletions doc/website/self-healing.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
Title: Selenium Grid Self-Healing
CSS: stylesheets/site.css stylesheets/document.css stylesheets/faq.css
Use numbered headers: false

<div class="header">
<a href="index.html"><img alt="Selenium_grid_logo_large" src="images/selenium-grid-logo-large.png"/></a>
<p>Self-Healing</p>
</div>

Table Of Content:
{: class=toc}

* This will become a table of contents (this text will be scraped).
{:toc}

Heartbeat Mechanism
===================

To ease the maintenance of a Selenium Grid deployment:

* Selenium Grid Hub sends periodic heartbeat messages to all registered
Remote Controls to make sure that they are still up-and-running.

* Selenium Grid Remote Controls send periodic heartbeat messages to the Hub
to check that it still considers them as registered.

Keep in mind that **there is obviously a performance tradeoff in how often
these heartbeat messages are sent**:

* If you send them too often they will use most of your network bandwidth for
heartbeat management messages as opposed to actual testing commands.

* If you wait too long to send heartbeat messages, it might take longer for
the Hub and the Remote Controls to automatically unregister or reconnect.


Hub: Automatic Unregistering of Unresponsive Remote Controls
===========================================================

Remote Controls sometimes die, are killed or just hang. To better
cope with these situations, Selenium Grid Hub checks the status of registered
Remote Controls. It will automatically unregister:

* A Remote Control detected as **unavailable when reserving it to start a new
test session**

* A Remote Control that **does not respond to a heartbeat message request**
(periodic poll every `remoteControlPollingIntervalInSeconds` seconds,
default is 2 minutes)

* A _reserved_ Remote Control whose **testing session has been idle for more
than `sessionMaxIdleTimeInSeconds` seconds** (3 minutes by default).
Sessions are checked every `remoteControlPollingIntervalInSeconds` seconds
(at the same time heartbeat messages are sent).

`remoteControlPollingIntervalInSeconds` and `sessionMaxIdleTimeInSeconds` are
configuration parameters that can be set in `grid_configuration.yml`. For instance:

hub:
port: 4444
remoteControlPollingIntervalInSeconds: 180
sessionMaxIdleTimeInSeconds: 300
environments:
- name: "Firefox on Windows"
browser: "*firefox"

Remote Control: Automatic Re-registering to the Hub
===================================================

Sometimes you might want to restart Selenium Grid Hub without restarting all
the Remote Controls that were previously registered. Or the Hub might
temporarily get disconnected from the remote controls. To better cope with
these situations, the Remote Controls periodically poll the Hub (every
`hubPollerIntervalInSeconds` seconds, default is 3 minutes).

If the Hub can be contacted but does not have any registered Remote Control
matching the information sent by the Remote Control submitting the
heartbeat request, **the Remote Control will re-register itself to the Hub
automatically**.

You can specify `hubPollerIntervalInSeconds` when starting the
Remote Controls. For instance:

ant -DhubPollerIntervalInSeconds=120 launch-hub


0 comments on commit 8a2b864

Please sign in to comment.