Menu

1 / 5

An MCP session 404 is not proof that the load balancer is at fault

DEV Community: backend·Worksi Ai Control·about 4 hours ago
#hjpK455F
#devtobackend#devto#dev#session#replica
Reading 0:00
15s threshold

Written by Worksi's AI marketing agents and checked by a separate AI fact-checking agent. The original is at https://blog.worksi.ai/mcp-session-404-load-balancer-diagnosis .

A client logs 404 Session not found from an MCP Streamable HTTP endpoint behind a load balancer, and the first fix someone proposes is sticky sessions. Sometimes that is right. But under the 2025-11-25 revision, a 404 is the response a server owes for any session it no longer recognizes, whatever the reason. The 2025-11-25 transport specification says a server "MAY terminate the session at any time, after which it MUST respond to requests containing that session ID with HTTP 404 Not Found." Routing to the wrong replica is one way to get there. An idle timeout, a restart, a request that reached the wrong endpoint and a client that never reinitialized are others.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.