I am planning to use Aerospike, in which Strong consistrncy is requried. I wanted to know what will be the effect of String Consistency (i.e. Synchronous Replication) on Availability?
replication-factor 2 and sequential consistency, the performance is equivalent to AP mode. There are impacts for higher replication, linearization, or
I hope you don’t mind that I quote part of your deleted reply:
My main aim is to ensure that after INSERT/UPDATE, the data shouldbe consistent for all reads.
This would indicate that your use case requires linearizability. Normally this isn’t actually true for all reads and in Aerospike you can specify which reads need to be linearized. Often, we have also found that it isn’t actually required for any read. Sequential (aka session) consistency means that a particular session is guaranteed to see a linear progressions of updates but the progression across all sessions may not be linear. Sequential consistency in Aerospike will actually provide linear progression across all sessions in the absence of any disruptions to the cluster. However; disruptions are unavoidable, but only account for a very small fraction of the clusters overall operation time. These disruptions come in the form of (non-quiesced) maintenance windows or unexpected network/node failures and only in these disruptions can the client potentially have a burst of non-linearized reads when using Sequential consistency. Additionally, the maintenance window case can be eliminated if the
quiesce command is used on the Aerospike nodes and clients are allowed to transition from the quiesced nodes before the nodes are stopped.
In general, if a non-linearized read is some degree of inconvenient and not a serious risk to the application then you probably should use Sequential consistency. Consider the trade-offs carefully.