Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

310 řádky
12 KiB

  1. ---
  2. matrix_synapse_workers_generic_worker_endpoints:
  3. # This worker can handle API requests matching the following regular
  4. # expressions:
  5. # Sync requests
  6. - ^/_matrix/client/(v2_alpha|r0)/sync$
  7. - ^/_matrix/client/(api/v1|v2_alpha|r0)/events$
  8. - ^/_matrix/client/(api/v1|r0)/initialSync$
  9. - ^/_matrix/client/(api/v1|r0)/rooms/[^/]+/initialSync$
  10. # Federation requests
  11. - ^/_matrix/federation/v1/event/
  12. - ^/_matrix/federation/v1/state/
  13. - ^/_matrix/federation/v1/state_ids/
  14. - ^/_matrix/federation/v1/backfill/
  15. - ^/_matrix/federation/v1/get_missing_events/
  16. - ^/_matrix/federation/v1/publicRooms
  17. - ^/_matrix/federation/v1/query/
  18. - ^/_matrix/federation/v1/make_join/
  19. - ^/_matrix/federation/v1/make_leave/
  20. - ^/_matrix/federation/v1/send_join/
  21. - ^/_matrix/federation/v2/send_join/
  22. - ^/_matrix/federation/v1/send_leave/
  23. - ^/_matrix/federation/v2/send_leave/
  24. - ^/_matrix/federation/v1/invite/
  25. - ^/_matrix/federation/v2/invite/
  26. - ^/_matrix/federation/v1/query_auth/
  27. - ^/_matrix/federation/v1/event_auth/
  28. - ^/_matrix/federation/v1/exchange_third_party_invite/
  29. - ^/_matrix/federation/v1/user/devices/
  30. - ^/_matrix/federation/v1/get_groups_publicised$
  31. - ^/_matrix/key/v2/query
  32. # Inbound federation transaction request
  33. - ^/_matrix/federation/v1/send/
  34. # Client API requests
  35. - ^/_matrix/client/(api/v1|r0|unstable)/publicRooms$
  36. - ^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/joined_members$
  37. - ^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/context/.*$
  38. - ^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/members$
  39. - ^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/state$
  40. - ^/_matrix/client/(api/v1|r0|unstable)/account/3pid$
  41. - ^/_matrix/client/(api/v1|r0|unstable)/devices$
  42. - ^/_matrix/client/(api/v1|r0|unstable)/keys/query$
  43. - ^/_matrix/client/(api/v1|r0|unstable)/keys/changes$
  44. - ^/_matrix/client/versions$
  45. - ^/_matrix/client/(api/v1|r0|unstable)/voip/turnServer$
  46. - ^/_matrix/client/(api/v1|r0|unstable)/joined_groups$
  47. - ^/_matrix/client/(api/v1|r0|unstable)/publicised_groups$
  48. - ^/_matrix/client/(api/v1|r0|unstable)/publicised_groups/
  49. - ^/_synapse/client/password_reset/email/submit_token$
  50. # Registration/login requests
  51. - ^/_matrix/client/(api/v1|r0|unstable)/login$
  52. - ^/_matrix/client/(r0|unstable)/register$
  53. # FIXME: possible bug with SSO and multiple generic workers
  54. # see https://github.com/matrix-org/synapse/issues/7530
  55. # ^/_matrix/client/(r0|unstable)/auth/.*/fallback/web$
  56. # Event sending requests
  57. - ^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/redact
  58. - ^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/send
  59. - ^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/state/
  60. - ^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/(join|invite|leave|ban|unban|kick)$
  61. - ^/_matrix/client/(api/v1|r0|unstable)/join/
  62. - ^/_matrix/client/(api/v1|r0|unstable)/profile/
  63. # Additionally, the following REST endpoints can be handled for GET requests:
  64. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  65. # ^/_matrix/federation/v1/groups/
  66. # Pagination requests can also be handled, but all requests for a given
  67. # room must be routed to the same instance. Additionally, care must be taken to
  68. # ensure that the purge history admin API is not used while pagination requests
  69. # for the room are in flight:
  70. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  71. # ^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/messages$
  72. # Additionally, the following endpoints should be included if Synapse is configured
  73. # to use SSO (you only need to include the ones for whichever SSO provider you're
  74. # using):
  75. # OpenID Connect requests.
  76. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  77. # ^/_matrix/client/(api/v1|r0|unstable)/login/sso/redirect$
  78. # ^/_synapse/oidc/callback$
  79. # SAML requests.
  80. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  81. # ^/_matrix/client/(api/v1|r0|unstable)/login/sso/redirect$
  82. # ^/_matrix/saml2/authn_response$
  83. # CAS requests.
  84. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  85. # ^/_matrix/client/(api/v1|r0|unstable)/login/(cas|sso)/redirect$
  86. # ^/_matrix/client/(api/v1|r0|unstable)/login/cas/ticket$
  87. # Note that a HTTP listener with `client` and `federation` resources must be
  88. # configured in the `worker_listeners` option in the worker config.
  89. # Ensure that all SSO logins go to a single process (usually the main process).
  90. # For multiple workers not handling the SSO endpoints properly, see
  91. # [#7530](https://github.com/matrix-org/synapse/issues/7530).
  92. # #### Load balancing
  93. # It is possible to run multiple instances of this worker app, with incoming requests
  94. # being load-balanced between them by the reverse-proxy. However, different endpoints
  95. # have different characteristics and so admins
  96. # may wish to run multiple groups of workers handling different endpoints so that
  97. # load balancing can be done in different ways.
  98. # For `/sync` and `/initialSync` requests it will be more efficient if all
  99. # requests from a particular user are routed to a single instance. Extracting a
  100. # user ID from the access token or `Authorization` header is currently left as an
  101. # exercise for the reader. Admins may additionally wish to separate out `/sync`
  102. # requests that have a `since` query parameter from those that don't (and
  103. # `/initialSync`), as requests that don't are known as "initial sync" that happens
  104. # when a user logs in on a new device and can be *very* resource intensive, so
  105. # isolating these requests will stop them from interfering with other users ongoing
  106. # syncs.
  107. # Federation and client requests can be balanced via simple round robin.
  108. # The inbound federation transaction request `^/_matrix/federation/v1/send/`
  109. # should be balanced by source IP so that transactions from the same remote server
  110. # go to the same process.
  111. # Registration/login requests can be handled separately purely to help ensure that
  112. # unexpected load doesn't affect new logins and sign ups.
  113. # Finally, event sending requests can be balanced by the room ID in the URI (or
  114. # the full URI, or even just round robin), the room ID is the path component after
  115. # `/rooms/`. If there is a large bridge connected that is sending or may send lots
  116. # of events, then a dedicated set of workers can be provisioned to limit the
  117. # effects of bursts of events from that bridge on events sent by normal users.
  118. # #### Stream writers
  119. # Additionally, there is *experimental* support for moving writing of specific
  120. # streams (such as events) off of the main process to a particular worker. (This
  121. # is only supported with Redis-based replication.)
  122. # Currently supported streams are `events` and `typing`.
  123. # To enable this, the worker must have a HTTP replication listener configured,
  124. # have a `worker_name` and be listed in the `instance_map` config. For example to
  125. # move event persistence off to a dedicated worker, the shared configuration would
  126. # include:
  127. # ```yaml
  128. # instance_map:
  129. # event_persister1:
  130. # host: localhost
  131. # port: 8034
  132. # stream_writers:
  133. # events: event_persister1
  134. # ```
  135. # The `events` stream also experimentally supports having multiple writers, where
  136. # work is sharded between them by room ID. Note that you *must* restart all worker
  137. # instances when adding or removing event persisters. An example `stream_writers`
  138. # configuration with multiple writers:
  139. # ```yaml
  140. # stream_writers:
  141. # events:
  142. # - event_persister1
  143. # - event_persister2
  144. # ```
  145. # #### Background tasks
  146. # There is also *experimental* support for moving background tasks to a separate
  147. # worker. Background tasks are run periodically or started via replication. Exactly
  148. # which tasks are configured to run depends on your Synapse configuration (e.g. if
  149. # stats is enabled).
  150. # To enable this, the worker must have a `worker_name` and can be configured to run
  151. # background tasks. For example, to move background tasks to a dedicated worker,
  152. # the shared configuration would include:
  153. # ```yaml
  154. # run_background_tasks_on: background_worker
  155. # ```
  156. # You might also wish to investigate the `update_user_directory` and
  157. # `media_instance_running_background_jobs` settings.
  158. # pusher worker (no API endpoints) [
  159. # Handles sending push notifications to sygnal and email. Doesn't handle any
  160. # REST endpoints itself, but you should set `start_pushers: False` in the
  161. # shared configuration file to stop the main synapse sending push notifications.
  162. # Note this worker cannot be load-balanced: only one instance should be active.
  163. # ]
  164. # appservice worker (no API endpoints) [
  165. # Handles sending output traffic to Application Services. Doesn't handle any
  166. # REST endpoints itself, but you should set `notify_appservices: False` in the
  167. # shared configuration file to stop the main synapse sending appservice notifications.
  168. # Note this worker cannot be load-balanced: only one instance should be active.
  169. # ]
  170. # federation_sender worker (no API endpoints) [
  171. # Handles sending federation traffic to other servers. Doesn't handle any
  172. # REST endpoints itself, but you should set `send_federation: False` in the
  173. # shared configuration file to stop the main synapse sending this traffic.
  174. # If running multiple federation senders then you must list each
  175. # instance in the `federation_sender_instances` option by their `worker_name`.
  176. # All instances must be stopped and started when adding or removing instances.
  177. # For example:
  178. # ```yaml
  179. # federation_sender_instances:
  180. # - federation_sender1
  181. # - federation_sender2
  182. # ```
  183. # ]
  184. matrix_synapse_workers_media_repository_endpoints:
  185. # Handles the media repository. It can handle all endpoints starting with:
  186. - ^/_matrix/media/
  187. # ... and the following regular expressions matching media-specific administration APIs:
  188. - ^/_synapse/admin/v1/purge_media_cache$
  189. - ^/_synapse/admin/v1/room/.*/media.*$
  190. - ^/_synapse/admin/v1/user/.*/media.*$
  191. - ^/_synapse/admin/v1/media/.*$
  192. - ^/_synapse/admin/v1/quarantine_media/.*$
  193. # You should also set `enable_media_repo: False` in the shared configuration
  194. # file to stop the main synapse running background jobs related to managing the
  195. # media repository.
  196. # In the `media_repository` worker configuration file, configure the http listener to
  197. # expose the `media` resource. For example:
  198. # ```yaml
  199. # worker_listeners:
  200. # - type: http
  201. # port: 8085
  202. # resources:
  203. # - names:
  204. # - media
  205. # ```
  206. # Note that if running multiple media repositories they must be on the same server
  207. # and you must configure a single instance to run the background tasks, e.g.:
  208. # ```yaml
  209. # media_instance_running_background_jobs: "media-repository-1"
  210. # ```
  211. # 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).
  212. matrix_synapse_workers_user_dir_endpoints:
  213. # Handles searches in the user directory. It can handle REST endpoints matching
  214. # the following regular expressions:
  215. - ^/_matrix/client/(api/v1|r0|unstable)/user_directory/search$
  216. # When using this worker you must also set `update_user_directory: False` in the
  217. # shared configuration file to stop the main synapse running background
  218. # jobs related to updating the user directory.
  219. matrix_synapse_workers_frontend_proxy_endpoints:
  220. # Proxies some frequently-requested client endpoints to add caching and remove
  221. # load from the main synapse. It can handle REST endpoints matching the following
  222. # regular expressions:
  223. - ^/_matrix/client/(api/v1|r0|unstable)/keys/upload
  224. # If `use_presence` is False in the homeserver config, it can also handle REST
  225. # endpoints matching the following regular expressions:
  226. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  227. # ^/_matrix/client/(api/v1|r0|unstable)/presence/[^/]+/status
  228. # This "stub" presence handler will pass through `GET` request but make the
  229. # `PUT` effectively a no-op.
  230. # It will proxy any requests it cannot handle to the main synapse instance. It
  231. # must therefore be configured with the location of the main instance, via
  232. # the `worker_main_http_uri` setting in the `frontend_proxy` worker configuration
  233. # file. For example:
  234. # worker_main_http_uri: http://127.0.0.1:8008
  235. matrix_synapse_workers_avail_list:
  236. - appservice
  237. - federation_sender
  238. - frontend_proxy
  239. - generic_worker
  240. - media_repository
  241. - pusher
  242. - user_dir