feat(k8s): scale core-api to 2 replicas with PDB and surge-only rollouts#208
Merged
Conversation
Implements action items 3 and 5 of docs/adr/0001-sse-multi-replica.md. Prereqs landed first: sse:ctl:resubscribe control channel (#206) and Redis-backed rate-limit counters (#207). With those in, no remaining core-api state assumes a single pod. - replicas: 2 with maxUnavailable: 0 / maxSurge: 1 so deploys never drop below capacity; SSE clients ride through on their 3s retry - PodDisruptionBudget (minAvailable: 1) so node drains and cluster upgrades cannot take the whole API down - cdc-runbook diagram now shows the per-replica Redis pub/sub fan-out and the resubscribe control channel Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Action items 3 + 5 of ADR-0001 — the final step. Prereqs already merged:
sse:ctl:resubscribecontrol channel (#206) and Redis-backed rate-limit counters (#207). With those deployed, no remaining core-api state assumes a single pod.replicas: 2withmaxUnavailable: 0/maxSurge: 1— rollouts surge a new pod before killing an old one, so deploys stop being micro-outages; SSE clients ride through on their 3s retryminAvailable: 1) so node drains and cluster upgrades can't take the whole API downMerge order matters: merge only after #206 and #207 have deployed to the cluster (both are in main; confirm the core-api rollout finished).
Test plan
kubectl -n scrollr get pods -l app=core-apishows 2 Ready pods/healthnever 503s from the gateway (zero-drop rollout)🤖 Generated with Claude Code