Skip to content

Deployment with process replication #125

Open
@davidbrochart

Description

@davidbrochart

When a server is deployed using replication of processes, e.g. a FastAPI application running on Uvicorn with worker processes, each process will have its own pycrdt WebSocket handler, and so clients connecting to the server won't find themselves in the same room, depending on which process handles the request. That's because the rooms are isolated in their own isolated process.
A solution to this issue could be to have a separate pycrdt WebSocket server, that each "worker process pycrdt WebSocket handler" would be a client of. This server would keep all the rooms in the worker processes in sync. It can be seen as a database, that is usually launched when deploying a server.
I think a pycrdt WebSocket server could accept an optional WebSocket provider, the same way it accepts an optional store.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions