Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-1983

Update load balancer tests to support dedicated load balancer port

    XMLWordPrintable

Details

    • Needed
    • Hide

      Implementation notes for drivers:

      • Drivers must update their load balancer test runs in Evergreen to run on "latest", and then may choose to use 5.2.0 GA and higher for the runs when available.
      • Drivers must remove the use of service ID mocking (e.g. FAKE_MONGODB_SERVICE_ID) in their code.
      • Drivers must set the LOAD_BALANCER environment variable to "true" in their load balancer test runs and pass the environment variable when invoking run-orchestration.sh.
      • Drivers may need to make changes to their test runners if they had direct connections to the mongos in their tests with the "loadBalanced=true" URI option set. (Such as utility clients - they must go through the load balancer now in these cases.)

      See: https://github.com/mongodb-labs/drivers-evergreen-tools/pull/183
      See: https://github.com/mongodb/node-mongodb-native/pull/3089

      Show
      Implementation notes for drivers: Drivers must update their load balancer test runs in Evergreen to run on "latest", and then may choose to use 5.2.0 GA and higher for the runs when available. Drivers must remove the use of service ID mocking (e.g. FAKE_MONGODB_SERVICE_ID ) in their code. Drivers must set the  LOAD_BALANCER  environment variable to "true" in their load balancer test runs and pass the environment variable when invoking run-orchestration.sh . Drivers may need to make changes to their test runners if they had direct connections to the mongos in their tests with the "loadBalanced=true" URI option set. (Such as utility clients - they must go through the load balancer now in these cases.) See:  https://github.com/mongodb-labs/drivers-evergreen-tools/pull/183 See:  https://github.com/mongodb/node-mongodb-native/pull/3089

    Description

      Summary

      With the introduction of SERVER-60679, load balancers are now required to connect over a dedicated port separate from the normal mongo port. The test run by this script currently tries to connect to the normal port and will no longer function properly. Instead, this test should configure mongos with the --loadBalancerPort option (also enabling loadBalancerSupport in general), and the test should connect to that port instead. The load balancer should also be configured to emit a V1 or V2 proxy protocol header (this can be done by simply adding send-proxy or send-proxy-v2 to the end of the server line in the backend specification in haproxy). We may also want to consider testing:

      • both V1 and V2 headers work
      • connecting to the load balancer port without emitting a header correctly errors out upon sending regular traffic
      • connecting to the regular port with a proxy protocol header correctly errors out

      Note that as part of SERVER-60679, this testing was done by hand, so all of the above behaviors have been observed to work properly. Once the necessary updates to this test are complete, we can merge these changes and properly version them against each other. Please coordinate with tyler.seip.

      Motivation

      Who is the affected end user?

      Teams internally who depend on our tests passing

      How does this affect the end user?

      This shouldn't affect the end user

      How likely is it that this problem or use case will occur?

      Guaranteed after SERVER-60679 is merged (which it won't be until these changes are made)

      If the problem does occur, what are the consequences and how severe are they?

      Test failure

      Is this issue urgent?

      Not urgent, but high priority

      Is this ticket required by a downstream team?

      Yes (Service Architecture for doing SERVER-58207)

      Is this ticket only for tests?

      Yes

      Attachments

        Issue Links

          Activity

            People

              durran.jordan@mongodb.com Durran Jordan
              tyler.seip@mongodb.com Tyler Seip (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: