Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-84289

Differentiate between network timeouts and connection failures in gRPC

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Networking & Observability

      grpc::Client currently uses WaitForConnected in its establishment logic, which as its name suggests, will wait for the provided amount of time for the gRPC channel to enter the CONNECTED state. However, the channel may make several attempts to reconnect up until the timeout is hit, including backoff and jitter. This is different behavior than asio, which will immediately report connection errors (e.g. Connection refused errors if the remote is down).

      We should update this logic to stop after the first attempt fails. As an example of how this may affect things, the shell will no longer need to wait the full connectTimeout when attempting to reach a down server.

            Assignee:
            erin.mcnulty@mongodb.com Erin McNulty
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: