Skip to content

Recommended way to handle failover with a multi-node cluster #255

@orangevinz

Description

@orangevinz

I'm using this library to connect to a ClickHouse 26 cluster. My DevOps team has set up 3 nodes, so I have 3 IPs available.

After reading through the code, I have the impression that the Cluster class is designed for monitoring purposes (checking replica health, cluster topology, table sizes across nodes, etc.) rather than as an application-level failover mechanism for regular queries.

Could you confirm whether this is correct, or am I missing something?

If Cluster is not intended for transparent query failover, do you have any recommendations on how to configure the client to automatically fall back to another node when one becomes unavailable? Should we put a load balancer (HAProxy / VIP) in front of the nodes, rely on round-robin DNS, or implement our own retry logic on top of Client?

Thanks for your help!

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