Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(NODE-5986): parallelize SRV/TXT resolution #4012

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

addaleax
Copy link
Contributor

@addaleax addaleax commented Mar 4, 2024

Just a small thing I noticed while looking at the driver code, this is a quick win to improve connection establishment performance.

Description

What is changing?

Is there new documentation needed for these changes?

What is the motivation for this change?

Release Highlight

Query SRV and TXT records in parallel

When connecting using a convenient SRV connection string (mongodb+srv://) hostnames are obtained from an SRV dns lookup and some configuration options are obtained from a TXT dns query. Those DNS operations are now performed in parallel to reduce first-time connection latency.

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

Just a small thing I noticed while looking at the driver code, this is
a quick win to improve connection establishment performance.
@durran durran self-assigned this Mar 4, 2024
@durran durran added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Mar 4, 2024
@nbbeeken nbbeeken self-requested a review March 4, 2024 15:52
@durran
Copy link
Member

durran commented Mar 4, 2024

Just verifying from spec: "TXT records MAY be queried either before, in parallel, or after SRV records."

@durran durran added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Mar 4, 2024
@nbbeeken nbbeeken changed the title chore(NODE-5986): parallelize SRV/TXT resolution perf(NODE-5986): parallelize SRV/TXT resolution Mar 4, 2024
@durran durran merged commit eab8f23 into mongodb:main Mar 4, 2024
21 of 26 checks passed
@addaleax addaleax deleted the 5986-dev branch March 4, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
3 participants