Grapevine is a Matrix homeserver, forked from Conduit 0.7.0
Find a file
Olivia Lee 9b22c9b40b
add service for tracking backoffs to offline servers
Currently we have some exponential backoff logic scattered in different
locations, with multiple distinct bad implementations. We should
centralize backoff logic in one place and actually do it correctly.

This backoff logic is similar to synapse's implementation[1], with a
couple fixes:

 - we wait until we observe 5 consecutive failures before we start
   delaying requests, to avoid being sensitive to a small fraction of
   failed requests on an otherwise healthy server.
 - synapse's implementation is kinda similar to our "only increment the
   failure count once per batch of concurrent requests" behavoir, where
   they base the retry state written to the store on the state observed
   at the beginning of the request, rather on the state observed at the
   end of the request. Their implementation has a bug, where a success
   will be ignored if a failure occurs in the same batch. We do not
   replicate this bug.

Our parameter choices are significantly less aggressive than synapse[2], which
starts at 10m delay, has a multiplier of 2, and saturates at 4d delay.

[1]: 70b0e38603/synapse/util/retryutils.py
[2]: 70b0e38603/synapse/config/federation.py (L83)
2024-11-16 20:13:09 -08:00
bin use all-features devshell for clippy/all in CI 2024-05-30 21:19:08 -07:00
book update changelog 2024-11-12 00:36:36 -08:00
nix upgrade to latest rust-rocksdb 2024-11-08 17:26:38 -08:00
src add service for tracking backoffs to offline servers 2024-11-16 20:13:09 -08:00
tests/integrations make all caches individually configurable 2024-11-01 14:25:52 -07:00
.envrc optionally use nom to build devshell dependencies 2024-05-30 21:19:09 -07:00
.gitignore set up mdbook 2024-06-16 20:23:18 -07:00
.gitlab-ci.yml disable IFD in CI 2024-08-13 12:12:57 -07:00
.lycheeignore set up mdbook 2024-06-16 20:23:18 -07:00
.markdownlintignore set up mdbook 2024-06-16 20:23:18 -07:00
book.toml oops, i dropped my fork 2024-09-20 16:52:05 -07:00
Cargo.lock upgrade to latest ruma 2024-11-08 17:26:44 -08:00
Cargo.toml upgrade to latest rust-rocksdb 2024-11-08 17:26:38 -08:00
clippy.toml enable doc_markdown lint 2024-05-14 16:34:10 -07:00
default.nix feat: support non-flake users 2024-02-01 19:19:56 -08:00
engage.toml set up mdbook 2024-06-16 20:23:18 -07:00
flake.lock upgrade to latest rust-rocksdb 2024-11-08 17:26:38 -08:00
flake.nix upgrade to latest rust-rocksdb 2024-11-08 17:26:38 -08:00
LICENSE.md convert license to markdown 2024-04-30 21:54:56 -07:00
README.md oops, i dropped my fork 2024-09-20 16:52:05 -07:00
rust-toolchain.toml Update MSRV to 1.81.0 2024-09-08 09:54:08 -07:00
rustfmt.toml enable error_on_line_overflow and fix errors 2024-05-16 19:11:40 -07:00

Grapevine

A Matrix homeserver.

Read the book

Click here to read the latest version.