Blog Post

Why You Should Be Measuring Time to Last Byte

Published
December 7, 2017
#
 mins read
By 

in this blog post

This post was written in partnership with Teridion.

The end of the year is a time for reflection. It’s when most of us are looking back at the choices, accomplishments, and mistakes of the year prior and setting goals to improve the following year. It’s also when businesses analyze the year’s trends and behaviors to determine necessary strategic changes to be made; however, if you aren’t analyzing the right metrics, such reflection is a useless effort.

Below is an excerpt from an article provided by Elad Rave, founder and CTO of Teridion, explaining why TTLB (Time to Last Byte) should be one of the performance metrics on your radar.

TTFB (Time to First Byte) is the amount of time it takes to receive the first byte from the server. A browser sends a request; it then gets to the web server, where it might call a database, some other logic, maybe even another server or service. When done, it starts sending the response back to the browser. So, TTFB actually measures the time the browser request was waiting for the server to finish running its logic.

For SaaS and content providers, this is important, of course. It measures the effectiveness of the backend code such as DB performance and all other backend components. As a matter of fact, in many cases, this is also the only thing directly in their control. Once the web response starts its journey over the Internet, there is nothing anyone can do.

Think about it: Formula One cars are engineered to perfection but put them in the Silicon Valley traffic and they will be stuck like the rest of us. So as good as developers, DevOps, and SREs are, all they can do is improve the TTFB.

Even if the first byte is really quick, unless all the bytes get to you, it’s not relevant from the end user perspective.

We should actually care about four things during performance analysis:

  • TTFB
  • Time to Last Byte (TTLB)
  • Document Complete
  • The ratio TTFB/TTLB

Now that you know what TTFB is, it’s easy to understand that TTLB is the time it takes until the last byte is received by the browser (or client). Only then does the computer assemble the data and do something with it. Since a web page has many components (CSS, Javascript, images, etc.), there will be a TTLB for each of them.

Only once the last byte of all components is received by the browser/client–the Document Complete–can the user actually enjoy the web page.

The ratio between the TTFB and TTLB is critical. This is also known as “throughput” or “how fast can you move a chunk of data from the server to the client” (or as I call it, HFCYMACODFTSTTC). If the time from TTFB to TTLB is short, your connection is good.

The key thing is that as a developer/DevOps/SRE, you can (and should) control the TTFB. You can also improve the Document Complete using many known methods. While caching your static resources on a CDN will help, there are limited ways to improve the ratio between the TTFB and the TTLB for the many dynamically generated components of modern applications and websites. Learn more about improving throughput with Teridion Kumo-X.

For more web performance tips, check out our Web Performance 101 blog series.

This post was written in partnership with Teridion.

The end of the year is a time for reflection. It’s when most of us are looking back at the choices, accomplishments, and mistakes of the year prior and setting goals to improve the following year. It’s also when businesses analyze the year’s trends and behaviors to determine necessary strategic changes to be made; however, if you aren’t analyzing the right metrics, such reflection is a useless effort.

Below is an excerpt from an article provided by Elad Rave, founder and CTO of Teridion, explaining why TTLB (Time to Last Byte) should be one of the performance metrics on your radar.

TTFB (Time to First Byte) is the amount of time it takes to receive the first byte from the server. A browser sends a request; it then gets to the web server, where it might call a database, some other logic, maybe even another server or service. When done, it starts sending the response back to the browser. So, TTFB actually measures the time the browser request was waiting for the server to finish running its logic.

For SaaS and content providers, this is important, of course. It measures the effectiveness of the backend code such as DB performance and all other backend components. As a matter of fact, in many cases, this is also the only thing directly in their control. Once the web response starts its journey over the Internet, there is nothing anyone can do.

Think about it: Formula One cars are engineered to perfection but put them in the Silicon Valley traffic and they will be stuck like the rest of us. So as good as developers, DevOps, and SREs are, all they can do is improve the TTFB.

Even if the first byte is really quick, unless all the bytes get to you, it’s not relevant from the end user perspective.

We should actually care about four things during performance analysis:

  • TTFB
  • Time to Last Byte (TTLB)
  • Document Complete
  • The ratio TTFB/TTLB

Now that you know what TTFB is, it’s easy to understand that TTLB is the time it takes until the last byte is received by the browser (or client). Only then does the computer assemble the data and do something with it. Since a web page has many components (CSS, Javascript, images, etc.), there will be a TTLB for each of them.

Only once the last byte of all components is received by the browser/client–the Document Complete–can the user actually enjoy the web page.

The ratio between the TTFB and TTLB is critical. This is also known as “throughput” or “how fast can you move a chunk of data from the server to the client” (or as I call it, HFCYMACODFTSTTC). If the time from TTFB to TTLB is short, your connection is good.

The key thing is that as a developer/DevOps/SRE, you can (and should) control the TTFB. You can also improve the Document Complete using many known methods. While caching your static resources on a CDN will help, there are limited ways to improve the ratio between the TTFB and the TTLB for the many dynamically generated components of modern applications and websites. Learn more about improving throughput with Teridion Kumo-X.

For more web performance tips, check out our Web Performance 101 blog series.

This is some text inside of a div block.

You might also like

Blog post

Preparing for the unexpected: Lessons from the AJIO and Jio Outage

Blog post

Use the Catchpoint Terraform Provider in your CI/CD workflows

Blog post

Achieving stability with agility in your CI/CD pipeline