Skip to content

conceptually get multiple server instances working together #1022

@ckalas

Description

@ckalas

I am trying to integrate this into a FastAPI application as an ASGI sub-application. It is deployed on Kubernetes and everything works fine with a single replica; as soon as i increase that it fails. I had thought by passing the redis server running on the cluster to the client_manager kwarg to the socketio.AsyncServer this would work, but i always get errors like below.

mgr = socketio.AsyncRedisManager(
        f"redis://{os.getenv('REDIS_HOST', 'localhost')}"
    )
sio = socketio.AsyncServer(
        cors_allowed_origins="*", async_mode="asgi", client_manager=mgr
    )
# Invalid session hH5knPe_GeTb_i3fAAAA (further occurrences of this error will be logged with level INFO)```

Could this conceptually work or am i missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions