Report this

What is the reason for this report?

How can I improve the TTFB?

Posted on July 7, 2014
till

By till

Heya!

I’m running Nginx on a 512MB Debian 7 Droplet in Amsterdam. The time-to-first-byte is between 400-500ms for static files/pages and funnily enough for a WordPress installation as well.

I’d like to get that down to 100ms, maybe 200ms. Is that a good goal, or are 500ms already good? How do I get that number down without using Varnish? Can I tweak Nginx some way, or would a hardware upgrade change it?

Cheers, Till



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!

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.

Your solution is awesome and working fine but We are facing an issue with our Magento 2 Application and it gets cached everything.

TTFB for our application is always keep between 1s to 2s. I have checked the Magento application execution time which keeps around 400-600ms to complete the execution of the request.

Please find the details about application.

  1. Magento 2.1.7 Application
  2. Our application is hosted on Google Cloud with load balancer, varnish container for full page cache, Redis container for session storage, RDS (mysql) and two instances with nginx
  3. SSL integrated site
  4. CDN: Cloud Front for static content (media and assets files)

I am working to resolve the issue since last 2 months but not able to find any such solutions for the same.

Please provide any suggestions for the same.

Thanks. Paresh

That helped me!

Thanks!!!

Be ware, that caching will also cache the simplest dynamic content, like:

<?php echo date('Y-m-d H:i');?>

will be displayed as cached content (that exact minute, when the current page was last time cached) and not change until cache expire

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.