-
Notifications
You must be signed in to change notification settings - Fork 2
Explain proxyrunner session-aware backend pod routing #710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: issue-707
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -453,17 +453,40 @@ The proxy runner handles authentication, MCP protocol framing, and session | |||||||||||||||||||||||||||||||||||||
| management; it is stateless with respect to tool execution. The backend runs the | ||||||||||||||||||||||||||||||||||||||
| actual MCP server and executes tools. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ### Session routing for backend replicas | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| MCP connections are stateful: once a client establishes a session with a | ||||||||||||||||||||||||||||||||||||||
| specific backend pod, all subsequent requests in that session must reach the | ||||||||||||||||||||||||||||||||||||||
| 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. | ||||||||||||||||||||||||||||||||||||||
|
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. | |
| 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. |
Uh oh!
There was an error while loading. Please reload this page.