Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-5197

Switch to polling monitoring when running within a FaaS environment

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0
    • Affects Version/s: None
    • Component/s: FaaS
    • None
    • 3
    • 3
    • Hide

      DRIVERS-2578:
      In this change drivers will:

      • Disable streaming SDAM by default on AWS Lambda and similar FaaS platforms.
      • Introduce the serverMonitoringMode=stream/poll/auto URI option.
      • Add Unified Test Format version 1.17 to add support for server heartbeat events and asserting on the "awaited" field.
      • Ensure that clients MUST NOT use dedicated connections to measure RTT when using the polling protocol.

      See the spec changes in: https://github.com/mongodb/specifications/commit/14a6c8134d0c3038cdaa34bb33bcebbb3a545ca8
      And the Python implementation: https://github.com/mongodb/mongo-python-driver/commit/4c00227c1d350a64d1af6672cb6de26072082b81

      Show
      DRIVERS-2578 : In this change drivers will: Disable streaming SDAM by default on AWS Lambda and similar FaaS platforms. Introduce the serverMonitoringMode=stream/poll/auto URI option. Add Unified Test Format version 1.17 to add support for server heartbeat events and asserting on the "awaited" field. Ensure that clients MUST NOT use dedicated connections to measure RTT when using the polling protocol. See the spec changes in: https://github.com/mongodb/specifications/commit/14a6c8134d0c3038cdaa34bb33bcebbb3a545ca8 And the Python implementation: https://github.com/mongodb/mongo-python-driver/commit/4c00227c1d350a64d1af6672cb6de26072082b81
    • Not Needed
    • v4.x
    • Hide

      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.

      Show
      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.
    • Needed
    • Hide

      A new connection string option, serverMonitoringMode as well as a MongoClient option of the same name has been added. The value of this option dictates the bahvior of each connections monitor. Values are:

      • "auto": This is the default and will always use the streaming protocol unless in a FaaS environment or the server does not support it.
      • "poll": This forces the monitor to use the polling protocol.
      • "stream": This forces the monitor to use the streaming protocol.
      Show
      A new connection string option, serverMonitoringMode as well as a MongoClient option of the same name has been added. The value of this option dictates the bahvior of each connections monitor. Values are: "auto": This is the default and will always use the streaming protocol unless in a FaaS environment or the server does not support it. "poll": This forces the monitor to use the polling protocol. "stream": This forces the monitor to use the streaming protocol.

      This ticket was split from DRIVERS-2578, please see that ticket for a detailed description.

      Acceptance Criteria:

      • Update FaaS automated tests to assert that no awaited=true flags are set on the server heartbeat started events.
      • Add serverMonitoringMode (stream|poll|auto) to URI options and MongoClientOptions
      • Update monitor behaviour to poll or stream based on options or environment.
      • Ensure dedicated connection is used for RTT pinging in polling mode.
      • Update Unified test runner to work with schema 1.17
      • Sync SDAM unified tests
      • Sync URI options tests

            Assignee:
            durran.jordan@mongodb.com Durran Jordan
            Reporter:
            dbeng-pm-bot PM Bot
            Durran Jordan, Warren James
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: