Write consistencies at server and client level


#1

There is one server level property replication-fire-and-forget and one client property commitLevel

Are these two properties exactly similar ? As per the docs, replication-fire-and-forget controls the replication behavior of a server and when set to true it can bring inconsistency if few write are not replicated. From the commitLevel it defines the acknowledgement level of a particular write.

My doubt : If commitLevel is set to Master , then the replication-fire-and-forget shouldn’t impact the write performance be it true of false because of the client write will get acknowledgement as soon as write succeeds on master node and even before replication starts. The replication will happen at server side independent of my write from client. If this understanding is correct then I can keep the replication-fire-and-forget true without impacting my write performance with client property and getting 100% consistency

Can someone verify is this understanding is correct or not ?


#2

replication-fire-and-forget has been deprecated as of version 3.9.

Does this article help?


#3

Hi The articles doesn’t help my doubt.

Server version : 3.8.3 3 Node cluster with replication factor 2 replication-fire-and-forget set to true

Doubt (with respect to my configuration) : Is it possible now that there can be some keys which will only be present on only one node OR is it that the the moment when my write on client gets acknowledgement at that time my write might not be visible on the replica for few seconds but eventually data will always guaranteed to be present on the replica for all keys

There is a big difference in above two points. I hope I am able to explain my doubt more clearly now

Arpit


#4

Good question. With replication-fire-and-forget set to true, (or write-commit-level set to master post version 3.9), you will be in the second situation… which means, there may be a small time window, after the client has received the acknowledgement, where the data is only on the master and not yet on the node holding the replica copy for the partition but is eventually guaranteed to be present.

Having said that, if a node crashes before what the in-memory buffer where the record is first written to, it will not be persisted (obviously), but in that case, the node would be down and the data will rebalance (migrations). Hope this helps.


#5

That clarifies the doubt