23 Dec 2017 07:54 AM - last edited on 22 Nov 2021 11:43 AM by MaciejNeumann
In this particular example, the server time is 0.1s while TTFB is 0.5s. Why is there a discrepancy between server time and TTFB ? Shouldn't server time equivalent to TTFB ?
Solved! Go to Solution.
02 Jan 2018 04:04 PM
Server time is going to be the time spent receiving the request and creating and sending the response back to the client on the server side. Time to first byte is going to be the time from when the request is sent from the client to when the first byte of the response is received from the server - so this will include transport/network time.
So TTFB should always be higher than the server time.
James
02 Jan 2018 10:34 PM
Nevertheless, there can be scenario where TTFB is equal to server time. Does this mean in this case, the transport time/network time is negligible ?
03 Jan 2018 02:29 PM
I suppose it's possible that in a very low latency environment that they will be nearly equal. They might appear the same after being rounded but there will always be some transport time.
04 Jan 2018 01:47 PM
These metrics are based on the W3C navigation timings, so please take also a look at: https://www.w3.org/TR/navigation-timing/#processin...
Please look also at: What are the exact definitions of the Action Duration Contributors?
Please, let me know if that helps.
05 Jan 2018 01:09 AM
@ Alexander S.
Good stuff. It helps.
From the formula above, it is clear that TTFB > Server time.
Secondly, am I right to say that the network consumption formula below includes time to redirect, time to resolve the DNS and time to establish the TCP connection ?