Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-4936

Switch to polling monitoring when running within a FaaS environment

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0
    • Affects Version/s: None
    • Component/s: Cluster Management, FaaS
    • Labels:
      None
    • 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
    • Minor Change
    • Needed
    • Hide

      There are two new features and an improvement:

      Show
      There are two new features and an improvement: New feature . The server monitoring protocol can now be configured either via the new serverMonitoringMode option of ConnectionString , or via the new ServerSettings.Builder.serverMonitoringMode method. New feature . The new method ServerHeartbeatStartedEvent.isAwaited was added. It is similar to the existing ServerHeartbeatSucceededEvent / ServerHeartbeatFailedEvent.isAwaited methods. Improvement . MongoClient by default uses the polling protocol for server monitoring when running in the function-as-a-service (FaaS) environment, instead of using the streaming protocol like it has been doing . The streaming protocol uses long polling, which causes server responses to accumulate if the process running the MongoClient is paused (this is not uncommon in a FaaS environment). Once the process is unpaused, the MongoClient had to process all the accumulated responses despite them being useless by that time.

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

            Assignee:
            valentin.kovalenko@mongodb.com Valentin Kavalenka
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: