Skip to content

Document sessionAffinity for scaled MCPServers#951

Closed
danbarr wants to merge 3 commits into
mainfrom
docs-k8s-session-affinity
Closed

Document sessionAffinity for scaled MCPServers#951
danbarr wants to merge 3 commits into
mainfrom
docs-k8s-session-affinity

Conversation

@danbarr

@danbarr danbarr commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Description

Documents the MCPServer sessionAffinity field in redis-session-storage.mdx, explaining how Service-level affinity (routing) and Redis-backed shared session storage (state) work together for scaled deployments, including the ClientIP-behind-NAT caveat. Cross-links the existing Virtual MCP Server scaling guide rather than duplicating it. Verified against the MCPServer CRD schema (enum [ClientIP, None], default ClientIP).

Type of change

  • Documentation update

Related issues/PRs

Addresses a gap in #655.

Submitter checklist

Content and formatting

  • I have reviewed the content for technical accuracy
  • I have reviewed the content for spelling, grammar, and style

Reviewer checklist

Content

  • I have reviewed the content for technical accuracy
  • I have reviewed the content for spelling, grammar, and style

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 16, 2026 16:04
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs-website Ready Ready Preview, Comment Jun 18, 2026 2:40pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Kubernetes Redis session storage guide to document the MCPServer.spec.sessionAffinity field and explain how Service-level routing affinity (connection pinning) interacts with Redis-backed shared session storage when running scaled (multi-replica) MCPServer deployments.

Changes:

  • Adds a new “Session affinity and shared session storage” section describing sessionAffinity behavior (ClientIP vs None) for MCPServer.
  • Explains the complementary roles of routing affinity (pinning) and Redis session storage (state sharing) for resilience during pod changes/reconnects.
  • Adds a NAT/shared-egress caveat and cross-links the existing vMCP scaling guidance instead of duplicating it.

Comment thread docs/toolhive/guides-k8s/redis-session-storage.mdx Outdated
Comment thread docs/toolhive/guides-k8s/redis-session-storage.mdx Outdated
Comment thread docs/toolhive/guides-k8s/redis-session-storage.mdx Outdated
Comment thread docs/toolhive/guides-k8s/redis-session-storage.mdx Outdated
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@danbarr

danbarr commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #956.

On review, redis-session-storage.mdx was the wrong home for this. run-mcp-k8s.mdx already owns MCPServer horizontal scaling (proxy/backend replicas, the ClientIP-affinity-vs-Redis relationship, and the NAT caveat), so this PR's section largely duplicated that, while the genuinely new bit, the spec.sessionAffinity field, belonged alongside those scaling knobs. #956 documents the field there instead, distinguishing the proxy Service affinity (spec.sessionAffinity) from the backend routing already covered. This keeps MCPServer consistent with how MCPRemoteProxy and VirtualMCPServer document scaling on their own pages, and leaves the Redis page focused on the session store.

@danbarr danbarr closed this Jun 18, 2026
@danbarr danbarr deleted the docs-k8s-session-affinity branch June 18, 2026 14:49
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.

2 participants