synapse-product/synapse/federation
Richard van der Hoff 7078866969
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.]
2020-07-23 18:38:19 +01:00
..
sender Add ability to run multiple pusher instances (#7855) 2020-07-16 14:06:28 +01:00
transport Abort federation requests if the client disconnects early (#7930) 2020-07-23 16:52:33 +01:00
__init__.py Remove unused ReplicationLayer 2018-03-13 11:00:04 +00:00
federation_base.py Replace all remaining six usage with native Python 3 equivalents (#7704) 2020-06-16 08:51:47 -04:00
federation_client.py Convert synapse.app to async/await. (#7868) 2020-07-17 07:08:56 -04:00
federation_server.py Put a cache on /state_ids (#7931) 2020-07-23 18:38:19 +01:00
persistence.py Clean up newline quote marks around the codebase (#6362) 2019-11-21 12:00:14 +00:00
send_queue.py Add ability to shard the federation sender (#7798) 2020-07-10 18:26:36 +01:00
units.py Add typing to synapse.federation.sender (#6871) 2020-02-07 13:56:38 +00:00