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

Add a dockerfile for running a set of Synapse worker processes #9162

Merged
merged 44 commits into from
Apr 14, 2021

Commits on Jan 21, 2021

  1. Configuration menu
    Copy the full SHA
    31e9579 View commit details
    Browse the repository at this point in the history
  2. Prevent an empty resources: list if no listener_resources defined

    This was causing worker_listener blocks to get generated with
    Nonetype resources, crashing things. This was only a problem for
    worker types that don't have any configured resources.
    anoadragon453 committed Jan 21, 2021
    Configuration menu
    Copy the full SHA
    d61dc37 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3523080 View commit details
    Browse the repository at this point in the history
  4. Changelog

    anoadragon453 committed Jan 21, 2021
    Configuration menu
    Copy the full SHA
    e66f9e7 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2021

  1. Configuration menu
    Copy the full SHA
    2e3134b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f6571ee View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3f1b649 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2021

  1. Keep redis in foreground

    MatMaul committed Jan 23, 2021
    Configuration menu
    Copy the full SHA
    8b41fdf View commit details
    Browse the repository at this point in the history
  2. Reacts on keyboard signals

    MatMaul committed Jan 23, 2021
    Configuration menu
    Copy the full SHA
    2d6af88 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cb0b272 View commit details
    Browse the repository at this point in the history
  4. lint

    anoadragon453 committed Jan 23, 2021
    Configuration menu
    Copy the full SHA
    842dc50 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2021

  1. Axe healthcheck TODO

    anoadragon453 committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    31cac05 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2021

  1. Configuration menu
    Copy the full SHA
    fb40f20 View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2021

  1. Configuration menu
    Copy the full SHA
    e363197 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fb83854 View commit details
    Browse the repository at this point in the history
  3. Remove support for '*' to specify all workers

    If we're supporting multiple instances of individual worker types, then having
    a 'run all workers' mode doesn't make too much sense
    anoadragon453 committed Mar 3, 2021
    Configuration menu
    Copy the full SHA
    4779845 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2021

  1. Add support for sharded worker instances

    This required making the shared config a dictionary instead of a large str, so
    we could manipulate it easier. We do eventually convert it to a str before writing
    though of course.
    anoadragon453 committed Mar 4, 2021
    Configuration menu
    Copy the full SHA
    b265083 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e99007d View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2021

  1. Configuration menu
    Copy the full SHA
    48b7faf View commit details
    Browse the repository at this point in the history
  2. lint

    anoadragon453 committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    cc9d243 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2021

  1. Explicitly set worker listener resources

    The default was just an abstraction for not much gain. Instead we can
    just set them explicitly for each worker.
    
    This commit also fixes an issue with how we append to the instance map,
    and a log line substitution.
    anoadragon453 committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    04dd483 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    278579a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7f5a8ee View commit details
    Browse the repository at this point in the history
  4. Drop whitelist of shardable worker types.

    Synapse should enforce this, not us.
    anoadragon453 committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    609f1c1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f9d7e28 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3ae6108 View commit details
    Browse the repository at this point in the history
  7. Add load-balancing support; support sharding media_repo

    This required some changes to the way we handle our nginx config. It's
    now a dictionary instead of just a str. This was because endpoint
    mapping blocks would get duplicated when we configured multiple
    instances of the same worker. Now that the nginx config is organised by
    a map of endpoints to upstreams, those endpoints de-duplicate
    automatically.
    
    Speaking of upstreams, we now handle creating upstreams which load
    balance between processes. To route traffic to an upstream, you simply
    need to proxy_pass to its name. We use a separate dict to keep track of
    upstreams and where they point to. These upstreams do round-robin LBing.
    
    Note that we don't really want other load-balancing types for our tests. For instance,
    balancing by request IP makes no sense as the tests will be sending requests
    all the from the same IP.
    
    What we really want is for the load-balancing to be deterministic, which
    round-robin is (as long as the tests remain constant themselves).
    anoadragon453 committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    f39a25b View commit details
    Browse the repository at this point in the history
  8. Bail out from configure script if it is run multiple times

    Turns out Complement may run your ENTRYPOINT script multiple times - who
    knew!
    
    The script appends to config files, which can break things if the same
    content is appended twice (I only noticed this once we started adding
    upstreams to the nginx config. You can't have two upstreams with the
    same name - but apparently you can have two identical server blocks!)
    
    We could try to be clever and make the script work with being run
    multiple times, but that's a maintanence burden. I instead opted to just
    place a file down if the script had already been run, and refuse to run
    again if that file exists.
    anoadragon453 committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    21b3f22 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1711d34 View commit details
    Browse the repository at this point in the history
  10. Add env var SYNAPSE_WORKERS_WRITE_LOGS_TO_DISK

    Note that this environment variable only affects writing worker
    logs to disk, but it does not affects the main process's log config.
    anoadragon453 committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    c54801a View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2021

  1. Configuration menu
    Copy the full SHA
    0bd42a3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ea31dc8 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2021

  1. Clarify this is intended for testing purposes

    Co-authored-by: Erik Johnston <erik@matrix.org>
    anoadragon453 and erikjohnston committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    5a77614 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    69a6399 View commit details
    Browse the repository at this point in the history
  3. Apply suggestions from code review

    Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
    anoadragon453 and richvdh committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    e3fbd62 View commit details
    Browse the repository at this point in the history
  4. Update worker docker image name to matrixdotorg/synapse-workers

    Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
    anoadragon453 and richvdh committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    d844d97 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f218ae9 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a7666d1 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2021

  1. Configuration menu
    Copy the full SHA
    486d5d1 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2021

  1. Configuration menu
    Copy the full SHA
    e47b390 View commit details
    Browse the repository at this point in the history
  2. SYNAPSE_WORKERS -> SYNAPSE_WORKER_TYPES

    As we already have a SYNAPSE_WORKER env var.
    anoadragon453 committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    700c203 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2021

  1. Configuration menu
    Copy the full SHA
    314473f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    030b1f4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1a37f25 View commit details
    Browse the repository at this point in the history