Trying to understand the following scenarios of consistency in
elasticsearch:
sync replication - How does elasticsearch deals with consistency issue
that may arise from 1 node momentarily going down and missing writes to it?
When the node comes backup and the reads going to the non-primary shards
could get inconsistent data?
async replication - What happens if replication is slow for some reason,
could users see inconsistent data?
sync/async replication - how does elasticsearch keep data in sync for
those writes that never happened on the non-primary shard because of
network/node failures?
Trying to understand the following scenarios of consistency in
elasticsearch:
sync replication - How does elasticsearch deals with consistency issue
that may arise from 1 node momentarily going down and missing writes to it?
When the node comes backup and the reads going to the non-primary shards
could get inconsistent data?
async replication - What happens if replication is slow for some
reason, could users see inconsistent data?
sync/async replication - how does elasticsearch keep data in sync for
those writes that never happened on the non-primary shard because of
network/node failures?
Trying to understand the following scenarios of consistency in
elasticsearch:
sync replication - How does elasticsearch deals with consistency issue
that may arise from 1 node momentarily going down and missing writes to it?
This depends on the write consistency setting. By default, the operation
only succeeds if a quorum of replicas can index the document:
When the node comes backup and the reads going to the non-primary shards
could get inconsistent data?
No, when the node comes back up it will sync the stuff it missed with the
other nodes.
async replication - What happens if replication is slow for some
reason, could users see inconsistent data?
Yes, if you hit a shard that didn't get the latest operation, it could see
an "old" version of the data. You can use "preference" to try and hit the
primary shard all the time, but then your replicas will just be sitting
there for redundancy:
sync/async replication - how does elasticsearch keep data in sync for
those writes that never happened on the non-primary shard because of
network/node failures?
It either uses the transaction log or it transfers the whole shard to that
node.
When the node comes backup and the reads going to the non-primary shards
could get inconsistent data?
No, when the node comes back up it will sync the stuff it missed with the
other nodes.
async replication - What happens if replication is slow for some
reason, could users see inconsistent data?
Yes, if you hit a shard that didn't get the latest operation, it could see
an "old" version of the data. You can use "preference" to try and hit the
primary shard all the time, but then your replicas will just be sitting
there for redundancy:
When the node comes backup and the reads going to the non-primary
shards could get inconsistent data?
No, when the node comes back up it will sync the stuff it missed with the
other nodes.
async replication - What happens if replication is slow for some
reason, could users see inconsistent data?
Yes, if you hit a shard that didn't get the latest operation, it could
see an "old" version of the data. You can use "preference" to try and hit
the primary shard all the time, but then your replicas will just be sitting
there for redundancy:
When the node comes backup and the reads going to the non-primary
shards could get inconsistent data?
No, when the node comes back up it will sync the stuff it missed with
the other nodes.
async replication - What happens if replication is slow for some
reason, could users see inconsistent data?
Yes, if you hit a shard that didn't get the latest operation, it could
see an "old" version of the data. You can use "preference" to try and hit
the primary shard all the time, but then your replicas will just be sitting
there for redundancy:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.