Skip to content

Commit

Permalink
Update upstream.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dragoangel authored Jun 8, 2024
1 parent aa04e54 commit 45b1cc1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/configuration/upstream.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ When an upstream reaches the error rate limit, Rspamd marks it as inactive and w

<img class="img-fluid" width="75%" src="{{ site.baseurl }}/img/upstreams.png">

To tune this settings please see [Upstream options]({{ site.baseurl }}/doc/configuration/options.html#upstream-options) documentation.

## Name resolution

Rspamd treats upstreams defined with their names differently. During the `revive_time`, Rspamd attempts to re-resolve these names and inserts any new IP addresses into the upstream list. If a name has multiple addresses, Rspamd includes all of them. The addresses are then selected using round-robin rotation with error checking. Unlike upstream configurations, errors are persistent and not cleared after successful attempts. Therefore, Rspamd always selects an address with a lower error count. This approach is taken to disable an IPv6 address, for example, if IPv6 is improperly configured in the system.
Rspamd treats upstreams defined with their names differently. During the `revive_time`, Rspamd attempts to re-resolve these names and inserts any new IP addresses into the upstream list. Minimum interval between resolve attemps controlled by `resolve_min_interval` which by default set to 1 minute. If a name has multiple addresses, Rspamd includes all of them. The addresses are then selected using round-robin rotation with error checking. Unlike upstream configurations, errors are persistent and not cleared after successful attempts. Therefore, Rspamd always selects an address with a lower error count. This approach is taken to disable an IPv6 address, for example, if IPv6 is improperly configured in the system.

Starting from version 2.0, Rspamd also performs background resolution of all upstreams every `lazy_resolve_time` + `jitter(0.1 * lazy_resolve_time)`. By default, this value is set to 1 hour, but you can customize it in the configuration (options -> upstreams section). This allows Rspamd to update its knowledge of upstream IP addresses, ensuring efficient and reliable connections. SRV based upstreams are resolved in two steps: one for SRV record resolution and one for targets resolution.

0 comments on commit 45b1cc1

Please sign in to comment.