Time to First Byte (TTFB) is a measure used to assess the responsiveness of a web server. It represents the time from the user's request to the first byte of the page being received by the browser. TTFB is a critical metric in web performance, as a lower TTFB means a faster start to loading a web page, leading to an improved user experience.
Factors Impacting Time to First Byte (TTFB)
The following factors have direct impact on the TTFB of a website:
1. DNS Lookup
- Description: Resolving the domain name to an IP address.
- Impact: Delays if DNS server is slow or domain name not cached.
2. TCP Connection
- Description: Establishing a TCP connection with the server.
- Impact: Affected by network latency and server load.
3. SSL/TLS Handshake
- Description: Additional handshake for secure (HTTPS) connections.
- Impact: Adds delay, especially with poor SSL/TLS setup.
4. Server Processing Time
- Description: Time taken by the server to process the request.
- Impact: Depends on server load, server-side scripts, database queries, and backend processing.
5. Network Latency
- Description: Distance between user and server.
- Impact: Longer distances increase data travel time.