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

What will be the behavior of mongos under this partial network partition

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      Consider a shard cluster:

      1. Has only one shard, but the shard has 3 replicas A, B, C
      2. Has 3 mongos instances
      3. mongos and mongod instance are running across 3 different data centers.
      4. The primary node (A) of the replica set is in Data center 1

       

      It will look like this:

      Data Center 1          |       Data Center 2             |     Data Center 3

      mongos  1                |       mongos 2                    |     mongos 3

      Primary node (A)    |       secondary node (B)   |     secondary node (C)

       

      Now, suppose there is a network partition between Data center 1 and 2, A and B cannot see each other, but C can see both. In this case, if I understand correctly, B will try to elect itself to be the primary, but it will fail because A can still see the majority of the replica sets (A and C), and C can still see A.

      In this case, if a client talks to the mongos 2 which is running in DataCenter 2, will all the read and write operation for this client fail because the network between Data Center 1 and Data Center 2 is broken, so it cannot reach the primary node?

       

      Attachments

        Activity

          People

            carl.champain@mongodb.com Carl Champain (Inactive)
            wangzicong@bytedance.com Atwood Wang
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: