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

Expand and improve workers documentation and example configuration #9072

Open

Description

@ShadowJonathan

A general call;

  • Add more documentation surrounding workers (just in general)
  • Add example configuration file (a-la sample_config.yaml) for each worker type, or for all workers in one
  • Add docker-compose file that includes ready-to-work example for synapse workers

Imo: Currently i think workers are very hard to set up or figure out on its own, because knowledge of it is mostly limited to large setups, and thus that knowledge is never reflected in documentation, or workers seen as an asset to be documented with the same priority.

Activity

  1. changed the title [-]Expand and improve workers documentation, add example configuration for each + docker-compose configuration[/-] [+]Expand and improve workers documentation and example configuration[/+] on Jan 11, 2021
  2. clokep commented on Jan 12, 2021

    @clokep
    Member

    Add more documentation surrounding workers (just in general)

    Is there specific information that you think is missing? the workers docs were recently expanded to include a bit more information.

    Add example configuration file (a-la sample_config.yaml) for each worker type, or for all workers in one

    I think this is pretty much #8557.

    Add docker-compose file that includes ready-to-work example for synapse workers

    The current docker-compose stuff is under contrib, so I unfortunately this will probably need to be provided via a contribution. 😄

  3. ShadowJonathan commented on Jan 12, 2021

    @ShadowJonathan
    ContributorAuthor

    @clokep why was info-needed added here, i thought i was pretty clear; improve workers documentation and add samples, for the first one there's already an issue (good, cuz then i can track that via here), and for the second one i havent seen a thing (with issue or PR), or should that issue be added to another repo?

  4. clokep commented on Jan 12, 2021

    @clokep
    Member

    @ShadowJonathan The bit that is unclear to me is:

    Add more documentation surrounding workers (just in general)

    Is there specific information that you think is missing? the workers docs were recently expanded to include a bit more information.

    What information do you feel is missing?

  5. ShadowJonathan commented on Jan 12, 2021

    @ShadowJonathan
    ContributorAuthor

    Oh, that part is a general call for a look at the documentation, but i'm not holding it for a requirement (thus the absence of checkmark), its generally just "hey, please give a look at the documentation for workers and judge if everything you know about setting up and configuring workers is in there" request, should i remove it to avoid confusion?

  6. richvdh commented on Feb 11, 2021

    @richvdh
    Member

    we certainly need better documentation for how to run workers under docker

  7. added
    S-MinorBlocks non-critical functionality, workarounds exist.
    T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
    A-Docsthings relating to the documentation
    and removed on Feb 11, 2021
  8. TheDiscordian commented on Apr 8, 2021

    @TheDiscordian

    I was asked to drop my opinion in here while we were discussing this issue in chat:

    There's a lot of info on types of workers, and little on how to redirect queries from a reverse proxy to the workers effectively. I know it sounds simple to say "just run a worker per CPU", but I didn't find my experience to feel quite so clear-cut.

    Put simply, an example showing how to run a server with 4+ cores, using Nginx as a reverse proxy, with an appropriate worker setup / Nginx config would go a long way I think.

  9. ShadowJonathan commented on Apr 8, 2021

    @ShadowJonathan
    ContributorAuthor

    Extra thoughts;

    • docker-compose sample
    • full setup sample config
  10. pgeier commented on Apr 8, 2021

    @pgeier

    The Loadbalancing Section is a little bit confusing.
    Is there loadbalancing by default? I read that it is customizable to redirect same users to same nodes, or specific rooms to same nodes.
    However is this already working by default, how can I configure it?

    At least it should be statet that i need to bring my own load balancer.

  11. pgeier commented on Apr 8, 2021

    @pgeier

    the main issue I found with the worker docs is they do describe what to do, but not quite how to get there, ie; the keys are noted but not really the surrounding config for context

    ... asked by @jwh:covert.tel from the discourse on #synapse:matrix.org

  12. pgeier commented on Apr 9, 2021

    @pgeier

    Maybe reference existing helm charts for Kubernetes?

    Thes deprecated repo (https://github.com/ananace/matrix-synapse) references

    https://gitlab.com/ananace/charts (espacially https://gitlab.com/ananace/charts/-/tree/master/charts/matrix-synapse up to date!)
    and
    https://github.com/dacruz21/matrix-chart/

    At least concerning "large deployments", concrete kubernetes images are very helpful - at least to mention their existence

    EDIT: Within the INSTALL.md some docker images and ansible... but these seem to focus on single process instances - multiple workers/processes are not even mentioned here yet

  13. added
    A-WorkersProblems related to running Synapse in Worker Mode (or replication)
    on Mar 2, 2022
  14. dklimpel commented on Apr 12, 2022

    @dklimpel
    Contributor

    I have found some more issues with worker docs:

    1. Is the TCP replication up to date? Is this part of the redis replication or the old TCP replication? -> Remove old-style (direct) TCP replication support #11728
    2. There are more streams than documented. Or are they not all usable in worker?
    • presence_federation
    • pushers
    • presence
    • caches
    • to_device
    • receipts
    • groups
    • push_rules
    • user_signature
    • account_data
    • tag_account_data
    • typing
    • device_lists
    1. The example uses a deprecated worker type federation_reader -> systemd-with-workers talks about federation_reader, which is undocumented #8740
      worker_app: synapse.app.federation_reader
    2. The diagram does not show a connection from Event Persister to main process. But the stream writer for events is a generic_worker and starts only with a connection (worker_replication_host) to main proccess

    image

    1. frontend_proxy worker claims it forwards requests to the main process, but it doesn't #3717
  15. Thumbscrew commented on May 14, 2022

    @Thumbscrew
    Contributor

    I've raised PR #12737 with some fairly detailed instructions for using Docker Compose to create workers. Please feel free to provide feedback and let me know if this is helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Docsthings relating to the documentationA-WorkersProblems related to running Synapse in Worker Mode (or replication)S-MinorBlocks non-critical functionality, workarounds exist.T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions