• Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      Background
      The Go driver by default uses the net.Dialer configured in connection_options.go. The behavior of net.Dialer’s DNS resolution is described here https://golang.org/pkg/net/#hdr-Name_Resolution.

      By default the pure Go resolver is used, because a blocked DNS request consumes only a goroutine, while a blocked C call consumes an operating system thread. When cgo is available, the cgo-based resolver is used instead under a variety of conditions:

      In the uncommon case that cgo is used, the system cache may be used. But otherwise the Go runtime explicitly does not cache DNS results. The proposal was rejected in https://github.com/golang/go/issues/24796.
       

       

      Scope

      Determine a caching policy add support for caching DNS results. Consider if this could negatively impact existing users if we change the default behavior (if so, consider making this opt-in).

            Assignee:
            qingyang.hu@mongodb.com Qingyang Hu
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            3 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: