[DRIVERS-2083] Codify rules around Driver connection DNS Created: 21/Feb/19  Updated: 09/Jan/24  Resolved: 09/Jan/24

Status: Closed
Project: Drivers
Component/s: CMAP, SDAM
Fix Version/s: None

Type: Spec Change Priority: Major - P3
Reporter: Daniel Aprahamian (Inactive) Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: maintainers-close
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
Driver Changes: Needed

 Description   

@xdg brought up that it would be a good idea to specify a few points about Driver DNS in CMAP. Specifically:

1. Drivers MUST NOT cache DNS results, and always MUST perform a DNS lookup when creating a new connection
2. Drivers MUST document that DNS Round Robin is not supported, and that Drivers run on the assumption that a host:port combo uniquely maps to a single mongod/mongos.

This might be related to the work in SPEC-1205.



 Comments   
Comment by Valentin Kavalenka [ 09/Jan/24 ]

bailey.pearson@mongodb.com and I decided to close this old ticket after re-triaging it.

Comment by Valentin Kavalenka [ 12/Oct/23 ]

The discussion copied from the duplicate DRIVERS-1113.

Divjot Arora (Inactive)

shane.harvey neal.beeken Patrick and I talked about this when looking at SPEC-1225. We think this probably belongs in a separate spec that talks about low-level connection details similar to what SPEC-1205 proposes. Do you have any thoughts on this?

Shane Harvey

Either a new spec or CMAP sounds fine to me. It would be good to document TCP keepalive as well. The current "keepalive spec" exists only in Jira (DRIVERS-383 and DRIVERS-1228).

Divjot Arora (Inactive)

Patrick and I think that adding this to the CMAP spec would overload an already complicated spec. Maybe we could add a new "connection establishment" spec or increase the scope of the handshakes one?

Comment by Jeffrey Yemin [ 25/Feb/19 ]

david.golden sure, that's totally fine with me.

Comment by David Golden [ 25/Feb/19 ]

jeff.yemin, the intent is for drivers to only ever rely on their environment's DNS resolver's caching (and TTL management/configuration) and not – for example – store the resolved IP address in the driver and never do a DNS lookup call again. If we clarify that point, are you OK with it being "MUST"?

Comment by Jeffrey Yemin [ 25/Feb/19 ]

The JVM, and likely other runtime environments, provide only global, application-level control over DNS caching. See networkaddress.cache.ttl documentation at https://docs.oracle.com/javase/8/docs/technotes/guides/net/properties.html. I suggest making this a SHOULD at most.

Comment by David Golden [ 22/Feb/19 ]

Might go in both places.  In particular, CMAP covers creating connections, so DNS lookup seemed more natural there. But it's true for SDAM connections, too, which don't use a connection pool.

Comment by Ian Whalen (Inactive) [ 22/Feb/19 ]

note that the clarification here should prob be in SDAM not CMAP.

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