Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] check the synchronization status of nodes and avoid those which are still in data synchronization #209

Open
Alex-Cheng opened this issue Aug 18, 2022 · 2 comments

Comments

@Alex-Cheng
Copy link

Is your feature request related to a problem? Please describe.
I want to build-up a cluster with several nodes for load-balancing, however I need to frequently update database on one node and spread muations to others. I need to let chproxy avoide those nodes which are in progress of data synchronization.

Describe the solution you'd like
When data sync is running for a ReplicatedMergeTree tables, chproxy could check the data sync status of each node to make sure that only fully synched latest updates are in the service.

@gontarzpawel
Copy link
Contributor

Do you have any idea about how this feature could be implemented? @Alex-Cheng

We're familiar with the scenario of out of sync replica (e.g. node outage). In which case, we apply following approach:

  • disable clickhouse server from the read path (remove https port - for chproxy access, and tcp port - for intersever communication)
  • restart server with updated config

This way clickhouse node will be considered as unreachable, unhealthy by chproxy and queries will omit it. When lag is caught up, we restart that server with fixed configuration.

However, it makes sense only when it's not a common behaviour but rather sporadical.

@Alex-Cheng
Copy link
Author

"disabling clickhouse server from the read path and restarting server" helps, but it need manual operations, not automatical. I need an automatical way. My idea is to check the /replicas_status which implemented by ReplicasStatusHandler, and skip the node which /replicas_status returns false.

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

No branches or pull requests

3 participants