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

Change the hello command on mongos to handle requests with the loadBalanced flag

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 5.1.0-rc0, 5.0.7
    • None
    • None
    • Fully Compatible
    • v5.0
    • Service Arch 2021-09-06
    • 4

    Description

      This behavior only applies to the initial hello command on a connection. Any subsequent hello commands executed on a connection are not subject to these constraints.

       

      hello request/connection mode Connections established with the Proxy Protocol Connections established without the Proxy Protocol
      loadBalanced = true Response must include a serviceId field of type ObjectID, which the server will generate at process start. Response will be the normal hello response, not containing the serviceId. The load balancer specification for drivers states that: “When the server's hello response does not contain a serviceId field, the driver MUST throw an exception with the message "Driver attempted to initialize in load balancing mode, but the server does not support this mode."” So there is no need to do anything special or return an error from mongos in this case.
      loadBalanced = false (or absent) Return an error with a message “The server is being accessed through a load balancer, but this driver does not have load balancing enabled.” and an error code LoadBalancerSupportMismatch. Response will be the normal hello response, not containing the serviceId.

      Attachments

        Issue Links

          Activity

            People

              billy.donahue@mongodb.com Billy Donahue
              matthew.saltz@mongodb.com Matthew Saltz
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: