๐Docs ยท Deployment
Load tests
wallet-scale.js โ Phase 6.2
Goal: confirm whether wallet-api can run with replicas > 1 without
breaking sessions or wallet state under round-robin load balancing.
How to run
- Bring up the cluster:
./deploy/k8s/scripts/k8s-deploy.sh up waltid - Apply baseline (1 replica):
kubectl -n waltid scale deploy waltid-walt-wallet --replicas=1 k6 run --env BASE_URL=https://wallet.verifiably.local --env VUS=50 \ deploy/k8s/test/load/wallet-scale.js | tee report-1replica.txt - Apply scale-out (3 replicas):
kubectl -n waltid scale deploy waltid-walt-wallet --replicas=3 k6 run --env BASE_URL=https://wallet.verifiably.local --env VUS=50 \ deploy/k8s/test/load/wallet-scale.js | tee report-3replicas.txt - Compare
cross_pod_driftrate between the two.
Interpretation
cross_pod_drift= 0 in both runs โ wallet-api is stateless w.r.t.
sessions; safe to enable HPA. Updatewalt-wallet/values.yaml
wallet.hpa.enabled: true.cross_pod_driftjumps in the 3-replica run โ wallet-api keeps
in-process session state. Options:- sticky sessions via ingress-nginx
nginx.ingress.kubernetes.io/affinity: cookie - move session state to Redis (walt.id supports this โ see ktor-server-sessions-redis)
Document the chosen path indocs/k8s/wallet-scaling.md.
- sticky sessions via ingress-nginx
Status
Not yet run โ pending Phase 8.1 cluster-up + first up waltid end-to-end.
Source: deploy/k8s/test/load/README.md