synapse-old/synapse
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
..
_scripts
api Ensure that calls to `json.dumps` are compatible with the standard library json. (#7836) 2020-07-15 13:40:54 -04:00
app Convert synapse.app to async/await. (#7868) 2020-07-17 07:08:56 -04:00
appservice Include room states on invite events sent to ASes (#6455) 2020-07-10 18:44:56 +01:00
config Fix a typo in the sample config. (#7890) 2020-07-20 13:42:52 -04:00
crypto
events Fix deprecation warning: import ABC from collections.abc (#7892) 2020-07-20 13:33:04 -04:00
federation Put a cache on `/state_ids` (#7931) 2020-07-23 18:38:19 +01:00
groups
handlers Follow-up to admin API to re-activate accounts (#7908) 2020-07-22 12:33:19 -04:00
http Convert the federation agent and related code to async/await. (#7874) 2020-07-23 07:05:57 -04:00
logging Clean up PreserveLoggingContext (#7877) 2020-07-22 00:40:27 +01:00
metrics Improve stacktraces from exceptions in background processes (#7808) 2020-07-09 13:01:33 +01:00
module_api
push Add ability to run multiple pusher instances (#7855) 2020-07-16 14:06:28 +01:00
replication Remove an unused prometheus metric (#7878) 2020-07-22 00:40:55 +01:00
res/templates Element CSS and logo in email templates (#7919) 2020-07-21 11:58:01 +01:00
rest Skip serializing /sync response if client has disconnected (#7927) 2020-07-22 13:44:16 +01:00
server_notices
spam_checker_api
state
static
storage Follow-up to admin API to re-activate accounts (#7908) 2020-07-22 12:33:19 -04:00
streams Fix some spelling mistakes / typos. (#7811) 2020-07-09 09:52:58 -04:00
util Fix deprecation warning: import ABC from collections.abc (#7892) 2020-07-20 13:33:04 -04:00
__init__.py 1.17.0 2020-07-13 10:20:36 +01:00
event_auth.py Fix recursion error when fetching auth chain over federation (#7817) 2020-07-10 18:15:35 +01:00
notifier.py Fix some spelling mistakes / typos. (#7811) 2020-07-09 09:52:58 -04:00
python_dependencies.py
secrets.py
server.py Allow moving typing off master (#7869) 2020-07-16 15:12:54 +01:00
server.pyi Allow moving typing off master (#7869) 2020-07-16 15:12:54 +01:00
types.py
visibility.py Fix some spelling mistakes / typos. (#7811) 2020-07-09 09:52:58 -04:00