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

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