generate only one upstream per worker

pull/7/head
Daniel Lovbrotte Olsen 2024-03-13 06:22:24 +01:00
parent b8d7c76a7e
commit d48997cfb4
2 changed files with 15 additions and 0 deletions

View File

@ -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
]))

View File

@ -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";