summary refs log tree commit diff
path: root/changelog.d/7931.feature (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 1.18.0rc1Richard van der Hoff2020-07-271-1/+0
|
* Put a cache on `/state_ids` (#7931)Richard van der Hoff2020-07-231-0/+1
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.]