Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am getting very high TTFB (Time To First Byte) about 2.6 to 3 seconds, I have very high number of images on my pages.

I want to get thumbs downloaded from multiple host names like:

  • img1.example.com
  • img2.example.com

Do you thinks it will impact the TTFB?

share|improve this question
What is TTF supposed to mean?? – Digital Lightcraft Aug 24 '12 at 11:38
it means time to first byte en.wikipedia.org/wiki/Time_To_First_Byte – Mahmoud Bahloul Aug 24 '12 at 11:39
ooh TTFB! that would explain why googling came up blank on that! – Digital Lightcraft Aug 24 '12 at 11:46

Adding MORE (sub)domains can only INCREASE this value because the computer/visitor has to do another lookup to resolve the domain to an IP.

You'd be better off trying to find out WHY you have a high TTFB.

From Wikipedia: "Time To First Byte or TTFB is a measurement that is often used as an indication of the responsiveness of a webserver or other network resources. It is the duration from the virtual user making an HTTP request to the first byte of the page being received by the browser. This time is made up of the socket connection time, the time taken to send the HTTP request, and the time taken to get the first byte of the page."

...made up of the socket connection time, the time taken to send the HTTP request, and the time taken to get the first byte of the page

  1. Do a test on http://tools.pingdom.com/ to see which part(s) of this is taking the longest.

  2. Post some details about it, so others can help you. I can't say much about exactly how to fix it because I don't know what the problem is exactly.

share|improve this answer
thank you for this answer this is a pingdom test : tools.pingdom.com/fpt/#!/hpxsctNlZ/http://arabeevideo.com you can see that the images are hosted in a part on another domain that serves only images sometimes there's 72 request for that domain while the first generating page I thought that serving them from multiple hostnames will faster page load Now I am sure that the best is to generate some parts with ajax requests – Mahmoud Bahloul Aug 24 '12 at 12:02
@MahmoudBahloul - I notice that there is a good amound of "yellow" on that test, which means that your server is preparing to send data to the visitor. You could look into a different server, or CACHING. (Even a CDN?). That will help for sure. – ionFish Aug 24 '12 at 18:10
@ionFish: Adding more (sub)domains/hostnames should not increase the TTFB. The additional DNS lookups are made from the client after the first byte is received. – w3dk Aug 24 '12 at 18:41
@w3d - Then the question itself is faulty. "I am getting very high TTFB (Time To First Byte) about 2.6 to 3 seconds, I have very high number of images on my pages." How would the high number of images on the pages make a difference if they are only recognized after the index is downloaded? It's a paradox! (But I think he means his images have a high TTFB and not the index). – ionFish Aug 24 '12 at 18:47
Exactly, the TTFB (of the page request) should have nothing to do with the images. That is simply the OP's speculation I suspect. Unless of course, as you suggest, it's not the TTFB that is being measured, but the page load time or something? TBH I'm seeing a much shorter TTFB than the OP suggests, with a total page load time of about 3 secs (but it's varying considerable) - even with an empty cache. – w3dk Aug 24 '12 at 19:05

TTFB is totally dependent on server load and available bandwidth.

If your server is heavily loaded (lots of requests per second) then your TTFB will rise exponentially. This effect is multiplied by lower server spec and available bandwidth.

Spreading the load over multiple sub domains may or may not have any effect, this depends on how you actually technically do it:

IF you use multiple sub domains linked to the same server, then expect little or no difference.

However if you spread this load over multiple sub-domains pointing do different servers then i could see potential for a lowering of your TTFB - this is how CDN's work.

HOWEVER it is likely that this high TTFB is caused by another factor such as scripts running on every page load - i would investigate the cause before trying to solve it in this way.

share|improve this answer
thank you for your answer my server is an IntelXeon E3-1230 4x 3.2GHz 8 Go DDR3 ECC the connection is 1gbits/sec no idea about bandwith but I think 100MB/s sometimes the php5-cgi goes to 110% in cpu use – Mahmoud Bahloul Aug 24 '12 at 12:10
@MahmoudBahloul - Those specifications are plenty fine for what you need. I think the best action to take is to add/improve caching. – ionFish Aug 24 '12 at 18:12

If you are using Apache, check your KeepAliveTimeout value in apache2.conf. When a client is loading multiple files from the server, the connection is normally reused for each, but it looks that's not happening in your case.

The default of 5 should be enough, but try 8 or 10 as well.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.