Effect of Availability if going with Strong Consistency

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 should be 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.

1 Like