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

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1.0
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Service Arch 2021-09-06
    • Story Points:
      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

              Assignee:
              billy.donahue Billy Donahue
              Reporter:
              matthew.saltz Matthew Saltz
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: