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

Docker: Variable for which worker(s) to run #3338

Closed
turt2live opened this issue Jun 4, 2018 · 3 comments
Closed

Docker: Variable for which worker(s) to run #3338

turt2live opened this issue Jun 4, 2018 · 3 comments
Assignees
Labels
A-Docker Docker images, or making it easier to run Synapse in a container. z-feature (Deprecated Label) z-p2 (Deprecated Label)

Comments

@turt2live
Copy link
Member

Use case: Automatically scaling the parts of synapse that can be scaled, such as the event creator and synchrotrons. It would be desirable in this situation to have 1 worker per container.

@neilisfragile neilisfragile added z-p2 (Deprecated Label) z-feature (Deprecated Label) labels Jun 7, 2018
@jfrederickson
Copy link

What do you think about this?

  • A toggle var like SYNAPSE_ENABLE_REPLICATION to enable/disable the replication interface
  • SYNAPSE_REPLICATION_BIND_ADDRESS defaulting to 127.0.0.1 (Does this even make sense in the context of Docker? I'm not sure... in Kubernetes you might bind to localhost and run all workers in one pod, or use NetworkPolicies to restrict access.)
  • SYNAPSE_TCP_REPLICATION_PORT defaulting to 9092
  • SYNAPSE_HTTP_REPLICATION_PORT defaulting to 9093

And then for the actual worker configs... does it make sense to try and template them out, or would it be better to just expect them to live in a directory somewhere? The former sounds simpler for administrators to deal with, but I don't know how stable those configs are.

@turt2live
Copy link
Member Author

Something like that makes sense, although I did find that with worker setups the config generally becomes more complicated anyways. In the end I actually worked around the issue: https://github.com/t2bot/docker-synapse-worker

@richvdh richvdh added the A-Docker Docker images, or making it easier to run Synapse in a container. label Jun 19, 2019
@richvdh
Copy link
Member

richvdh commented Jun 25, 2019

As per #5518, we're going to recommend people configure this in a proper config file, as maintaining environment variables for every option is getting unwieldy, hard to maintain, and harder to write documentation for.

@richvdh richvdh closed this as completed Jun 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Docker Docker images, or making it easier to run Synapse in a container. z-feature (Deprecated Label) z-p2 (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

5 participants