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. |
- depends on
-
SERVER-58499 Add a new error code LoadBalancerSupportMismatch
- Closed
-
SERVER-58500 Change hello command on mongos to return a serviceID for load-balanced connections
- Closed
- is depended on by
-
PHPC-1752 Load Balancer Support
- Development Complete
-
SERVER-58500 Change hello command on mongos to return a serviceID for load-balanced connections
- Closed
-
PYTHON-2712 Remove topologyVersion fallback when serviceId is not present
- Closed
-
NODE-3431 Remove Mocked Service Id When Server Supports Load Balancing
- Closed
- is related to
-
SERVER-58562 Add a boolean field _isFromLoadBalancer to Client
- Closed
- related to
-
DRIVERS-1983 Update load balancer tests to support dedicated load balancer port
- Implementing