# T4 (m12p5) — sustained load during the 3→5→3 scale (Phase B). # # A single generator holds a steady ack=quorum read+write mix for ~5 min, long # enough to span a scale-down (5→3) and scale-up (3→5) under load. `--skip-seed` # (the corpus is already registered by t4-seed-job) keeps the id space; the mix # carries item/embed WRITES so the transition is exercised by live quorum writes, # not just reads. `--max-error-pct 0` is the zero-acked-loss gate: a quorum write # that cannot reach its majority during a membership change fails to ack → error # → the Job exits non-zero. `--json-summary` captures the per-stage p99 envelope # (before / during / after the scale) for the evidence table. # # NO --poll-status: this phase is UNDER LOAD (the idle-readiness isolation is the # separate idle Phase A driven from the host), so status polling is unneeded and # omitted to keep the offered load pure. # # Apply: kubectl apply -f tidal-stress/k8s/t4-load-job.yaml # Watch: kubectl logs -f job/tidal-stress-t4-load -n tidaldb-cluster apiVersion: batch/v1 kind: Job metadata: name: tidal-stress-t4-load namespace: tidaldb-cluster labels: app.kubernetes.io/name: tidal-stress app.kubernetes.io/part-of: tidaldb spec: backoffLimit: 0 ttlSecondsAfterFinished: 7200 template: metadata: labels: app.kubernetes.io/name: tidal-stress app.kubernetes.io/part-of: tidaldb spec: restartPolicy: Never automountServiceAccountToken: false securityContext: runAsNonRoot: true runAsUser: 1000 runAsGroup: 1000 seccompProfile: type: RuntimeDefault containers: - name: stress image: tidaldb-stress:m12p4-local imagePullPolicy: IfNotPresent args: - --target - https://tidaldb-0.tidaldb-peers.tidaldb-cluster.svc.cluster.local:9500 - --target - https://tidaldb-1.tidaldb-peers.tidaldb-cluster.svc.cluster.local:9500 - --target - https://tidaldb-2.tidaldb-peers.tidaldb-cluster.svc.cluster.local:9500 - --ca-cert - /etc/tidaldb/tls/ca.crt - --ack - quorum - --skip-seed - --corpus - "300" - --embedding-dim - "1536" - --users - "100000" # ~5 min steady hold: three 100s stages so the per-stage JSON gives a # before / during / after p99 read across the scale window. - --ramp - "400:100,400:100,400:100" - --mix - "feed=4,search=1,view=2,like=1,item=1,embed=1" - --max-inflight - "2000" - --json-summary - /tmp/t4-load-summary.json - --max-error-pct - "0" env: - name: TIDAL_API_KEY valueFrom: secretKeyRef: name: tidaldb-credentials key: TIDAL_API_KEY - name: TIDAL_STRESS_LOG value: warn resources: requests: cpu: 500m memory: 256Mi limits: cpu: "3" memory: 1Gi securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true capabilities: drop: ["ALL"] volumeMounts: - name: cluster-tls mountPath: /etc/tidaldb/tls readOnly: true - name: tmp mountPath: /tmp volumes: - name: cluster-tls secret: secretName: tidaldb-cluster-tls items: - key: ca.crt path: ca.crt - name: tmp emptyDir: {}