This module essentially rate limits the number of outgoing connection attempts to domains that Prosody hasn’t been able to connect to.
This can help with resource usage (no need to queue undelivered stanzas for unreachable domains), and also reduces noise in the log files.
The retry period is proportional to the amount of time since Prosody last had a connection to the domain. It also includes some randomness to prevent multiple servers unintentially flooding a domain with reconnection attempts at the same time. On average a failed domain will be tried around 15 times in the first hour of unavailability, decreasing in frequency to 1-2 attempts per hour after that.
The only configuration option is:
s2s_cache_failures_domain_cache_sizeNot compatible with Prosody 13.0 or earlier. Compatible with Prosody trunk from 2026-10-29.
Commit 4067a95336dd
also introduces a new s2s_block_immediate_retries option
which you may want to enable, to catch some cases of retries which this
module cannot otherwise prevent.
With the plugin installer in Prosody 0.12 you can use:
sudo prosodyctl install --server=https://modules.prosody.im/rocks/ mod_s2s_cache_failures
For earlier versions see the documentation for installing 3rd party modules