From 358633638f9834b00774dcccab872ce350451c58 Mon Sep 17 00:00:00 2001 From: Rob Gonnella Date: Fri, 15 Mar 2024 00:00:38 -0400 Subject: [PATCH] Documentation: Adds sticky cookie note for k8s multiple replica setups (#3120) --- docs/installation/k8s.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/installation/k8s.md b/docs/installation/k8s.md index 685472ea0..6805139b6 100644 --- a/docs/installation/k8s.md +++ b/docs/installation/k8s.md @@ -361,3 +361,33 @@ spec: port: number: 3000 ``` + +### Multiple Replicas + +If you plan to deploy homepage with a replica count greater than 1, you may +want to consider enabling sticky sessions on the homepage route. This will +prevent unnecessary re-renders on page loads and window / tab focusing. The +procedure for enabling sticky sessions depends on your Ingress controller. Below +is an example using Traefik as the Ingress controller. + +``` +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: homepage.example.com +spec: + entryPoints: + - websecure + routes: + - kind: Rule + match: Host(`homepage.example.com`) + services: + - kind: Service + name: homepage + port: 3000 + sticky: + cookie: + httpOnly: true + secure: true + sameSite: none +```