aboutsummaryrefslogtreecommitdiff
path: root/dendrite-sample.monolith.yaml
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-09-20 17:17:44 +0100
committerGitHub <noreply@github.com>2022-09-20 17:17:44 +0100
commitd8b19c857ffa3f8818ef7f16fa2cda6ba9324430 (patch)
treebd1930c223c91b28be9954b782d81bafee420a6d /dendrite-sample.monolith.yaml
parentbd39748b5c8b1890950db100382d3b128d333222 (diff)
HTTP connection keepalives (#2730)
Beforehand we disabled HTTP keepalives to prevent ambient system resources from being used by excess idle connections. Now that we've fixed some bugs in the federation API and device list updater, this situation is now much better and we don't open so many remote connections anyway. Keepalives allow us to not have to handshake TLS so often (which is quite expensive) and reusing an idle connection is much faster than having to open a new one. This can help with response times when talking to remote federated servers. This PR also adds a new option to disable keepalives if needed: ``` # Disable HTTP keepalives, which also prevents connection reuse. Dendrite will typically # keep HTTP connections open to remote hosts for 5 minutes as they can be reused much # more quickly than opening new connections each time. Disabling keepalives will close # HTTP connections immediately after a successful request but may result in more CPU and # memory being used on TLS handshakes for each new connection instead. disable_http_keepalives: false ```
Diffstat (limited to 'dendrite-sample.monolith.yaml')
-rw-r--r--dendrite-sample.monolith.yaml7
1 files changed, 7 insertions, 0 deletions
diff --git a/dendrite-sample.monolith.yaml b/dendrite-sample.monolith.yaml
index 195d1161..f1758f54 100644
--- a/dendrite-sample.monolith.yaml
+++ b/dendrite-sample.monolith.yaml
@@ -212,6 +212,13 @@ federation_api:
# enable this option in production as it presents a security risk!
disable_tls_validation: false
+ # Disable HTTP keepalives, which also prevents connection reuse. Dendrite will typically
+ # keep HTTP connections open to remote hosts for 5 minutes as they can be reused much
+ # more quickly than opening new connections each time. Disabling keepalives will close
+ # HTTP connections immediately after a successful request but may result in more CPU and
+ # memory being used on TLS handshakes for each new connection instead.
+ disable_http_keepalives: false
+
# Perspective keyservers to use as a backup when direct key fetches fail. This may
# be required to satisfy key requests for servers that are no longer online when
# joining some rooms.