From daae9ed045eec41d69076b59c8f6263dbb64e540 Mon Sep 17 00:00:00 2001 From: Ivan Reshetnikov Date: Thu, 28 Nov 2024 22:40:55 +0500 Subject: [PATCH] Simplify nextcloud load balancing Nextcloud with current settings gives errors when connecting to a random server, so we need to select a specific server for the user. Balancing by source IP should be enough. --- roles/haproxy/files/haproxy.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/haproxy/files/haproxy.cfg b/roles/haproxy/files/haproxy.cfg index dcda9c5..35825c8 100644 --- a/roles/haproxy/files/haproxy.cfg +++ b/roles/haproxy/files/haproxy.cfg @@ -214,13 +214,13 @@ backend authentik_ldap server s2 authentik-ldap-2:3389 check inter 10s backend nextcloud + balance source mode http option httpchk http-check send meth GET uri /status.php hdr Host nc.comfycamp.space http-check expect status 200 - cookie SERVER insert indirect nocache - server s1 nextcloud-1:80 check inter 15s cookie s1 - server s2 nextcloud-2:80 check inter 15s cookie s2 + server s1 nextcloud-1:80 check inter 15s + server s2 nextcloud-2:80 check inter 15s backend mta_sts mode http