howto_deploy_synapse_with_multiple_workers

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
howto_deploy_synapse_with_multiple_workers [2022/03/17 09:08] – [Scope] homerhowto_deploy_synapse_with_multiple_workers [2023/05/24 22:16] (aktuell) – [Log config] homer
Zeile 1: Zeile 1:
 <markdown> <markdown>
 # HowTo Deploy Synapse with Multiple Workers using docker-compose # HowTo Deploy Synapse with Multiple Workers using docker-compose
 +## Status: Working Again (25th of May 2023)
 +The update to v1.84.0 broke my setup today. The [Upgrade-Info](https://github.com/matrix-org/synapse/blob/release-v1.84/docs/upgrade.md#upgrading-to-v1840) noticed me that there have been some changes in the configuration I missed and so I had to adapt some things in both the shared homeserver.yaml and the worker configs. So the example files beyond won't work with synapse versions before the v1.84.0 release.
 +
 ## Status: Finally working!!! (1st of March 2022) ## Status: Finally working!!! (1st of March 2022)
 I can finally announce a working docker-compose setup with 2 workers for [Matrix-Synapse](https://matrix-org.github.io/synapse/latest/welcome_and_overview.html)! I can finally announce a working docker-compose setup with 2 workers for [Matrix-Synapse](https://matrix-org.github.io/synapse/latest/welcome_and_overview.html)!
Zeile 248: Zeile 251:
 ```  ``` 
 worker_app: synapse.app.generic_worker worker_app: synapse.app.generic_worker
-worker_name: worker1 +worker_name: generic_worker1 
-worker_replication_host: matrix-synapse       # Again: Also here it's important to use the container_name +
-worker_replication_http_port: 9093+
 worker_listeners: worker_listeners:
   - type: http   - type: http
     port: 8084     port: 8084
     resources:     resources:
-      - names: +      - names: [client] 
-        client+  type: http 
 +    port: 9094 
 +    resources: 
 +      - names: [replication] 
 + 
 +send_federation: true 
 worker_log_config: /data/workers/logs/Worker1_log_config.yaml     # if you like to have a seperate log for each worker you will need this config. But I understand that you can also use the already existing config of your main synapse process. worker_log_config: /data/workers/logs/Worker1_log_config.yaml     # if you like to have a seperate log for each worker you will need this config. But I understand that you can also use the already existing config of your main synapse process.
 ``` ```
Zeile 264: Zeile 272:
 ``` ```
 worker_app: synapse.app.generic_worker worker_app: synapse.app.generic_worker
-worker_name: worker2 +worker_name: generic_worker2 
-worker_replication_host: matrix-synapse +
-worker_replication_http_port: 9093+
 worker_listeners: worker_listeners:
   - type: http   - type: http
     port: 8083     port: 8083
     resources:     resources:
-      - names: +      - names: [federation] 
-        federation+  type: http 
 +    port: 9092 
 +    resources: 
 +      - names: [replication] 
 + 
 +send_federation: true
  
 worker_log_config: /data/workers/logs/Worker2_log_config.yaml worker_log_config: /data/workers/logs/Worker2_log_config.yaml
Zeile 283: Zeile 295:
 formatters: formatters:
   precise:   precise:
-   format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s- $+   format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s- $'
  
 filters: filters:
Zeile 364: Zeile 376:
 # Worker # Worker
 worker_replication_secret: "some long and super secret password you don't need to memorize or copy because main and workers share it already" worker_replication_secret: "some long and super secret password you don't need to memorize or copy because main and workers share it already"
 +
 +# The following block was added to be compatible with v1.84.0 which broke my former config on the 24th of May 2023. Check also the Worker configs above!
 +instance_map:
 +  main:
 +    host: matrix-synapse
 +    port: 9093
 +    tls: false
 +  generic_worker2:
 +    host: matrix-federation
 +    port: 9092
 +    tls: false
 +  generic_worker1:
 +    host: matrix-client
 +    port: 9094
 +    tls: false
 +
 +
 redis: redis:
   enabled: true   enabled: true
  • howto_deploy_synapse_with_multiple_workers.1647504486.txt.gz
  • Zuletzt geändert: 2022/03/17 09:08
  • von homer