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

Commit 0b2c404

Browse files
committed
Merge commit 'a9631b7b4' into anoa/dinsic_release_1_18_x
* commit 'a9631b7b4': 1.18.0 Update worker docs with recent enhancements (#7969)
2 parents b7c5713 + a9631b7 commit 0b2c404

File tree

16 files changed

+428
-236
lines changed

16 files changed

+428
-236
lines changed

CHANGES.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
Synapse 1.18.0 (2020-07-30)
2+
===========================
3+
4+
Improved Documentation
5+
----------------------
6+
7+
- Update worker docs with latest enhancements. ([\#7969](https://github.com/matrix-org/synapse/issues/7969))
8+
9+
110
Synapse 1.18.0rc2 (2020-07-28)
211
==============================
312

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
matrix-synapse-py3 (1.18.0) stable; urgency=medium
2+
3+
* New synapse release 1.18.0.
4+
5+
-- Synapse Packaging team <[email protected]> Thu, 30 Jul 2020 10:55:53 +0100
6+
17
matrix-synapse-py3 (1.17.0) stable; urgency=medium
28

39
* New synapse release 1.17.0.

docs/sample_config.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2578,3 +2578,57 @@ opentracing:
25782578
#
25792579
# logging:
25802580
# false
2581+
2582+
2583+
## Workers ##
2584+
2585+
# Disables sending of outbound federation transactions on the main process.
2586+
# Uncomment if using a federation sender worker.
2587+
#
2588+
#send_federation: false
2589+
2590+
# It is possible to run multiple federation sender workers, in which case the
2591+
# work is balanced across them.
2592+
#
2593+
# This configuration must be shared between all federation sender workers, and if
2594+
# changed all federation sender workers must be stopped at the same time and then
2595+
# started, to ensure that all instances are running with the same config (otherwise
2596+
# events may be dropped).
2597+
#
2598+
#federation_sender_instances:
2599+
# - federation_sender1
2600+
2601+
# When using workers this should be a map from `worker_name` to the
2602+
# HTTP replication listener of the worker, if configured.
2603+
#
2604+
#instance_map:
2605+
# worker1:
2606+
# host: localhost
2607+
# port: 8034
2608+
2609+
# Experimental: When using workers you can define which workers should
2610+
# handle event persistence and typing notifications. Any worker
2611+
# specified here must also be in the `instance_map`.
2612+
#
2613+
#stream_writers:
2614+
# events: worker1
2615+
# typing: worker1
2616+
2617+
2618+
# Configuration for Redis when using workers. This *must* be enabled when
2619+
# using workers (unless using old style direct TCP configuration).
2620+
#
2621+
redis:
2622+
# Uncomment the below to enable Redis support.
2623+
#
2624+
#enabled: true
2625+
2626+
# Optional host and port to use to connect to redis. Defaults to
2627+
# localhost and 6379
2628+
#
2629+
#host: localhost
2630+
#port: 6379
2631+
2632+
# Optional password if configured on the Redis instance
2633+
#
2634+
#password: <secret_password>

docs/synctl_workers.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
### Using synctl with workers
2+
3+
If you want to use `synctl` to manage your synapse processes, you will need to
4+
create an an additional configuration file for the main synapse process. That
5+
configuration should look like this:
6+
7+
```yaml
8+
worker_app: synapse.app.homeserver
9+
```
10+
11+
Additionally, each worker app must be configured with the name of a "pid file",
12+
to which it will write its process ID when it starts. For example, for a
13+
synchrotron, you might write:
14+
15+
```yaml
16+
worker_pid_file: /home/matrix/synapse/worker1.pid
17+
```
18+
19+
Finally, to actually run your worker-based synapse, you must pass synctl the `-a`
20+
commandline option to tell it to operate on all the worker configurations found
21+
in the given directory, e.g.:
22+
23+
synctl -a $CONFIG/workers start
24+
25+
Currently one should always restart all workers when restarting or upgrading
26+
synapse, unless you explicitly know it's safe not to. For instance, restarting
27+
synapse without restarting all the synchrotrons may result in broken typing
28+
notifications.
29+
30+
To manipulate a specific worker, you pass the -w option to synctl:
31+
32+
synctl -w $CONFIG/workers/worker1.yaml restart

0 commit comments

Comments
 (0)