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

Diagnostics for time spent sending responses to ingress queries

    • Service Arch 2022-06-13, Service Arch 2022-06-27, Service Arch 2022-07-25, Service Arch 2022-08-08, Service Arch 2022-08-22, Service Arch 2022-09-19, Service Arch 2022-10-03

      Sending the response for an operation to the client is done after we finish timing the operation, so if there is a delay due to network congestion this does not show up in logged slow queries nor in active connections, making it difficult to diagnose.

      Some suggested improvements:

      • Move the point at which an operation is considered completed until after the send() for the response has completed, so that that time is included in the slow query logging and the connection is considered active until that point. This may be a substantial code change, and it may also have downstream effects on log consumers since it will generally result in more and longer logged slow queries, so one or both of the following may be preferrable.
      • Separately time the interval from completion of the query to the point where the send() has completed, and log it if it exceeds a threshold (e.g. slowms).
      • Introduce a new connection state, say "transmitting", that a connection is in from the time the operation completes until the send() has completed, and report the number of connections in that state in serverStatus.connections.

            Assignee:
            matt.diener@mongodb.com Matt Diener (Inactive)
            Reporter:
            bruce.lucas@mongodb.com Bruce Lucas (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated:
              Resolved: