0 Shares 4814 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
4388 views
CDN
4388 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
9212 views
CDN
9212 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…

A Story About The Battle of Logging
CDN
57 views
CDN
57 views

A Story About The Battle of Logging

Elif Ak - July 12, 2021

Networking and computing systems generate a deluge of logs in seconds. Analyzing these voluminous logs without human interference plays a crucial role in autonomous management. Just as…

The Monthly Website Performance Monitoring Checklist
Uncategorized
265 views
Uncategorized
265 views

The Monthly Website Performance Monitoring Checklist

Nadia Benslimane - June 28, 2021

Your Website Promotes You 24/7, Make Sure It’s Performing Well In 2021, it's no longer a surprise that the performance of your website needs to be at the…

AVIF: All You Need To Know About This New Image File Format
New Features
338 views
New Features
338 views

AVIF: All You Need To Know About This New Image File Format

Nilgün Ünsal - June 25, 2021

AVIF: The New Image Format Today, everyone has thousands of pictures on their phones and computers. In e-commerce or fashion sites, this number reaches up to millions.…

Most from this category