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

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0-rc0, 5.0.7
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • v5.0
    • Service Arch 2021-09-06
    • 4

      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.

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

              Created:
              Updated:
              Resolved: