0 Shares 5228 Views

How Time To First Byte (TTFB) Impacts Your Site’s Performance

Let’s all agree that your website speed can be subject to many factors. While it’s hard to break down all of them, it’s still not impossible. In this context, one of the metrics you can try to interpret and improve is Time To First Byte (TTFB). 

Through this article, we’ll walk you through essential information that will help you assimilate the impact of this metric on web performance.

So, what is Time To First Byte (TTFB) anyways?

Time To First Byte (TTFB) is the name given to the time between the first request of the end-user to a web server and the response back of that request from the webserver to the end-user.

Resolving the address of the site using a DNS and retrieving the response of the first request sent to the site are the factors that cause this time to occur.

In other words, this period will occur in 3 steps and the performance in these stages will play an active role in the duration of TTFB.

Step1: Submitting the first request to the site address

Important factors in this step may be:

  • DNS response time (how fast is the end-user’ side for resolving DNS request)
  • The distance of the website servers to the end-user, shorter the better.
  • Stability of the network

Step 2: Resolving this request by the webserver

Important factors in this step may be:

  • Physical hardware response time (how fast the web server can resolve it)
  • The existing workload of the server  operations
  • Any network-related latency within the datacenter.

Step 3: Sending the first response to the end-user

Important factors in this step may be:

  • The end-users internet speed
  • Stability of the connection.

What is considered as good TTFB and what is not?

In fact, this may vary according to the content of your site. Depending on the proportion of dynamic and static data in the content of the site, good or bad evaluation will vary. In general, many speed test tools give ranges as following:

  •   0 – 75ms Perfect
  •   75 – 200ms Ideal
  •   200 – 500ms Less than ideal but acceptable
  •   > 500ms There is a problem

However, the fact that the site is entirely composed of dynamic data can increase these ranges. Determining a TTFB based on the content of the site will always make more sense.

What can make TTFB slow? 

Network problems that exist in Steps 1 and 3 (mentioned above) will increase TTFB.

Similarly, in step 2, during the processing of the request, older hardware and problems on Disk or RAM may cause a slowdown.

Low I/O values on the disk will prevent processing fast and will queue too many requests.

Likewise, if the server hardware is not enough for the operations or there is an instant flood of requests, they will end up with an increasing TTFB.

Additionally, poorly optimized code, database, and web server configuration may cause a delay in meeting incoming requests.

Finally, high-level software that meets and processes requests through the server will also cause slowdowns.

So now that you are able to determine the pain points, let’s see how you can increase TTFB speed

The initial response time can be reduced by:

  • Presenting static data at first boot
  • Using a Content Delivery Network, i.e. having your site content closer to end-users.
  • Code Optimization: the settings of the software language used, and the performance of the encoding can be improved to accelerate the first rendered page.
  • Database Query Optimization: database normalization and database operations must be overhauled.
  • Data Caching in Memory
  • Using the latest hardware as much as possible such as new CPUs, SSD or NVME for I/O.

The impact of CDN on TTFB

Basically, this is what you get when you use a robust CDN:

  • All queries start with a DNS request. So a CDN using Anycast DNS will use the closest DNS server and speed up your web site. 
  • Better Routing on the requests, i.e. every request is routed to the closest server
  • With static data transferred onto the CDN, origin servers will only be used for new content. Your web site will not use origin hardware resources for CDN cached content or requests.
  • More hardware resources are available.

The impact of TTFB on web performance

In fact, TTFB is indirectly related to the performance of subsequent transactions since the first byte is the return period.

Optimizations to reduce TTFB will ensure that your site’s post-TTFB operations will be more efficient. Operations that can be performed to have a good TTFB pave the way for subsequent I/O operations to be faster.

On the other side of the spectrum, the user experience will get much better with higher performance. Because your site will load faster, and the probability of losing the user until the page opens becomes considerably reduced. 

At this point, we assume you’ve accumulated a better understanding of TTFB. If you feel the need to reevaluate your site’s performance, our team of experts has elaborated a FREE assessment program to help you measure the performance of your website, by filling out this form, the detailed report will be sent to you within 24 hours. 

Additionally, you can use our CDN Free Trial as a starting point for an improved TTFB. Make sure to contact our support team if you need any help.

You may be interested

The Ultimate CDN (Content Delivery Network) Guide
CDN
5180 views
CDN
5180 views

The Ultimate CDN (Content Delivery Network) Guide

Nadia Benslimane - August 3, 2020

The Ultimate CDN Guide- Everything About Content Delivery Network You probably know what CDN (Content Delivery Network) stands for. You may also be aware of its full definition,…

The Essential CDN Glossary
CDN
9630 views
CDN
9630 views

The Essential CDN Glossary

Nadia Benslimane - November 21, 2019

Why Have We Decided To Create a CDN Glossary? Whether you are new to the world of CDN, or have been involved in it for years, there…

All You Need to Know About Round-Trip Time
CDN
19 views
CDN
19 views

All You Need to Know About Round-Trip Time

Nilgün Ünsal - October 20, 2021

What exactly is RTT?  Round-trip time (RTT) is a networking metric that measures in milliseconds the time it takes for a data packet to be sent and…

SD-WAN in CDNs
CDN
19 views
CDN
19 views

SD-WAN in CDNs

Elif Ak - October 20, 2021

What is SD-WAN? As the name implies, a software-defined wide area network (SD-WAN) is a virtual wide area network (WAN) architecture that enables enterprises to securely connect…

Health Check Backup Origin
CDN
34 views
CDN
34 views

Health Check Backup Origin

Nilgün Ünsal - October 17, 2021

ORIGIN SERVER AND LATENCY ON ORIGIN SERVER In a nutshell, the term "origin server" is used on behalf of the original content owner that responds to incoming…

Most from this category

The Ultimate CDN (Content Delivery Network) Guide
CDN
5180 views
5180 views

The Ultimate CDN (Content Delivery Network) Guide

Nadia Benslimane - August 3, 2020
The Essential CDN Glossary
CDN
9630 views
9630 views

The Essential CDN Glossary

Nadia Benslimane - November 21, 2019
Web Application Firewall
CDN
414 views
414 views

Web Application Firewall

Aykut Teker - September 29, 2021
SERVICE MESH vs. API GATEWAY
Technology
1781 views
1781 views

SERVICE MESH vs. API GATEWAY

medianova - August 24, 2021