view mod_s2s_keepalive/README.markdown @ 4629:0e60ce83205c

mod_s2s_keepalive: Ignore errors from the local server If a stanza can't be delivered and instead an bounce is generated, the origin of the error, when different from the stanza 'from' should be indicated in the 'by' attribute of the <error>, which we look for here so this doesn't count as a successful ping. An error that does come from the remote means we have connectivity, but probably no XEP-0199 handling. This is fine. We care about connectivity, not protocol.
author Kim Alvefur <zash@zash.se>
date Wed, 21 Jul 2021 15:57:13 +0200
parents bfc4d495bf2c
children
line wrap: on
line source

---
summary: Keepalive s2s connections
...

Introduction
============

This module periodically sends [XEP-0199] ping requests to remote servers
to keep your connection alive.

Configuration
=============

Simply add the module to the `modules_enabled` list like any other
module. By default, all current s2s connections will be pinged
periodically. To ping only a subset of servers, list these in
`keepalive_servers`. The ping interval can be set using
`keepalive_interval`.

If no response to the ping has been received in about 10 minutes (or
`keepalive_timeout` seconds) the s2s connections are closed.

``` lua
modules_enabled = {
    ...
    "s2s_keepalive"
}

keepalive_servers = { "conference.prosody.im"; "rooms.swift.im" }
keepalive_interval = 90 -- (in seconds, default is 60 )
keepalive_timeout = 300 -- (in seconds, default is 593 )
```

Compatibility
=============

  ------- -----------------------
  0.11    Works
  0.10    Works
  0.9     Works
  ------- -----------------------