Reputation: 1050
I have a question on crate write behavior.
From crate documentation
One reason is that replicas are written synchronously. Thus making a write task wait for the replicas to be written somewhere in a data center hundreds of miles away can lead to noticeable latency and cause the cluster to slow down.
If I have a cluster of three nodes and if one node is down, what will be the behavior when I insert some data? Will it fail or crate will sync the data with the node that was down when it is up?
Regards Albin
Upvotes: 0
Views: 110
Reputation: 729
As written here: https://crate.io/docs/en/latest/storage_consistency.html?highlight=quorum
Write operations are handled differently than reads. Such operations are synchronous over all active replicas with the following flow:
The primary shard and the active replicas are looked up in the cluster state for the given operation. The primary shard and a quorum of the configured replicas need to be available for this step to succeed.
...
The default quorum is:
int( (primary + number_of_replicas) / 2 ) + 1
So it will not fail as long as the quorum is achieved. After the failed node will operate normal again, crate will take care to create replicas again on that node if the replica was not already created on another running node.
Upvotes: 2