[DRIVERS-2578] Switch to polling monitoring when running within a FaaS environment Created: 24/Mar/23  Updated: 12/Oct/23

Status: Implementing
Project: Drivers
Component/s: FaaS
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Alex Bevilacqua Assignee: Shane Harvey
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by DRIVERS-2246 Heartbeat build up with streaming pro... Closed
is duplicated by DRIVERS-2364 Only Process Last Monitor Heartbeat W... Backlog
Issue split
split to JAVA-4936 Switch to polling monitoring when run... Backlog
split to RUBY-3241 Switch to polling monitoring when run... Backlog
split to RUST-1631 Switch to polling monitoring when run... Backlog
split to CSHARP-4615 Switch to polling monitoring when run... In Code Review
split to CDRIVER-4615 Switch to polling monitoring when run... Closed
split to CXX-2676 Switch to polling monitoring when run... Closed
split to GODRIVER-2810 Switch to polling monitoring when run... Closed
split to MOTOR-1120 Switch to polling monitoring when run... Closed
split to NODE-5197 Switch to polling monitoring when run... Closed
split to PYTHON-3668 Switch to polling monitoring when run... Closed
split to PHPC-2281 Switch to polling monitoring when run... Closed
Related
is related to DRIVERS-2364 Only Process Last Monitor Heartbeat W... Backlog
Driver Changes: Needed
Quarter: FY24Q2
Downstream Changes Summary:

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

Engineering Lead: Steve Silvester Steve Silvester
Product Manager: Alex Bevilacqua Alex Bevilacqua
Program Manager: Esha Bhargava Esha Bhargava
Start date:
Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4615 Fixed 1.25.0
CXX-2676 Fixed 3.9.0
CSHARP-4615 In Code Review
GODRIVER-2810 Done 1.13.0, 1.13.1
JAVA-4936 Backlog
NODE-5197 Fixed 6.3.0
MOTOR-1120 Duplicate
PYTHON-3668 Fixed 4.6
PHPC-2281 Won't Fix
RUBY-3241 Backlog
RUST-1631 Backlog

 Description   

As identified by DRIVERS-2246, the streaming protocol used by SDAM monitoring when communicating with MongoDB 4.4+ clusters can result in socket timeouts when the underlying runtime environment resumes after being frozen/paused then (ex: Lambda).

Drivers should revert their SDAM monitoring process to use the legacy polling mechanism when a FaaS runtime environment is detected (DRIVERS-2209) to improve the developer experience when interacting with MongoDB from these environments.



 Comments   
Comment by Githook User [ 12/Oct/23 ]

Author:

{'name': 'Shane Harvey', 'email': 'shnhrv@gmail.com', 'username': 'ShaneHarvey'}

Message: DRIVERS-2578 Drivers use polling SDAM on AWS Lambda (#1452)

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.
Clients MUST NOT use dedicated connections to measure RTT when using the polling protocol.
Branch: master
https://github.com/mongodb/specifications/commit/14a6c8134d0c3038cdaa34bb33bcebbb3a545ca8

Comment by Shane Harvey [ 22/Aug/23 ]

Note that this change relies on the FaaS detection logic added in DRIVERS-2209.

Generated at Thu Feb 08 08:25:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.