Time To First Byte have number of components :
- DNS Lookup: Find the IP address of the domain (possible improvement: more numerous/distributed/responsive DNS servers)
- Connection time: Open a socket to the server, negotiate the connection (typical value should be around ‘ping’ time – a round trip is usually necessary – keepalive should help for subsequent requests)
- Waiting: initial processing required before first byte can be sent (his is where your improvement should be – it will be most significant for dynamic content.
We can test TTFB with ApacheBenchmark and we can see in output processing time which is sum of waiting plus complete transfer of content - if the transfer time is significantly longer than what would be expected to download the quantity of data received. further processing, after TTFB, is occuring (eg. the page is flushing content as it is available).