mirror of
https://github.com/dali99/nixos-matrix-modules.git
synced 2024-12-21 10:37:28 +01:00
generate only one upstream per worker
This commit is contained in:
parent
b8d7c76a7e
commit
d48997cfb4
1
lib.nix
1
lib.nix
@ -29,6 +29,7 @@ rec {
|
||||
# Subindex by resource names, listener types, and convert to upstreams
|
||||
(lib.mapAttrs (_: workers: lib.pipe workers [
|
||||
(lib.concatMap (worker: worker.settings.worker_listeners))
|
||||
lib.lists.head # only select one listener for the worker to avoid cache thrashing
|
||||
lib.flatten
|
||||
mapListenersToUpstreamsByType
|
||||
]))
|
||||
|
@ -20,6 +20,20 @@ let
|
||||
normalSyncers = 1;
|
||||
eventPersisters = 1;
|
||||
useUserDirectoryWorker = true;
|
||||
|
||||
instances.auto-fed-receiver1.settings.worker_listeners = [
|
||||
{
|
||||
bind_addresses = [
|
||||
"127.0.0.2"
|
||||
];
|
||||
port = 1337;
|
||||
resources = [
|
||||
{ compress = false;
|
||||
names = [ "federation" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
settings.server_name = "example.com";
|
||||
|
Loading…
Reference in New Issue
Block a user