Skip to content

How to use the server with replicas and load balancer? #482

@robertofalk

Description

@robertofalk

Description

Because of the in memory session id, when there are more than one replica (and having a load balancer in front of the server), requests from the same client might be handled by different replicas, which doesn't work, since not all clients are aware of sessions all the time.

I saw that K8s might manage sessions using session affinity but I was wondering if on the library level, someone is using something like redis to sync the session between replicas?

Version Information

FastMCP version:                                                       2.3.0
MCP version:                                                           1.8.0
Python version:                                                       3.13.2
Platform:                      Linux-6.10.14-linuxkit-aarch64-with-glibc2.36
FastMCP root path: /workspaces/mcp-server/.venv/lib/python3.13/site-packages

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working. Reports of errors, unexpected behavior, or broken functionality.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions