Strategy for multi instances server without loadbalancer affinity #638
Replies: 2 comments
-
|
@halter73 given you are the one that added the IDataProtectionProvider, was this the intended usage? |
Beta Was this translation helpful? Give feedback.
-
|
Came here to try to figure out this same issue. Ideally, there is some mechanism to hook into session management with an interface like an A workaround I'm pondering is that the MCP tool itself operates as |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
Question Category
Your Question
Currently, using multiple stateless HTTP server instances result in an error each time a client reach another instance (it provides an Mcp-Session-Id that is not known by the other instance).
Header-based affinity in the LBs is a possibility, but I think it will still generate errors each time you restart an instance and a client have to switch to a new one (so quite frequently depending on your continuous deployment strategy).
Looking at the code, the stateless servers rely on
IDataProtectionProviderto store the session data. By default, this is a local storage.❓ To implement a distributed stateless server, would using a distributed key storage provider be a good practice? For example using redis to store the session info.
Beta Was this translation helpful? Give feedback.
All reactions