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

Make expected TCP KeepAlive behavior explicit

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.12.2
    • Affects Version/s: None
    • Component/s: Networking
    • None
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      The Go driver currently omits a KeepAlive configuration on the dialer used to dial new TCP connections, allowing the Go net package to use the default KeepAlive configuration (the default since Go 1.11 is KeepAlive enabled with an interval of 15s). Using the default was introduced with GODRIVER-37/DRIVERS-383 (see code review) and has been the behavior of the Go driver since v1.0

      However, there are proposals to change the default KeepAlive behavior, either for all applications or in specific circumstances, like when the compile target is Android or iOS (see relevant issue). We should consider setting an explicit KeepAlive or continue using the default and document the rationale and desired behavior.

      Definition of done:

      • Investigate the pros/cons of explicitly setting TCP KeepAlive in the Go driver.
      • If we decide to not explicitly enable KeepAlive in the Go driver, document the rationale here and in a comment in the code where the default dialer is constructed (here).

            Assignee:
            qingyang.hu@mongodb.com Qingyang Hu
            Reporter:
            matt.dale@mongodb.com Matt Dale
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: