Add sticky session affinity to MCP IngressRoute
STREAMABLE transport holds session state in-memory per-pod. With HPA scaling to 2+ replicas and round-robin routing, requests hit different pods and fail with "Session not found". Pin each client to one pod via a secure HttpOnly cookie.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# Traefik IngressRoute: neuron.neurontechnologies.ai → neuron-mcp service
|
||||
# Exposes the Neuron MCP server externally via Cloudflare tunnel.
|
||||
# MCP client config: url = https://neuron.neurontechnologies.ai/mcp
|
||||
# Sticky sessions required: STREAMABLE transport holds session state in-memory;
|
||||
# without affinity, multi-pod deploys fail with "Session not found".
|
||||
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
@@ -16,3 +18,8 @@ spec:
|
||||
services:
|
||||
- name: neuron-mcp
|
||||
port: 8080
|
||||
sticky:
|
||||
cookie:
|
||||
name: neuron_mcp_affinity
|
||||
secure: true
|
||||
httpOnly: true
|
||||
|
||||
Reference in New Issue
Block a user