Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Fragmented Clusters #25

Description

@scottgarner

I'm using DOG for a project where users connect via websockets and are grouped into "namespaces". All traffic sent from one user in a namespace is sent to all other users. In general this works fine, both with a single Replica and with users spread across multiple Replicas through the use of "gossip".

Eventually, however, if a user in a namespace disconnects and reconnects or a new user connects, they seemingly end up on a totally separate cluster, isolated from other users. As other users disconnect/reconnect, they'll also end up in this new cluster. There's only one Group with a constant key. It is unfortunately not easy to reproduce, but has happened many times.

A user on the Cloudflare Developers Discord suggested that this may be because DOG doesn't persist the Group's list of Replicas. So, if something were to cause the Group to reinitialize, it would have no knowledge of the previous set of Replicas, even though users are still connected to them. This seems to align with what I'm seeing, but I'm not sure how to fully verify because I'm not sure what causes the Group to restart/reinitialize.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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