forked from Fediversity/Fediversity
65 lines
1.7 KiB
Plaintext
65 lines
1.7 KiB
Plaintext
|
## Temporary block
|
||
|
|
||
|
We're going to configure a few different workers:
|
||
|
|
||
|
* client-sync
|
||
|
* roomworker
|
||
|
* federation-sender
|
||
|
* mediaworker
|
||
|
|
||
|
|
||
|
### Client-sync
|
||
|
|
||
|
This type needs both an inbound socket to receive stuff from nginx, and a
|
||
|
replication socket to communicate with the rest. We probably want a few of
|
||
|
these workers. The configuration should look like this:
|
||
|
|
||
|
```
|
||
|
worker_app: "synapse.app.generic_worker" # Always this unless
|
||
|
"synapse.app.media_repository"
|
||
|
worker_name: "clientsync1" # Name of worker specified in instance map
|
||
|
worker_log_config: "/data/log.config/client_sync.log.config" # Log config file
|
||
|
|
||
|
worker_listeners:
|
||
|
# Include for any worker in the instance map above:
|
||
|
- path: "/run/matrix-synapse/replication_clientsync1.sock"
|
||
|
type: http
|
||
|
resources:
|
||
|
- names: [replication]
|
||
|
compress: false
|
||
|
# Include for any worker that receives requests in Nginx:
|
||
|
- path: "/run/matrix-synapse/synapse_inbound_client_sync1.sock"
|
||
|
type: http
|
||
|
x_forwarded: true # Trust the X-Forwarded-For header from Nginx
|
||
|
resources:
|
||
|
- names:
|
||
|
- client
|
||
|
- consent
|
||
|
```
|
||
|
|
||
|
### Roomworker
|
||
|
|
||
|
These don't need a replication socket as they're not in the instance map, but
|
||
|
they do need an inboud socket for nginx to pass stuff to them. We want a few
|
||
|
of these workers, we may even configure a worker for one specific busy room...
|
||
|
|
||
|
Configuration should look like this:
|
||
|
|
||
|
```
|
||
|
worker_app: "synapse.app.generic_worker"
|
||
|
worker_name: "roomworker1"
|
||
|
worker_log_config: "/data/log.config/rooms.log.config"
|
||
|
|
||
|
worker_listeners:
|
||
|
- path: "/run/matrix-synapse/inbound_roomworker1.sock"
|
||
|
type: http
|
||
|
x_forwarded: true
|
||
|
resources:
|
||
|
- names:
|
||
|
- client
|
||
|
- consent
|
||
|
- federation
|
||
|
compress: false
|
||
|
```
|
||
|
|