Skip to content

Explain proxyrunner session-aware backend pod routing#710

Open
yrobla wants to merge 1 commit intoissue-707from
issue-708
Open

Explain proxyrunner session-aware backend pod routing#710
yrobla wants to merge 1 commit intoissue-707from
issue-708

Conversation

@yrobla
Copy link
Copy Markdown
Contributor

@yrobla yrobla commented Apr 14, 2026

Summary

run-mcp-k8s.mdx documented backendReplicas but gave no explanation of why Redis matters for backend scaling or how the proxy runner routes sessions to pods. Users could misconfigure or skip Redis when only scaling backends.

  • Adds a Session routing for backend replicas subsection explaining that the proxy runner stores a session-to-pod mapping in Redis, what happens on backend pod restart, and why client-IP affinity is unreliable behind NAT
  • Absorbs the previous standalone SessionStorageWarning note into the new subsection so the backendReplicas implication is explicit rather than buried
  • Updates the Redis link to point directly to #horizontal-scaling-session-storage (added in Add horizontal scaling Redis session storage guide #709)

Test plan

  • Section renders correctly in Docusaurus
  • Redis link resolves to the correct anchor in the session storage guide

Closes #708

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings April 14, 2026 13:13
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-website Ready Ready Preview, Comment Apr 14, 2026 1:35pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Kubernetes “run MCP” guide to clarify why Redis is important when scaling backend replicas by documenting how the proxy runner performs session-aware routing to backend pods.

Changes:

  • Added a “Session routing for backend replicas” subsection explaining Redis-backed session-to-pod routing, NAT pitfalls with client-IP affinity, and behavior on backend pod replacement.
  • Merged the previous standalone SessionStorageWarning note into the new routing explanation so the backendReplicas implications are explicit.
  • Updated the Redis session storage link to point at a specific in-page anchor.

Users scaling backendReplicas > 1 had no explanation of why Redis is
needed or how the proxy runner routes sessions to backend pods.

- Add a "Session routing for backend replicas" subsection explaining
  that the proxy runner uses Redis to store session-to-pod mappings,
  what happens when a backend pod restarts, and why client-IP affinity
  alone is unreliable behind NAT
- Absorb the standalone SessionStorageWarning note into the new
  subsection so the backendReplicas implication is explicit
- Update Redis link to point directly to the horizontal scaling anchor

Closes #708

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@danbarr danbarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the PR description you mentioned adding an anchor link to a new heading introduced in the unmerged #709. But the link is not actually present in this PR. Suggest making this one a draft dependent on 709, then add the anchor once it's present.

@yrobla yrobla changed the base branch from main to issue-707 April 15, 2026 07:20
@yrobla yrobla requested review from Copilot and danbarr April 15, 2026 07:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment on lines +460 to +468
same pod. When `backendReplicas > 1`, the proxy runner uses Redis to store a
session-to-pod mapping so every proxy runner replica knows which backend pod
owns each session.

Without Redis, the proxy runner falls back to Kubernetes client-IP session
affinity on the backend Service, which is unreliable behind NAT or shared egress
IPs. If a backend pod is restarted or replaced, its entry in the Redis routing
table is invalidated and the next request reconnects to an available pod —
sessions are not automatically migrated between pods.
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wording implies Redis is always used whenever backendReplicas > 1 ("the proxy runner uses Redis ..."), but the next paragraph describes behavior without Redis. Consider rephrasing to make it explicit that Redis-backed routing only applies when Redis session storage is configured, and otherwise the proxy runner relies on Service-level affinity (with the limitations described).

Suggested change
same pod. When `backendReplicas > 1`, the proxy runner uses Redis to store a
session-to-pod mapping so every proxy runner replica knows which backend pod
owns each session.
Without Redis, the proxy runner falls back to Kubernetes client-IP session
affinity on the backend Service, which is unreliable behind NAT or shared egress
IPs. If a backend pod is restarted or replaced, its entry in the Redis routing
table is invalidated and the next request reconnects to an available pod —
sessions are not automatically migrated between pods.
same pod. When `backendReplicas > 1` and Redis session storage is configured,
the proxy runner uses Redis to store a session-to-pod mapping so every proxy
runner replica knows which backend pod owns each session.
Without Redis session storage, the proxy runner relies on Kubernetes client-IP
session affinity on the backend Service, which is unreliable behind NAT or
shared egress IPs. If a backend pod is restarted or replaced, its entry in the
Redis routing table is invalidated and the next request reconnects to an
available pod — sessions are not automatically migrated between pods.

Copilot uses AI. Check for mistakes.
Comment on lines 505 to 507
When running multiple replicas, configure
[Redis session storage](./redis-session-storage.mdx) so that sessions are shared
across pods. If you omit `replicas` or `backendReplicas`, the operator defers
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says the Redis link was updated to point directly to #horizontal-scaling-session-storage, but this section still links to ./redis-session-storage.mdx without an anchor. Either update the link to match the description (once the heading exists) or adjust the PR description so it matches the actual change set.

Copilot uses AI. Check for mistakes.
@yrobla yrobla force-pushed the issue-707 branch 2 times, most recently from 99b3487 to 2f0d1cf Compare April 15, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: explain proxyrunner session-aware backend pod routing when using backendReplicas

4 participants