Share
Reduce server response times (TTFB)
May 2, 2019
Reading: Reduce server response times (TTFB)
Updated Oct 4, 2019 Appears in :Performance audits The Opportunities department of your Lighthouse report reports Time to First Byte, the time that it takes for a drug user ‘s browser to receive the first base byte of foliate content :
Slow server response times affect performance #
This audit fails when the browser waits more than 600 meter for the server to respond to the main text file request. Users dislike when pages take a long time to load. Slow waiter response times are one possible cause for farseeing page loads. When users navigate to a URL in their network browser, the browser makes a network request to fetch that content. Your waiter receives the request and returns the page content. The server may need to do a lot of oeuvre in orderliness to return a page with all of the content that users want. For exercise, if users are looking at their orderliness history, the waiter needs to fetch each user ‘s history from a database, and then insert that content into the page. Optimizing the server to do work like this vitamin a promptly as possible is one way to reduce the time that users spend waiting for pages to load.
Read more: How to Embed a Google Form: Flickroom
How to improve server response times #
The first step to improving server response times is to identify the core conceptual tasks that your server must complete in ordain to return page content, and then measure how long each of these tasks takes. once you ‘ve identified the longest tasks, search for ways to speed them up. There are many possible causes of slow server responses, and therefore many possible ways to improve :
- Optimize the server’s application logic to prepare pages faster. If you use a server framework, the framework may have recommendations on how to do this.
- Optimize how your server queries databases, or migrate to faster database systems.
- Upgrade your server hardware to have more memory or CPU.
Themes, modules, and server specifications all contribute to server response time. Consider finding a more optimize theme, cautiously selecting an optimization faculty, or upgrading your server. Your hosting servers should make use of PHP opcode hoard, memory caching systems like memcached or Redis to reduce database question time, ampere well as optimized application logic to prepare pages faster. Use Magento ‘s varnish consolidation. If you are server-side rendering any react components, consider using renderToNodeStream()
or renderToStaticNodeStream()
to allow the customer to receive and hydrate different parts of the markup alternatively of all at once.
Themes, plugins, and server specifications all contribute to server answer fourth dimension. Consider finding a more optimize root, carefully selecting an optimization plugin, and/or upgrading your server. last update : october 4, 2019Improve article