Cluster with integral and independent replicas

Hi, I need help to understand how to handle this situation :

I have a cluster of three CrateDB nodes that run on three different hosts, such as docker containers.

Screenshot 2023-12-16 alle 13.12.01

I thought I had an exact replica of the db on each node, but having interrupted communications between the three hosts the result was that the three nodes continued to stay alive but no longer reconnecting with each other, despite the communication having been restored.

I had to destroy and recreate the containers.

Is it possible to create a configuration so that even if the connections between the nodes are lost, the node that receives the data is able to write it to the db and, if the network is re-established, update the other nodes?

How can a node in a cluster, even if separated from the cluster, continue to write data?

Thank you for your help.

Typically CrateDB nodes would try to reconnect again after some timeout.

To write data to CrateDB there always needs to be a quorum with an elected master. E.g. if you have a 3 node cluster, always at least 2 need to be connected to write data. Reading node state data might still be possible in a network partition.


If you really need 3 nodes that can write all the time, you could in theory set up logical replication. However in this scenario, every nodes is a separate cluster, with all kinds of side effects.

1 Like

Thank you very much, now is clear why was not possible to write without a quorum.

Interesting proposal to use PUB/SUB.
Definitely on the list for good intentions for 2024.

3 Likes