diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2020-07-23 18:38:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-23 18:38:19 +0100 |
commit | 7078866969758e52eec33ebdb8288e203d8bd2b7 (patch) | |
tree | 814050c5ec16f094711b267129ea5d7332f9de1b /changelog.d/7929.misc | |
parent | Abort federation requests if the client disconnects early (#7930) (diff) | |
download | synapse-7078866969758e52eec33ebdb8288e203d8bd2b7.tar.xz |
Put a cache on `/state_ids` (#7931)
If we send out an event which refers to `prev_events` which other servers in the federation are missing, then (after a round or two of backfill attempts), they will end up asking us for `/state_ids` at a particular point in the DAG. As per https://github.com/matrix-org/synapse/issues/7893, this is quite expensive, and we tend to see lots of very similar requests around the same time. We can therefore handle this much more efficiently by using a cache, which (a) ensures that if we see the same request from multiple servers (or even the same server, multiple times), then they share the result, and (b) any other servers that miss the initial excitement can also benefit from the work. [It's interesting to note that `/state` has a cache for exactly this reason. `/state` is now essentially unused and replaced with `/state_ids`, but evidently when we replaced it we forgot to add a cache to the new endpoint.]
Diffstat (limited to 'changelog.d/7929.misc')
0 files changed, 0 insertions, 0 deletions