Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add sample worker files for pusher and federation_sender #14077

Merged
merged 2 commits into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/14077.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add sample worker files for `pusher` and `federation_sender`.
8 changes: 8 additions & 0 deletions docs/systemd-with-workers/workers/federation_sender.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
worker_app: synapse.app.federation_sender
worker_name: federation_sender1

# The replication listener on the main synapse process.
worker_replication_host: 127.0.0.1
worker_replication_http_port: 9093

worker_log_config: /etc/matrix-synapse/federation-sender-log.yaml
Comment on lines +1 to +8
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my environment, this configuration is running.

In #12737 was added a config with an undocumented replication listener.

worker_app: synapse.app.federation_sender
worker_name: synapse-federation-sender-1
# The replication listener on the main synapse process.
worker_replication_host: synapse
worker_replication_http_port: 9093
worker_listeners:
- type: http
port: 8034
resources:
- names: [replication]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the replication listener in #12737 is unnecessary. The list of federation senders is stored in WorkerConfig.federation_shard_config, and nothing seems to send out replication requests based off of it.

8 changes: 8 additions & 0 deletions docs/systemd-with-workers/workers/pusher_worker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
worker_app: synapse.app.pusher
worker_name: pusher_worker1

# The replication listener on the main synapse process.
worker_replication_host: 127.0.0.1
worker_replication_http_port: 9093

worker_log_config: /etc/matrix-synapse/pusher-worker-log.yaml
12 changes: 12 additions & 0 deletions docs/workers.md
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,12 @@ pusher_instances:
- pusher_worker2
```

An example for a pusher instance:

```yaml
{{#include systemd-with-workers/workers/pusher_worker.yaml}}
```


### `synapse.app.appservice`

Expand Down Expand Up @@ -518,6 +524,12 @@ federation_sender_instances:
- federation_sender2
```

An example for a federation sender instance:

```yaml
{{#include systemd-with-workers/workers/federation_sender.yaml}}
```

### `synapse.app.media_repository`

Handles the media repository. It can handle all endpoints starting with:
Expand Down