Sha256: c24fddee71e9712c5d297507d0dfa2f58a2cd80ad89e3b110b0c3e3a6ab86a1f

Contents?: true

Size: 1.3 KB

Versions: 5

Compression:

Stored size: 1.3 KB

Contents

# Reliablity

## Durability

Wayfarer executes atop reliable messages queues such as Sidekiq, Resque,
RabbitMQ, etc. Its configuration is independent of the underlying queue
infrastructure it reads from and writes to.

## Self-healing user agents

Wayfarer handles the scenario where a remote browser process has crashed and
must be replaced by a fresh browser process.

This can be tested locally by automating a browser with headless mode turned
off, and then closing the opened browser window: The current job fails, but the
next job has access to a newly established browser session again.

For example Ferrum might raise `Ferrum::DeadBrowserError`. Wayfarer's
user agents are self-healing and react to these kinds of errors internally. When
a browser window is closed, the Ferrum user agent attempts to establish a new
browser process as a replacement, for the next job to use.

[Wayfarer never swallows exceptions](/guides/error_handling). This means
that even though the user agent might heal itself, jobs still need to explicitly
retry browser errors:

```ruby
class Foobar < Wayfarer::Base
  route { to: :index }

  retry_on Ferrum::DeadBrowserError, attempts: 3, wait: :exponentially_longer

  # ...
end
```

This leads to log entries like:

```
Retrying DummyJob in 3 seconds, due to a Ferrum::DeadBrowserError.
```

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wayfarer-0.4.6 docs/guides/reliability.md
wayfarer-0.4.5 docs/guides/reliability.md
wayfarer-0.4.4 docs/guides/reliability.md
wayfarer-0.4.3 docs/guides/reliability.md
wayfarer-0.4.2 docs/guides/reliability.md