Details
-
New Feature
-
Resolution: Won't Fix
-
Major - P3
-
None
-
2.11.1
-
None
Description
It would be great if the Java driver would support Monotonic Read Consistency when reading from secondaries.
The use case are read-heavy applications that don't need strong consistency but require updates to be visible in the same order as they happened on the primary. When using a secondary read preference, the driver currently distributes read load to different secondaries. This means the order of updates is not preserved and in the application it may look as if time is going backwards - sometimes.
One solution to achieve monotonic reads is to use the default primary read preference and distribute load via sharding only. However for read-heavy applications which do not need strong consistency (as ensured by read preference primary) it makes sense to scale read-load over secondaries to avoid the additional cost and complexity that comes with sharding. Even with sharding in place, the number of required shards can be lower if read load is not only handled by the primaries.
Note that the Java driver already supports monotonic reads per thread with requestStart()/requestEnd() methods. However there's no possibility to achieve this for the entire application. Using only one thread per application not an option as it would kill performance.