Browsing sessions are switching between data center nodes in load balanced environment
プラットフォームについて: Data Center のみ - この記事は、Data Center プラットフォームのアトラシアン製品にのみ適用されます。
When browsing a site hosted on a Data Center platform, the client is switching sessions from one node to the other in between each page load.
This can often be confirmed by observing the "NodeID" that is printed at the bottom of almost every Confluence page - if that NodeID is changing in between page navigations or page refreshes then the load balancer is not persisting sessions and the client is "bouncing" between nodes.
Load-balanced Confluence Data Center
- this is to include the load balancer / Ingress of a Kubernetes cluster if Confluence DC is running in a K8 cluster
Session Affinity, or "Sticky Sessions", is not enabled on the load balancer.
The steps for implementing this feature differs from load balancer vendor to vendor, look for "Session Affinity" or "Sticky Sessions" and ensure this is enabled. This is a requirement for Confluence per "Load Balancer Configuration Options" to use session persistence when load balancing.
Kubernetes Ingress Annotation example
In the case where, when deploying Confluence via a Helm chart to a Kubernetes cluster, you happen to not be using the default NGINX Ingress/Ingress Controller and are using Traefik instead, the following would be the annotations necessary to ensure the Traefik Ingress (acting as the load balancer) enforces session persistence.
traefik.ingress.kubernetes.io/service.sticky.cookie: "true", traefik.ingress.kubernetes.io/service.sticky.cookie.name: "confluence_cookie", traefik.ingress.kubernetes.io/service.sticky.cookie.secure: "true"