TTFB (Time to first byte)

I wonder if someone could answer my questions about TTFB:

What can be done on the server to speed up TTFB for a first time visitor? The main issue is TTFB for the very first visitor. (I don’t use CDN but I tested locally)

when I PING I get in average 0.045ms for the IP, so that is awesome! There is no domain connected to the IP. But when I go to the IP address with Chrome TTFB is going up and down from 1.5s to 3.5s from time to time.

The file is 123kb and content download is around 0,5-1ms. Initial connection is 1,7ms and stalled is 1,6ms

When I turn on simple gzip cache in nginx.conf the file that was 123kb is now only 18kb. DNS lookup, connecting and sending are 0ms. TTFB is between 1.1 to 1,6s and content download is 0-1ms.

I’m not sure where to start searching for the issue? Redis frontend cache and session is installed and working, haven’t tried to see what happens with the TTFB if Redis is turned on yet because the main issue is not TTFB when the site is cached, the main issue is TTFB for the very first visitor.

Maybe not much I can do about it?

i run a droplet with 4gb ram, centos 7, nginx 1.6.2, php 5.6 with opcache and mariadb 10. I run magento on the droplet.

Any suggestions for what and where I should look are grateful !!

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Have you guys this problem with another services, like postgre, ssh, ftp, etc? all services running here appear to be slow on the fist connection, and send files over ftp … sux

We also have slow TTFB with our Digital Ocean server. The server spec is high (with little load) and we are running a CDN but a lot of our content is dynamic so needs to be pulled directly from the source.

Unfortunately we had to move from DO Spaces to S3 recently because of performance issues, it would be a real shame to have to do the same for our servers.

We really like DO but the issues we have faced have a direct impact on SEO and general visitor experience.

I have similar problems with ttfb. Even with cloudflare I am getting info message on pagespeed insights.

Tried also with varnhish caching to nginx pagespeed module, 2 droplets 4 GB and 3 GB. Same thing.

Hi DO, any chance to fix this issues about TTFB?