diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2024-02-28 20:59:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-28 20:59:34 +0100 |
commit | 865fff5f03d06f649736c7fcca134086dfccf7ab (patch) | |
tree | 013a330d5a5770547cad8fcf45ae1ab1cb4f8b29 /setup | |
parent | 4ccf6d6f67e7029a0c4f074aca93b0bcf267e5b6 (diff) |
Make usage of relays optional, avoid DB roundtrips (#3337)
This should avoid 2 additional DB roundtrips if we don't want to use
relays.
So instead of possibly doing roughly 20k trips to the DB, we are now
"only" doing ~6600.
---------
Co-authored-by: devonh <devon.dmytro@gmail.com>
Diffstat (limited to 'setup')
-rw-r--r-- | setup/config/config_federationapi.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/setup/config/config_federationapi.go b/setup/config/config_federationapi.go index a72eee36..073c46e0 100644 --- a/setup/config/config_federationapi.go +++ b/setup/config/config_federationapi.go @@ -18,6 +18,13 @@ type FederationAPI struct { // The default value is 16 if not specified, which is circa 18 hours. FederationMaxRetries uint32 `yaml:"send_max_retries"` + // P2P Feature: Whether relaying to specific nodes should be enabled. + // Defaults to false. + // Note: Enabling relays introduces a huge startup delay, if you are not using + // relays and have many servers to re-hydrate on start. Only enable this + // if you are using relays! + EnableRelays bool `yaml:"enable_relays"` + // P2P Feature: How many consecutive failures that we should tolerate when // sending federation requests to a specific server until we should assume they // are offline. If we assume they are offline then we will attempt to send |