Skip to content

Document session affinity#593

Open
eleftherias wants to merge 2 commits intomainfrom
session-affinity
Open

Document session affinity#593
eleftherias wants to merge 2 commits intomainfrom
session-affinity

Conversation

@eleftherias
Copy link
Member

Description

Document new session affinity option in relation to scalability.

Type of change

  • Documentation update

Related issues/PRs

stacklok/toolhive#3986

Screenshots

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

Copilot AI review requested due to automatic review settings March 6, 2026 13:58
@vercel
Copy link

vercel bot commented Mar 6, 2026

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

Project Deployment Actions Updated (UTC)
docs-website Ready Ready Preview, Comment Mar 6, 2026 1:59pm

Request Review

Copy link
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 vMCP scaling guide to document a session-affinity option intended to help route stateful client sessions consistently when horizontally scaling.

Changes:

  • Replaces the prior generic note about session affinity with a new section describing a VirtualMCPServer.spec.sessionAffinity field and an example YAML snippet.

Comment on lines +70 to +78
The `VirtualMCPServer` CRD includes a `sessionAffinity` field that controls how
the Kubernetes Service routes repeated client connections. By default, it uses
`ClientIP` affinity, which routes connections from the same client IP to the
same pod. You can configure this using the `sessionAffinity` field:

```yaml
spec:
sessionAffinity: ClientIP # default
```
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

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

The docs state that the VirtualMCPServer CRD has a spec.sessionAffinity field with default ClientIP, but I can’t find sessionAffinity anywhere in the CRD reference (docs/toolhive/reference/crd-spec.md) or in the repo’s Go/YAML sources. This makes the configuration example misleading. Please either (a) update the operator/CRD and reference docs to actually support this field, or (b) reword this section to describe how to set spec.sessionAffinity on the generated Kubernetes Service (if that’s the intended approach) and clarify the actual default behavior.

Copilot uses AI. Check for mistakes.
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