diff --git a/complement/conf/start_for_complement.sh b/complement/conf/start_for_complement.sh index e658d4f..972ecb7 100755 --- a/complement/conf/start_for_complement.sh +++ b/complement/conf/start_for_complement.sh @@ -67,7 +67,9 @@ if [[ -n "$SYNAPSE_COMPLEMENT_USE_WORKERS" ]]; then client_reader, \ appservice, \ stream_writers=account_data+to_device+presence+receipts+typing, \ - pusher" + pusher, \ + other_client_endpoints, \ + other_fed_endpoints" fi log "Workers requested: $SYNAPSE_WORKER_TYPES" diff --git a/configure_workers_and_start.py b/configure_workers_and_start.py index 5cb9383..377728a 100755 --- a/configure_workers_and_start.py +++ b/configure_workers_and_start.py @@ -98,11 +98,11 @@ "listener_resources": ["media"], "endpoint_patterns": [ "^/_matrix/media/", + "^/_synapse/admin/v1/media/.*$", "^/_synapse/admin/v1/purge_media_cache$", "^/_synapse/admin/v1/room/.*/media.*$", - "^/_synapse/admin/v1/user/.*/media.*$", - "^/_synapse/admin/v1/media/.*$", "^/_synapse/admin/v1/room/.*/media/quarantine$", + "^/_synapse/admin/v1/user/.*/media.*$", ], # The first configured media worker will run the media background jobs "shared_extra_conf": { @@ -129,10 +129,10 @@ "app": "synapse.app.generic_worker", "listener_resources": ["client"], "endpoint_patterns": [ - "^/_matrix/client/(r0|v3|unstable)/sync$", "^/_matrix/client/(api/v1|r0|v3)/events$", "^/_matrix/client/(api/v1|r0|v3)/initialSync$", # "^/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync$", + "^/_matrix/client/(r0|v3|unstable)/sync$", ], "shared_extra_conf": {}, "worker_extra_conf": "", @@ -141,28 +141,31 @@ "app": "synapse.app.generic_worker", "listener_resources": ["client"], "endpoint_patterns": [ + "^/_matrix/client/(api/v1|r0|v3|unstable)/joined_rooms", + "^/_matrix/client/(api/v1|r0|v3|unstable)/login$", "^/_matrix/client/(api/v1|r0|v3|unstable)/publicRooms$", - "^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/joined_members$", "^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/context/.*$", + "^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/event", + "^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/joined_members$", "^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members$", + # This one needs to be routed by the .* cuz that's the room name. + "^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/messages$", "^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state$", - "^/_matrix/client/v1/rooms/.*/hierarchy$", - "^/_matrix/client/(v1|unstable)/rooms/.*/relations/", - "^/_matrix/client/v1/rooms/.*/threads$", - "^/_matrix/client/(api/v1|r0|v3|unstable)/login$", + "^/_matrix/client/(api/v1|r0|v3|unstable)/search", + "^/_matrix/client/(api/v1|r0|v3|unstable)/voip/turnServer$", "^/_matrix/client/(r0|v3|unstable)/account/3pid$", "^/_matrix/client/(r0|v3|unstable)/account/whoami$", - "^/_matrix/client/versions$", - "^/_matrix/client/(api/v1|r0|v3|unstable)/voip/turnServer$", - "^/_matrix/client/(api/v1|r0|v3|unstable)/register$", "^/_matrix/client/(r0|v3|unstable)/auth/.*/fallback/web$", - # This one needs to be routed by the .* cuz that's the room name. - "^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/messages$", - "^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/event", - "^/_matrix/client/(api/v1|r0|v3|unstable)/joined_rooms", + "^/_matrix/client/(r0|v3|unstable)/register$", + # Covers both + # "^/_matrix/client/unstable/org\.matrix\.msc2432/rooms/.*/aliases", + # "^/_matrix/client/(r0|v3)/rooms/.*/aliases$", "^/_matrix/client/(r0|v3|unstable/.*)/rooms/.*/aliases", + "^/_matrix/client/(v1|unstable)/rooms/.*/relations/", + "^/_matrix/client/v1/rooms/.*/hierarchy$", + "^/_matrix/client/v1/rooms/.*/threads$", "^/_matrix/client/v1/rooms/.*/timestamp_to_event$", - "^/_matrix/client/(api/v1|r0|v3|unstable)/search", + "^/_matrix/client/versions$", ], "shared_extra_conf": {}, "worker_extra_conf": "", @@ -171,24 +174,24 @@ "app": "synapse.app.generic_worker", "listener_resources": ["federation"], "endpoint_patterns": [ - "^/_matrix/federation/(v1|v2)/event/", - "^/_matrix/federation/(v1|v2)/state/", - "^/_matrix/federation/(v1|v2)/state_ids/", "^/_matrix/federation/(v1|v2)/backfill/", + "^/_matrix/federation/(v1|v2)/exchange_third_party_invite/", + "^/_matrix/federation/(v1|v2)/event/", + "^/_matrix/federation/(v1|v2)/event_auth/", + "^/_matrix/federation/(v1|v2)/get_groups_publicised$", "^/_matrix/federation/(v1|v2)/get_missing_events/", - "^/_matrix/federation/(v1|v2)/publicRooms", - "^/_matrix/federation/(v1|v2)/query/", + "^/_matrix/federation/(v1|v2)/invite/", "^/_matrix/federation/(v1|v2)/make_join/", "^/_matrix/federation/(v1|v2)/make_leave/", + "^/_matrix/federation/(v1|v2)/publicRooms", + "^/_matrix/federation/(v1|v2)/query/", + "^/_matrix/federation/(v1|v2)/query_auth/", "^/_matrix/federation/(v1|v2)/send_join/", "^/_matrix/federation/(v1|v2)/send_leave/", - "^/_matrix/federation/(v1|v2)/invite/", - "^/_matrix/federation/(v1|v2)/query_auth/", - "^/_matrix/federation/(v1|v2)/event_auth/", - "^/_matrix/federation/v1/timestamp_to_event/", - "^/_matrix/federation/(v1|v2)/exchange_third_party_invite/", + "^/_matrix/federation/(v1|v2)/state/", + "^/_matrix/federation/(v1|v2)/state_ids/", "^/_matrix/federation/(v1|v2)/user/devices/", - "^/_matrix/federation/(v1|v2)/get_groups_publicised$", + "^/_matrix/federation/v1/timestamp_to_event/", "^/_matrix/key/v2/query", ], "shared_extra_conf": {}, @@ -221,12 +224,12 @@ "app": "synapse.app.generic_worker", "listener_resources": ["client"], "endpoint_patterns": [ + "^/_matrix/client/(api/v1|r0|v3|unstable)/join/", + "^/_matrix/client/(api/v1|r0|v3|unstable)/profile/", "^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact", "^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/send", "^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/" "(join|invite|leave|ban|unban|kick)$", - "^/_matrix/client/(api/v1|r0|v3|unstable)/join/", - "^/_matrix/client/(api/v1|r0|v3|unstable)/profile/", "^/_matrix/client/(v1|unstable/org.matrix.msc2716)/rooms/.*/batch_send", ], "shared_extra_conf": {}, @@ -243,8 +246,8 @@ "app": "synapse.app.generic_worker", "listener_resources": ["client", "replication"], "endpoint_patterns": [ - "^/_matrix/client/(r0|v3|unstable)/.*/tags", "^/_matrix/client/(r0|v3|unstable)/.*/account_data", + "^/_matrix/client/(r0|v3|unstable)/.*/tags", ], "shared_extra_conf": {}, "worker_extra_conf": "", @@ -260,8 +263,8 @@ "app": "synapse.app.generic_worker", "listener_resources": ["client", "replication"], "endpoint_patterns": [ - "^/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt", "^/_matrix/client/(r0|v3|unstable)/rooms/.*/read_markers", + "^/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt", ], "shared_extra_conf": {}, "worker_extra_conf": "", @@ -282,6 +285,53 @@ "shared_extra_conf": {}, "worker_extra_conf": "", }, + "other_fed_endpoints": { + "app": "synapse.app.generic_worker", + "listener_resources": ["federation", "replication"], + "endpoint_patterns": [ + "^/_matrix/federation/(v1|v2)/version$", + "^/_matrix/federation/(v1|v2)/user/keys/claim$", + # "^/_matrix/federation/(v1|v2)/user/keys/query$", + "^/_matrix/federation/(v1|v2)/send_knock/.*/.*$", + # "^/_matrix/federation/(v1|v2)/openid/userinfo$", + "^/_matrix/federation/(v1|v2)/make_knock/.*/.*$", + "^/_matrix/federation/(v1|v2)/hierarchy/.*$", + # "^/_matrix/federation/(v1|v2)/3pid/onbind$", + "^/_matrix/federation/unstable/rooms/.*/complexity$", + ], + "shared_extra_conf": {}, + "worker_extra_conf": "", + }, + "other_client_endpoints": { + "app": "synapse.app.generic_worker", + "listener_resources": ["client", "replication"], + "endpoint_patterns": [ + "^/_matrix/client/(api/v1|r0|v3|unstable)/events/.*$", + "^/_matrix/client/(api/v1|r0|v3|unstable)/createRoom$", + "^/_matrix/client/(api/v1|r0|v3|unstable)/createRoom/.*$", + # "^/_matrix/client/(api/v1|r0|v3|unstable)/login/(cas|sso)/redirect$", + "^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state/.*$", + "^/_matrix/client/(r0|v3|unstable)/devices$", + "^/_matrix/client/(r0|v3|unstable)/keys/changes$", + "^/_matrix/client/(r0|v3|unstable)/keys/claim$", + "^/_matrix/client/(r0|v3|unstable)/keys/query$", + "^/_matrix/client/(r0|v3|unstable)/knock/.*", + # "^/_matrix/client/(r0|v3|unstable)/room_keys/keys(/.*)?(/.*)?$", + "^/_matrix/client/(r0|v3|unstable)/room_keys/keys", + "^/_matrix/client/(r0|v3|unstable)/room_keys/version$", + "^/_matrix/client/(r0|v3|unstable)/room_keys/version/.*$" + # Next covers this too: + # "^/_matrix/client/(r0|v3|unstable)/user/.*/filter/.*", + "^/_matrix/client/(r0|v3|unstable)/user/.*/filter", + # "^/_matrix/client/(r0|v3)/login/sso/redirect/.*$", + "^/_matrix/client/(r0|v3|unstable)/refresh$", + "^/_matrix/client/(v1|unstable)/register/m.login.registration_token" + "/validity", + "^/_matrix/client/versions$", + ], + "shared_extra_conf": {}, + "worker_extra_conf": "", + }, } HTTP_BASED_LISTENER_RESOURCES = [