Grapevine is a Matrix homeserver, forked from Conduit 0.7.0
Find a file
Benjamin Lee 146465693e
remove sync response cache
This cache can serve invalid responses, and has an extremely low hit
rate.

It serves invalid responses because because it's only keyed off
the `since` parameter, but many of the other request parameters also
affect the response or it's side effects. This will become worse once we
implement filtering, because there will be a wider space of parameters
with different responses. This problem is fixable, but not worth it
because of the low hit rate.

The low hit rate is because normal clients will always issue the next
sync request with `since` set to the `prev_batch` value of the previous
response. The only time we expect to see multiple requests with the same
`since` is when the response is empty, but we don't cache empty
responses.

This was confirmed experimentally by logging cache hits and misses over
15 minutes with a wide variety of clients. This test was run on
matrix.computer.surgery, which has only a few active users, but a
large volume of sync traffic from many rooms. Over the test period, we
had 3 hits and 5309 misses. All hits occurred in the first minute, so I
suspect that they had something to do with client recovery from an
offline state. The clients that were connected during the test are:

 - element web
 - schildichat web
 - iamb
 - gomuks
 - nheko
 - fractal
 - fluffychat web
 - fluffychat android
 - cinny web
 - element android
 - element X android

Fixes: #2
2024-05-16 21:33:06 -07:00
bin build and cache all packages and CI dependencies 2024-05-14 20:08:37 -07:00
nix add conduit compat mode 2024-05-14 20:21:51 -07:00
src remove sync response cache 2024-05-16 21:33:06 -07:00
.envrc allow loading env vars from .env if it exists 2024-05-14 20:08:37 -07:00
.gitignore allow loading env vars from .env if it exists 2024-05-14 20:08:37 -07:00
.gitlab-ci.yml build and cache all packages and CI dependencies 2024-05-14 20:08:37 -07:00
Cargo.lock enable string_slice lint 2024-05-12 19:08:12 -07:00
Cargo.toml enable most pedantic lints as a group 2024-05-14 20:01:25 -07: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 run clippy for no, default, and all features 2024-04-30 21:54:56 -07:00
flake.lock get rocksdb via flake inputs 2024-05-14 20:21:51 -07:00
flake.nix add a nixos module 2024-05-14 20:21:51 -07:00
LICENSE.md convert license to markdown 2024-04-30 21:54:56 -07:00
rust-toolchain.toml update rust toolchain 2024-01-25 21:44:40 -08:00
rustfmt.toml enable error_on_line_overflow and fix errors 2024-05-16 19:11:40 -07:00