The popularity of your website and its position in the search engine ranking is a very crucial factor that one must take care of. Search engine ranking is based on various parameters such as the header, the URL, the quality of the inbound links and the speed at which the web page loads.
This means that it is directly related to your web performance, which obviously means being related to end user experience. There are various factors involved that determine this. Viz. the code, the backend performance tuning, the tracking scripts on every page.
Research results show that there is a relation between the website speed and the TTFB (Time to first Byte). A faster (or smaller) TTFB resulted in a higher ranking from the search engine.
So, we need to improve our TTFB! For that lets understand what it is and how it is determined.
When a connection is requested to a particular website, following steps take place. There is DNS Lookup, connection is requested, and waiting time till a connection is received, time to receive the data and finally closing the connection. The time to first byte is the time that is spends in the entire above process that is waiting for the web-server to send back the data.
Determining the TTFB time:
Webpage Test is an open source tool, which shows the website performance by a means of a chart. Select a location from where your end-user would be and website address and run the test. In about half a minute the tool generates a waterfall chart that explains the resources of the website and the response time for each. This also includes TTFB.
Top ranking websites have a TTFB of about 350ms; however an ideal TTFB time would be anything less than 500ms. If the TTFB is found to be higher, (which means the website is slow), it would mainly be because of Latency.
Latency is the time taken to transmit one packet of data from one end to another. If someone complained of lower latency, normally one would suggest increasing the bandwidth. However this does not really help reduce latency time! Owing to the fact that latency is measured on the distance that the packet has to travel. This distance cannot be reduced by increasing the connection bandwidth.
To achieve the ideal TTFB time, the latency time for a website should be roughly 100 ms (data packet travels to the server and back), so that the rest of the 400 ms is spend on comfortably loading the page.
Finally, improving latency and hence improving TTFB:
From the above it becomes obvious that if the distance that the data packet travels is reduced, we can reduce latency time, reduce TTFB and thus increase the website ranking.
A classic manner in which this can be achieved is to use CDNs – Content Delivery Network. One must move all the static data of the website to a CDN, CDNs automatically replicate this data to multiple locations spread out geographically. Thus if a website is published somewhere in North America, it will be replicated onto a server in Australia so that users in Australia have a better experience.