N
N
Nikolay372021-12-22 21:18:53
JavaScript
Nikolay37, 2021-12-22 21:18:53

Is it possible to find out the time for which the request comes to the server?

I send a request to NodeJS to the server, I want to know the time when the server will accept my request (exactly in one direction), and not the total time. Or at least approximately in what% ratio (sent a request / came) this time passes, if you really know this, thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2021-12-22
@Nikolay37

Logging and synchronization of the exact time on the server and client.
The exact moment (milliseconds) when the request 'came' to the server depends on the point at which the measurement occurs, for example, if measured using nginx (running on the server) and, for example, the moment when the cgi script starts (the first line of which is to record the time in the log ) - will differ by ten milliseconds.
The reason is how the request is processed, asynchronously or not (the script can accept it either at the moment the first network packet arrives, or with the last one).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question