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

Commit

Permalink
Merge commit 'a9631b7b4' into anoa/dinsic_release_1_18_x
Browse files Browse the repository at this point in the history
* commit 'a9631b7b4':
  1.18.0
  Update worker docs with recent enhancements  (#7969)
  • Loading branch information
anoadragon453 committed Aug 4, 2020
2 parents b7c5713 + a9631b7 commit 0b2c404
Show file tree
Hide file tree
Showing 16 changed files with 428 additions and 236 deletions.
9 changes: 9 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
Synapse 1.18.0 (2020-07-30)
===========================

Improved Documentation
----------------------

- Update worker docs with latest enhancements. ([\#7969](https://github.com/matrix-org/synapse/issues/7969))


Synapse 1.18.0rc2 (2020-07-28)
==============================

Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
matrix-synapse-py3 (1.18.0) stable; urgency=medium

* New synapse release 1.18.0.

-- Synapse Packaging team <packages@matrix.org> Thu, 30 Jul 2020 10:55:53 +0100

matrix-synapse-py3 (1.17.0) stable; urgency=medium

* New synapse release 1.17.0.
Expand Down
54 changes: 54 additions & 0 deletions docs/sample_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2578,3 +2578,57 @@ opentracing:
#
# logging:
# false


## Workers ##

# Disables sending of outbound federation transactions on the main process.
# Uncomment if using a federation sender worker.
#
#send_federation: false

# It is possible to run multiple federation sender workers, in which case the
# work is balanced across them.
#
# This configuration must be shared between all federation sender workers, and if
# changed all federation sender workers must be stopped at the same time and then
# started, to ensure that all instances are running with the same config (otherwise
# events may be dropped).
#
#federation_sender_instances:
# - federation_sender1

# When using workers this should be a map from `worker_name` to the
# HTTP replication listener of the worker, if configured.
#
#instance_map:
# worker1:
# host: localhost
# port: 8034

# Experimental: When using workers you can define which workers should
# handle event persistence and typing notifications. Any worker
# specified here must also be in the `instance_map`.
#
#stream_writers:
# events: worker1
# typing: worker1


# Configuration for Redis when using workers. This *must* be enabled when
# using workers (unless using old style direct TCP configuration).
#
redis:
# Uncomment the below to enable Redis support.
#
#enabled: true

# Optional host and port to use to connect to redis. Defaults to
# localhost and 6379
#
#host: localhost
#port: 6379

# Optional password if configured on the Redis instance
#
#password: <secret_password>
32 changes: 32 additions & 0 deletions docs/synctl_workers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
### Using synctl with workers

If you want to use `synctl` to manage your synapse processes, you will need to
create an an additional configuration file for the main synapse process. That
configuration should look like this:

```yaml
worker_app: synapse.app.homeserver
```
Additionally, each worker app must be configured with the name of a "pid file",
to which it will write its process ID when it starts. For example, for a
synchrotron, you might write:
```yaml
worker_pid_file: /home/matrix/synapse/worker1.pid
```
Finally, to actually run your worker-based synapse, you must pass synctl the `-a`
commandline option to tell it to operate on all the worker configurations found
in the given directory, e.g.:

synctl -a $CONFIG/workers start

Currently one should always restart all workers when restarting or upgrading
synapse, unless you explicitly know it's safe not to. For instance, restarting
synapse without restarting all the synchrotrons may result in broken typing
notifications.

To manipulate a specific worker, you pass the -w option to synctl:

synctl -w $CONFIG/workers/worker1.yaml restart
Loading

0 comments on commit 0b2c404

Please sign in to comment.