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

we need to limit the concurrency of outgoing federation requests #5373

Open
richvdh opened this issue Jun 6, 2019 · 4 comments
Open

we need to limit the concurrency of outgoing federation requests #5373

richvdh opened this issue Jun 6, 2019 · 4 comments
Labels
A-Federation A-Performance Performance, both client-facing and admin-facing O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Major functionality / product severely impaired, no satisfactory workaround. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.

Comments

@richvdh
Copy link
Member

richvdh commented Jun 6, 2019

... or something. When you send a presence or typing update to all of the homeservers visible in #matrix or #synapse, we end up using well over 3G of memory just to manage all the connections. Sending all the updates at once is probably a mistake.

@richvdh
Copy link
Member Author

richvdh commented Jun 6, 2019

#5113 might help substantially with this too

@neilisfragile neilisfragile added A-Performance Performance, both client-facing and admin-facing z-p2 (Deprecated Label) labels Jun 10, 2019
@hawkowl hawkowl self-assigned this Jul 11, 2019
@hawkowl hawkowl added the z-outbound-federation-meltdown (Deprecated Label) Synapse melting down by trying to talk to too many servers label Jul 11, 2019
@neilisfragile neilisfragile added p1 and removed z-p2 (Deprecated Label) labels Sep 5, 2019
@richvdh
Copy link
Member Author

richvdh commented Mar 2, 2022

back in the day, @hawkowl wrote up some ideas for how to address this, in https://github.com/matrix-org/synapse/blob/hawkowl/fsb/docs/federation_side_bus.md.

@richvdh
Copy link
Member Author

richvdh commented Mar 2, 2022

(It's interesting to note that the above documentation suggests replacing Twisted's HTTP libraries with h11 and as such this might form part of #11777)

@reivilibre reivilibre added the T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. label Mar 2, 2022
@erikjohnston erikjohnston added this to the Server Density milestone Jul 25, 2022
@erikjohnston
Copy link
Member

erikjohnston commented Jul 25, 2022

One potential way of tackling this is to have a way of running outbound federation traffic through a proxy (which would need to understand how to resolve matrix server names). This would could also help lots in scenarios where people are running many Synapse's, and having a single process keeping out bound connections could reduce resource usage.

The idea being that a forward proxy is more efficient than trying to do this in Twisted (even if a lot of it the native openssl lib)

@DMRobertson DMRobertson added A-Federation S-Major Major functionality / product severely impaired, no satisfactory workaround. O-Occasional Affects or can be seen by some users regularly or most users rarely and removed z-outbound-federation-meltdown (Deprecated Label) Synapse melting down by trying to talk to too many servers z-p1 labels Aug 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Federation A-Performance Performance, both client-facing and admin-facing O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Major functionality / product severely impaired, no satisfactory workaround. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.
Projects
None yet
Development

No branches or pull requests

6 participants