Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

421 строка
16 KiB

  1. ---
  2. matrix_synapse_workers_generic_worker_endpoints:
  3. # This worker can handle API requests matching the following regular expressions.
  4. # These endpoints can be routed to any worker. If a worker is set up to handle a
  5. # stream then, for maximum efficiency, additional endpoints should be routed to that
  6. # worker: refer to the [stream writers](#stream-writers) section below for further
  7. # information.
  8. # Sync requests
  9. - ^/_matrix/client/(r0|v3)/sync$
  10. - ^/_matrix/client/(api/v1|r0|v3)/events$
  11. - ^/_matrix/client/(api/v1|r0|v3)/initialSync$
  12. - ^/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync$
  13. # Federation requests
  14. - ^/_matrix/federation/v1/event/
  15. - ^/_matrix/federation/v1/state/
  16. - ^/_matrix/federation/v1/state_ids/
  17. - ^/_matrix/federation/v1/backfill/
  18. - ^/_matrix/federation/v1/get_missing_events/
  19. - ^/_matrix/federation/v1/publicRooms
  20. - ^/_matrix/federation/v1/query/
  21. - ^/_matrix/federation/v1/make_join/
  22. - ^/_matrix/federation/v1/make_leave/
  23. - ^/_matrix/federation/(v1|v2)/send_join/
  24. - ^/_matrix/federation/(v1|v2)/send_leave/
  25. - ^/_matrix/federation/(v1|v2)/invite/
  26. - ^/_matrix/federation/v1/event_auth/
  27. - ^/_matrix/federation/v1/exchange_third_party_invite/
  28. - ^/_matrix/federation/v1/user/devices/
  29. - ^/_matrix/federation/v1/get_groups_publicised$
  30. - ^/_matrix/key/v2/query
  31. - ^/_matrix/federation/(v1|unstable/org.matrix.msc2946)/hierarchy/
  32. # Inbound federation transaction request
  33. - ^/_matrix/federation/v1/send/
  34. # Client API requests
  35. - ^/_matrix/client/(api/v1|r0|v3|unstable)/createRoom$
  36. - ^/_matrix/client/(api/v1|r0|v3|unstable)/publicRooms$
  37. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/joined_members$
  38. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/context/.*$
  39. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members$
  40. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state$
  41. - ^/_matrix/client/(v1|unstable/org.matrix.msc2946)/rooms/.*/hierarchy$
  42. - ^/_matrix/client/unstable/im.nheko.summary/rooms/.*/summary$
  43. - ^/_matrix/client/(r0|v3|unstable)/account/3pid$
  44. - ^/_matrix/client/(r0|v3|unstable)/devices$
  45. - ^/_matrix/client/versions$
  46. - ^/_matrix/client/(api/v1|r0|v3|unstable)/voip/turnServer$
  47. - ^/_matrix/client/(r0|v3|unstable)/joined_groups$
  48. - ^/_matrix/client/(r0|v3|unstable)/publicised_groups$
  49. - ^/_matrix/client/(r0|v3|unstable)/publicised_groups/
  50. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/event/
  51. - ^/_matrix/client/(api/v1|r0|v3|unstable)/joined_rooms$
  52. - ^/_matrix/client/(api/v1|r0|v3|unstable)/search$
  53. # Encryption requests
  54. - ^/_matrix/client/(r0|v3|unstable)/keys/query$
  55. - ^/_matrix/client/(r0|v3|unstable)/keys/changes$
  56. - ^/_matrix/client/(r0|v3|unstable)/keys/claim$
  57. - ^/_matrix/client/(r0|v3|unstable)/room_keys/
  58. # Registration/login requests
  59. - ^/_matrix/client/(api/v1|r0|v3|unstable)/login$
  60. - ^/_matrix/client/(r0|v3|unstable)/register$
  61. - ^/_matrix/client/v1/register/m.login.registration_token/validity$
  62. # Event sending requests
  63. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact
  64. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/send
  65. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state/
  66. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/(join|invite|leave|ban|unban|kick)$
  67. - ^/_matrix/client/(api/v1|r0|v3|unstable)/join/
  68. - ^/_matrix/client/(api/v1|r0|v3|unstable)/profile/
  69. # Device requests
  70. - ^/_matrix/client/(r0|v3|unstable)/sendToDevice/
  71. # Account data requests
  72. - ^/_matrix/client/(r0|v3|unstable)/.*/tags
  73. - ^/_matrix/client/(r0|v3|unstable)/.*/account_data
  74. # Receipts requests
  75. - ^/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt
  76. - ^/_matrix/client/(r0|v3|unstable)/rooms/.*/read_markers
  77. # Presence requests
  78. - ^/_matrix/client/(api/v1|r0|v3|unstable)/presence/
  79. # Additionally, the following REST endpoints can be handled for GET requests:
  80. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  81. # ^/_matrix/federation/v1/groups/
  82. # ^/_matrix/client/(api/v1|r0|v3|unstable)/pushrules/
  83. # ^/_matrix/client/(r0|v3|unstable)/groups/
  84. # Pagination requests can also be handled, but all requests for a given
  85. # room must be routed to the same instance. Additionally, care must be taken to
  86. # ensure that the purge history admin API is not used while pagination requests
  87. # for the room are in flight:
  88. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  89. # ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/messages$
  90. # Additionally, the following endpoints should be included if Synapse is configured
  91. # to use SSO (you only need to include the ones for whichever SSO provider you're
  92. # using):
  93. # for all SSO providers
  94. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  95. # ^/_matrix/client/(api/v1|r0|v3|unstable)/login/sso/redirect
  96. # ^/_synapse/client/pick_idp$
  97. # ^/_synapse/client/pick_username
  98. # ^/_synapse/client/new_user_consent$
  99. # ^/_synapse/client/sso_register$
  100. # OpenID Connect requests.
  101. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  102. # ^/_synapse/client/oidc/callback$
  103. # SAML requests.
  104. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  105. # ^/_synapse/client/saml2/authn_response$
  106. # CAS requests.
  107. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  108. # ^/_matrix/client/(api/v1|r0|v3|unstable)/login/cas/ticket$
  109. # Ensure that all SSO logins go to a single process.
  110. # For multiple workers not handling the SSO endpoints properly, see
  111. # [#7530](https://github.com/matrix-org/synapse/issues/7530) and
  112. # [#9427](https://github.com/matrix-org/synapse/issues/9427).
  113. # Note that a HTTP listener with `client` and `federation` resources must be
  114. # configured in the `worker_listeners` option in the worker config.
  115. # #### Load balancing
  116. # It is possible to run multiple instances of this worker app, with incoming requests
  117. # being load-balanced between them by the reverse-proxy. However, different endpoints
  118. # have different characteristics and so admins
  119. # may wish to run multiple groups of workers handling different endpoints so that
  120. # load balancing can be done in different ways.
  121. # For `/sync` and `/initialSync` requests it will be more efficient if all
  122. # requests from a particular user are routed to a single instance. Extracting a
  123. # user ID from the access token or `Authorization` header is currently left as an
  124. # exercise for the reader. Admins may additionally wish to separate out `/sync`
  125. # requests that have a `since` query parameter from those that don't (and
  126. # `/initialSync`), as requests that don't are known as "initial sync" that happens
  127. # when a user logs in on a new device and can be *very* resource intensive, so
  128. # isolating these requests will stop them from interfering with other users ongoing
  129. # syncs.
  130. # Federation and client requests can be balanced via simple round robin.
  131. # The inbound federation transaction request `^/_matrix/federation/v1/send/`
  132. # should be balanced by source IP so that transactions from the same remote server
  133. # go to the same process.
  134. # Registration/login requests can be handled separately purely to help ensure that
  135. # unexpected load doesn't affect new logins and sign ups.
  136. # Finally, event sending requests can be balanced by the room ID in the URI (or
  137. # the full URI, or even just round robin), the room ID is the path component after
  138. # `/rooms/`. If there is a large bridge connected that is sending or may send lots
  139. # of events, then a dedicated set of workers can be provisioned to limit the
  140. # effects of bursts of events from that bridge on events sent by normal users.
  141. # #### Stream writers
  142. # Additionally, the writing of specific streams (such as events) can be moved off
  143. # of the main process to a particular worker.
  144. # (This is only supported with Redis-based replication.)
  145. # To enable this, the worker must have a HTTP replication listener configured,
  146. # have a `worker_name` and be listed in the `instance_map` config. The same worker
  147. # can handle multiple streams, but unless otherwise documented, each stream can only
  148. # have a single writer.
  149. # For example, to move event persistence off to a dedicated worker, the shared
  150. # configuration would include:
  151. # ```yaml
  152. # instance_map:
  153. # event_persister1:
  154. # host: localhost
  155. # port: 8034
  156. # stream_writers:
  157. # events: event_persister1
  158. # ```
  159. # An example for a stream writer instance:
  160. # ```yaml
  161. # {{#include systemd-with-workers/workers/event_persister.yaml}}
  162. # ```
  163. # Some of the streams have associated endpoints which, for maximum efficiency, should
  164. # be routed to the workers handling that stream. See below for the currently supported
  165. # streams and the endpoints associated with them:
  166. # ##### The `events` stream
  167. # The `events` stream experimentally supports having multiple writers, where work
  168. # is sharded between them by room ID. Note that you *must* restart all worker
  169. # instances when adding or removing event persisters. An example `stream_writers`
  170. # configuration with multiple writers:
  171. # ```yaml
  172. # stream_writers:
  173. # events:
  174. # - event_persister1
  175. # - event_persister2
  176. # ```
  177. # ##### The `typing` stream
  178. # The following endpoints should be routed directly to the worker configured as
  179. # the stream writer for the `typing` stream:
  180. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  181. # ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/typing
  182. # ##### The `to_device` stream
  183. # The following endpoints should be routed directly to the worker configured as
  184. # the stream writer for the `to_device` stream:
  185. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  186. # ^/_matrix/client/(r0|v3|unstable)/sendToDevice/
  187. # ##### The `account_data` stream
  188. # The following endpoints should be routed directly to the worker configured as
  189. # the stream writer for the `account_data` stream:
  190. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  191. # ^/_matrix/client/(r0|v3|unstable)/.*/tags
  192. # ^/_matrix/client/(r0|v3|unstable)/.*/account_data
  193. # ##### The `receipts` stream
  194. # The following endpoints should be routed directly to the worker configured as
  195. # the stream writer for the `receipts` stream:
  196. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  197. # ^/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt
  198. # ^/_matrix/client/(r0|v3|unstable)/rooms/.*/read_markers
  199. # ##### The `presence` stream
  200. # The following endpoints should be routed directly to the worker configured as
  201. # the stream writer for the `presence` stream:
  202. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  203. # ^/_matrix/client/(api/v1|r0|v3|unstable)/presence/
  204. # #### Background tasks
  205. # There is also support for moving background tasks to a separate
  206. # worker. Background tasks are run periodically or started via replication. Exactly
  207. # which tasks are configured to run depends on your Synapse configuration (e.g. if
  208. # stats is enabled).
  209. # To enable this, the worker must have a `worker_name` and can be configured to run
  210. # background tasks. For example, to move background tasks to a dedicated worker,
  211. # the shared configuration would include:
  212. # ```yaml
  213. # run_background_tasks_on: background_worker
  214. # ```
  215. # You might also wish to investigate the `update_user_directory` and
  216. # `media_instance_running_background_jobs` settings.
  217. # An example for a dedicated background worker instance:
  218. # ```yaml
  219. # {{#include systemd-with-workers/workers/background_worker.yaml}}
  220. # ```
  221. # pusher worker (no API endpoints) [
  222. # Handles sending push notifications to sygnal and email. Doesn't handle any
  223. # REST endpoints itself, but you should set `start_pushers: False` in the
  224. # shared configuration file to stop the main synapse sending push notifications.
  225. # To run multiple instances at once the `pusher_instances` option should list all
  226. # pusher instances by their worker name, e.g.:
  227. # ```yaml
  228. # pusher_instances:
  229. # - pusher_worker1
  230. # - pusher_worker2
  231. # ```
  232. # ]
  233. # appservice worker (no API endpoints) [
  234. # Handles sending output traffic to Application Services. Doesn't handle any
  235. # REST endpoints itself, but you should set `notify_appservices: False` in the
  236. # shared configuration file to stop the main synapse sending appservice notifications.
  237. # Note this worker cannot be load-balanced: only one instance should be active.
  238. # ]
  239. # federation_sender worker (no API endpoints) [
  240. # Handles sending federation traffic to other servers. Doesn't handle any
  241. # REST endpoints itself, but you should set `send_federation: False` in the
  242. # shared configuration file to stop the main synapse sending this traffic.
  243. # If running multiple federation senders then you must list each
  244. # instance in the `federation_sender_instances` option by their `worker_name`.
  245. # All instances must be stopped and started when adding or removing instances.
  246. # For example:
  247. # ```yaml
  248. # federation_sender_instances:
  249. # - federation_sender1
  250. # - federation_sender2
  251. # ```
  252. # ]
  253. matrix_synapse_workers_media_repository_endpoints:
  254. # Handles the media repository. It can handle all endpoints starting with:
  255. - ^/_matrix/media/
  256. # ... and the following regular expressions matching media-specific administration APIs:
  257. - ^/_synapse/admin/v1/purge_media_cache$
  258. - ^/_synapse/admin/v1/room/.*/media.*$
  259. - ^/_synapse/admin/v1/user/.*/media.*$
  260. - ^/_synapse/admin/v1/media/.*$
  261. - ^/_synapse/admin/v1/quarantine_media/.*$
  262. - ^/_synapse/admin/v1/users/.*/media$
  263. # You should also set `enable_media_repo: False` in the shared configuration
  264. # file to stop the main synapse running background jobs related to managing the
  265. # media repository. Note that doing so will prevent the main process from being
  266. # able to handle the above endpoints.
  267. # In the `media_repository` worker configuration file, configure the http listener to
  268. # expose the `media` resource. For example:
  269. # ```yaml
  270. # worker_listeners:
  271. # - type: http
  272. # port: 8085
  273. # resources:
  274. # - names:
  275. # - media
  276. # ```
  277. # Note that if running multiple media repositories they must be on the same server
  278. # and you must configure a single instance to run the background tasks, e.g.:
  279. # ```yaml
  280. # media_instance_running_background_jobs: "media-repository-1"
  281. # ```
  282. # Note that if a reverse proxy is used , then `/_matrix/media/` must be routed for both inbound client and federation requests (if they are handled separately).
  283. matrix_synapse_workers_user_dir_endpoints:
  284. # Handles searches in the user directory. It can handle REST endpoints matching
  285. # the following regular expressions:
  286. - ^/_matrix/client/(r0|v3|unstable)/user_directory/search$
  287. # When using this worker you must also set `update_user_directory: false` in the
  288. # shared configuration file to stop the main synapse running background
  289. # jobs related to updating the user directory.
  290. # Above endpoint is not *required* to be routed to this worker. By default,
  291. # `update_user_directory` is set to `true`, which means the main process
  292. # will handle updates. All workers configured with `client` can handle the above
  293. # endpoint as long as either this worker or the main process are configured to
  294. # handle it, and are online.
  295. # If `update_user_directory` is set to `false`, and this worker is not running,
  296. # the above endpoint may give outdated results.
  297. matrix_synapse_workers_frontend_proxy_endpoints:
  298. # Proxies some frequently-requested client endpoints to add caching and remove
  299. # load from the main synapse. It can handle REST endpoints matching the following
  300. # regular expressions:
  301. - ^/_matrix/client/(r0|v3|unstable)/keys/upload
  302. # If `use_presence` is False in the homeserver config, it can also handle REST
  303. # endpoints matching the following regular expressions:
  304. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  305. # ^/_matrix/client/(api/v1|r0|v3|unstable)/presence/[^/]+/status
  306. # This "stub" presence handler will pass through `GET` request but make the
  307. # `PUT` effectively a no-op.
  308. # It will proxy any requests it cannot handle to the main synapse instance. It
  309. # must therefore be configured with the location of the main instance, via
  310. # the `worker_main_http_uri` setting in the `frontend_proxy` worker configuration
  311. # file. For example:
  312. # ```yaml
  313. # worker_main_http_uri: http://127.0.0.1:8008
  314. # ```
  315. matrix_synapse_workers_avail_list:
  316. - appservice
  317. - federation_sender
  318. - frontend_proxy
  319. - generic_worker
  320. - media_repository
  321. - pusher
  322. - user_dir