Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-804

Support Monotonic Read Consistency when reading from secondaries

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • 2.11.1
    • Cluster Management
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ahubold Andreas Hubold
            Votes:
            10 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: