Java Driver
  1. Java Driver
  2. JAVA-381

Support redundant mongos connections

    Details

    • # Replies:
      8
    • Last comment by Customer:
      false

      Description

      Add support for a redundant connection mode to mongos instances much like connecting to replicasets work.

      Mongo constructor that takes a seed list should detect whether it is a list of mongos instances or a list of replica set members. If the latter, it should work the same as now. If the former, the driver should select the mongos with the lowest ping time and send all traffic to it, failing over if that one becomes unavailable.

        Issue Links

          Activity

          Hide
          auto
          added a comment -

          Author:

          {u'date': u'2012-07-05T11:09:56-07:00', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}

          Message: JAVA-381: Added MongosStatus class as a sibling to ReplicaSetStatus to handle mongos failover.
          Refactored ReplicaSetStatus and MongosStatus to share a common base class ConnectionStatus.
          Added DynamicConnectionStatus class to handle dynamic discovery of whether a list of seed nodes represents a bunch of mongos servers or a replicaset.
          Is uses ExecutorService to handle multiple threads that communicate with each member of the seed list.
          Changed DBTCPConnection to depend on DynamicConnectionStatus insteand of ReplicaSetStatus.
          Branch: master
          https://github.com/mongodb/mongo-java-driver/commit/d51b3648a8e1bf1a7b7886b7ceb343064c9e2225

          Show
          auto
          added a comment - Author: {u'date': u'2012-07-05T11:09:56-07:00', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'} Message: JAVA-381 : Added MongosStatus class as a sibling to ReplicaSetStatus to handle mongos failover. Refactored ReplicaSetStatus and MongosStatus to share a common base class ConnectionStatus. Added DynamicConnectionStatus class to handle dynamic discovery of whether a list of seed nodes represents a bunch of mongos servers or a replicaset. Is uses ExecutorService to handle multiple threads that communicate with each member of the seed list. Changed DBTCPConnection to depend on DynamicConnectionStatus insteand of ReplicaSetStatus. Branch: master https://github.com/mongodb/mongo-java-driver/commit/d51b3648a8e1bf1a7b7886b7ceb343064c9e2225
          Hide
          auto
          added a comment -

          Author:

          {u'date': u'2012-07-16T14:48:58-07:00', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}

          Message: JAVA-381: fixed race condition
          Branch: master
          https://github.com/mongodb/mongo-java-driver/commit/861bea82b90c70ae3f0054ad1e6dcb6a1e57ad46

          Show
          auto
          added a comment - Author: {u'date': u'2012-07-16T14:48:58-07:00', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'} Message: JAVA-381 : fixed race condition Branch: master https://github.com/mongodb/mongo-java-driver/commit/861bea82b90c70ae3f0054ad1e6dcb6a1e57ad46
          Hide
          auto
          added a comment -

          Author:

          {u'date': u'2012-07-18T09:11:07-07:00', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}

          Message: JAVA-381: Added support for detecting a mongos connection
          Branch: master
          https://github.com/mongodb/mongo-java-driver/commit/9a32cd62be7b22a361e44c62b123b2f0cd541fb0

          Show
          auto
          added a comment - Author: {u'date': u'2012-07-18T09:11:07-07:00', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'} Message: JAVA-381 : Added support for detecting a mongos connection Branch: master https://github.com/mongodb/mongo-java-driver/commit/9a32cd62be7b22a361e44c62b123b2f0cd541fb0
          Hide
          auto
          added a comment -

          Author:

          {u'date': u'2012-07-20T07:18:59-07:00', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}

          Message: JAVA-381: Some cleanup from code review
          Branch: master
          https://github.com/mongodb/mongo-java-driver/commit/fac59153f5ced9ed7eda92366c6b9f5a43b4022b

          Show
          auto
          added a comment - Author: {u'date': u'2012-07-20T07:18:59-07:00', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'} Message: JAVA-381 : Some cleanup from code review Branch: master https://github.com/mongodb/mongo-java-driver/commit/fac59153f5ced9ed7eda92366c6b9f5a43b4022b
          Hide
          auto
          added a comment -

          Author:

          {u'date': u'2012-08-13T17:45:29-07:00', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

          Message: JAVA-381: Removed over-synchronized methods. Thanks to Franklin Nwankwo for pointing it out.
          Branch: master
          https://github.com/mongodb/mongo-java-driver/commit/3fb3f07b5587c74193407b2633296979f40727c9

          Show
          auto
          added a comment - Author: {u'date': u'2012-08-13T17:45:29-07:00', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'} Message: JAVA-381 : Removed over-synchronized methods. Thanks to Franklin Nwankwo for pointing it out. Branch: master https://github.com/mongodb/mongo-java-driver/commit/3fb3f07b5587c74193407b2633296979f40727c9
          Hide
          auto
          added a comment -

          Author:

          {u'date': u'2012-08-16T07:09:10-07:00', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}

          Message: JAVA-381: Improved the Javadoc
          Branch: master
          https://github.com/mongodb/mongo-java-driver/commit/53edd86f65a6e413a3e4fb7b8498738551ef13db

          Show
          auto
          added a comment - Author: {u'date': u'2012-08-16T07:09:10-07:00', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'} Message: JAVA-381 : Improved the Javadoc Branch: master https://github.com/mongodb/mongo-java-driver/commit/53edd86f65a6e413a3e4fb7b8498738551ef13db
          Hide
          auto
          added a comment -

          Author:

          {u'date': u'2012-08-20T17:59:39-07:00', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}

          Message: JAVA-381: Partially reverted last change. The synchronization does have to be outside the null check, otherwise it's a race condition and the notification may never be received
          Branch: master
          https://github.com/mongodb/mongo-java-driver/commit/5dbfb40bb4d5afd2fc7b66e2726da4ea6a09103f

          Show
          auto
          added a comment - Author: {u'date': u'2012-08-20T17:59:39-07:00', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'} Message: JAVA-381 : Partially reverted last change. The synchronization does have to be outside the null check, otherwise it's a race condition and the notification may never be received Branch: master https://github.com/mongodb/mongo-java-driver/commit/5dbfb40bb4d5afd2fc7b66e2726da4ea6a09103f
          Hide
          Jeff Yemin
          added a comment -

          Closing as part of 2.9.0 release process.

          Show
          Jeff Yemin
          added a comment - Closing as part of 2.9.0 release process.

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                1 year, 34 weeks ago
                Date of 1st Reply: