Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-2045

Cache DNS results

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Unknown Unknown
    • None
    • None
    • None

    Description

      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).

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: