Update workers docs

This commit is contained in:
Erik Johnston 2017-04-11 16:19:52 +01:00
parent 85a0d6c7ab
commit 323634bf8b

View File

@ -12,7 +12,7 @@ across multiple processes is a recipe for disaster, plus you should be using
postgres anyway if you care about scalability). postgres anyway if you care about scalability).
The workers communicate with the master synapse process via a synapse-specific The workers communicate with the master synapse process via a synapse-specific
HTTP protocol called 'replication' - analogous to MySQL or Postgres style TCP protocol called 'replication' - analogous to MySQL or Postgres style
database replication; feeding a stream of relevant data to the workers so they database replication; feeding a stream of relevant data to the workers so they
can be kept in sync with the main synapse process and database state. can be kept in sync with the main synapse process and database state.
@ -21,16 +21,11 @@ To enable workers, you need to add a replication listener to the master synapse,
listeners: listeners:
- port: 9092 - port: 9092
bind_address: '127.0.0.1' bind_address: '127.0.0.1'
type: http type: replication
tls: false
x_forwarded: false
resources:
- names: [replication]
compress: false
Under **no circumstances** should this replication API listener be exposed to the Under **no circumstances** should this replication API listener be exposed to the
public internet; it currently implements no authentication whatsoever and is public internet; it currently implements no authentication whatsoever and is
unencrypted HTTP. unencrypted.
You then create a set of configs for the various worker processes. These should be You then create a set of configs for the various worker processes. These should be
worker configuration files should be stored in a dedicated subdirectory, to allow worker configuration files should be stored in a dedicated subdirectory, to allow
@ -57,7 +52,8 @@ For instance::
worker_app: synapse.app.synchrotron worker_app: synapse.app.synchrotron
# The replication listener on the synapse to talk to. # The replication listener on the synapse to talk to.
worker_replication_url: http://127.0.0.1:9092/_synapse/replication worker_replication_host: 127.0.0.1
worker_replication_port: 9092
worker_listeners: worker_listeners:
- type: http - type: http
@ -95,4 +91,3 @@ To manipulate a specific worker, you pass the -w option to synctl::
All of the above is highly experimental and subject to change as Synapse evolves, All of the above is highly experimental and subject to change as Synapse evolves,
but documenting it here to help folks needing highly scalable Synapses similar but documenting it here to help folks needing highly scalable Synapses similar
to the one running matrix.org! to the one running matrix.org!