-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Create a machine-readable document for routing requests to workers #12139
Comments
Not exactly the same...but I did wonder if we could annotate certain servlets as being "worker" friendly and then have an entry point that prints them out. |
I have a proof of concept of this at https://github.com/matrix-org/synapse/pull/new/clokep/autogen-workers, it just splats things to the screen for now, but could probably be augmented to spit things out in a few different formats. The downside is don't get good prose or comments or grouping, but I suspect that the pros outweigh this. In the current state it generates mostly the same endpoints, but there would be some rough edges. |
Interesting. Having the single source of truth be the servlets themselves does seem compelling. What does the output from that look like? I think there's more detail here than just "can it be routed to a worker", by the way. Ideally we want to be able to represent things like:
|
It is just a simple list right now:
I agree! An interesting thing about annotating the servlets with this information (and taking the config into account) is that the result could be tailored to your setup (at least, I think, I'm not 100% sure the config has enough info). E.g. if you have a I haven't figured out a good way of encoding any of the above though, but thank you for putting together a list of some of the info we would need! |
mmmhmm, that does sound interesting. Still, even if there is a way to generate a tailored setup, I'd still like a way to generate a comprehensive list. |
It looks like there are also some endpoints which are |
We seem to maintain the following which all hard-code worker information:
Note that these are all slightly out of sync with each other right now. |
+1 to this. even if we can never match all the possible needs for exact amount and type of workers for evereyone, we do need firm one place for one truth or "to get truth" to at least know what endpoints are currently existing. I do also currently like in the docs the "grouping" of endpoints per "what it is for", it's up to sysadmin then to decide is there used more or less workers and what is given even more workers... Currently I feel while endpoint listing is somewhat up to date in workers.md, it always seems to be quite manual and "if happened to remember" document change. |
This was merged as part of #15243. |
Constructing a reverse-proxy configuration for routing requests to workers is currently left largely as an exercise for the reader in https://matrix-org.github.io/synapse/develop/workers.html.
I think we should maintain a single source of truth which documents a mapping between endpoints and workers, which could ultimately be used as an input to other scripts which construct configuration files suitable for various reverse-proxies.
The text was updated successfully, but these errors were encountered: