Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-12861

Introduce a maxStalenessMS option when querying secondaries

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.6.0-rc0
    • Component/s: Replication
    • None

      As most app, a lot of my queries (much more than I currently do) could be executed on secondaries if I knew they aren't more than X seconds behind the primary member of their replica set.
      That why it would be really convenient to have a maxSlaveDelay settings or equivalent (the same way that we have a "readPref" setting for example) that would only select secondaries that have less than X seconds lag.

      I believe this value needs to be cached somewhere to be blazing fast to retrieve. This value couldn't be updated in real time, but updated every 30 seconds or so would be more than enough in most cases.

      I'm not sure about the details of the implementation, but you get the whole idea.

            jesse@mongodb.com A. Jesse Jiryu Davis
            tubededentifrice Vincent
            3 Vote for this issue
            12 Start watching this issue