
- Load imbalance: the load balancer routes requests by identity instead of evenly, so a busy host stays busy while others are idle.
- Fragility during deploys: restarting the process drops all sessions it held, breaking live work.
- Ineffective scaling: adding servers doesn’t migrate existing sessions to new machines.
- Operational burden to centralize session state (e.g., move to Redis), which requires pre-planning and extra implementation work across teams.
Sticky sessions increase operational complexity and make deployments brittle. Many deployments avoid them by removing session affinity from the protocol.
Use lightweight handles (cursors, references, or tokens) inside the message body to maintain continuity without requiring sticky sessions. This is more resilient and simplifies load balancing.

- Over standard input/output (stdio): send a
server/discoveryrequest and consider any response that is not recognized as a modern error to indicate a legacy server. - Over HTTP: inspect the body of a
400(or similar) error to detect legacy-style error text such as the JSON-RPC “Method not found” code or a legacy HTTP error indicating a missing session.
- If you need shared, durable session state, prefer an external store (for example, Redis) rather than process-local memory. See Redis: https://redis.io/
- For protocol compatibility patterns and legacy error codes, refer to the JSON-RPC specification: https://www.jsonrpc.org/specification
- For load balancer behavior and session affinity options, see your platform docs (for example, Kubernetes session affinity: https://kubernetes.io/docs/concepts/services-networking/service/#session-affinity).