WebPagetest Forums
Result changed after not using Cloudflare!? - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Discuss Test Results (/forumdisplay.php?fid=4)
+--- Thread: Result changed after not using Cloudflare!? (/showthread.php?tid=12618)



Result changed after not using Cloudflare!? - esther11 - 10-20-2013 01:18 PM

This is my page result when I stopped using Cloudflare.
http://www.webpagetest.org/result/131020_F8_37A

I got an A in First Byte Time but my Keep-Alive score went down. Can anyone take a minute to explain why this is happening as I see my TTFB just improved a little bit?

This is when I use Cloudflare.
http://www.webpagetest.org/result/131019_2P_H00


RE: Result changed after not using Cloudflare!? - robzilla - 10-20-2013 10:50 PM

Quote:HTTP persistent connection, also called HTTP keep-alive, or HTTP connection reuse, is the idea of using a single TCP connection to send and receive multiple HTTP requests/responses, as opposed to opening a new connection for every single request/response pair.
http://en.wikipedia.org/wiki/HTTP_persistent_connection

When you serve your website through CloudFlare, their servers take care of (and control over) all HTTP connections. As such, they can enable features like Keep-Alive, even when your web host does not support it. Now that you disabled CloudFlare, connections are handled directly by your web host, and apparently they have indeed disabled keep-alive.

I'm assuming you are on shared hosting; in that case, there's not much you can do about this. If, however, you are on your own VPS or dedicated server, you can enable keep-alive via your web server's configuration files.

It looks like you're not allowing your pages (i.e. your HTML) to be cached, which is fine (and often makes sense) for dynamic content, but it also means that when you serve your website through CloudFlare, their edge servers will always have to forward the page request to your web host, rather than serving it directly as they would with cached resources such as images, thus adding a bit of processing and latency. This might explain the slightly higher TTFB.


RE: Result changed after not using Cloudflare!? - esther11 - 10-21-2013 01:47 PM

Cause I'm using shared hosting so there's no way I can change the Keep-alive. I guess it's better to use Cloudflare again.

Thanks for your full explanation.


RE: Result changed after not using Cloudflare!? - robzilla - 10-21-2013 06:47 PM

You can always ask your web host, of course. In some rare cases, you may be able to turn it on via .htaccess, but most hosts simply prefer to keep it off to avoid having too many active connections on the server (which can be costly).


RE: Result changed after not using Cloudflare!? - esther11 - 10-21-2013 11:50 PM

(10-21-2013 06:47 PM)robzilla Wrote:  You can always ask your web host, of course. In some rare cases, you may be able to turn it on via .htaccess, but most hosts simply prefer to keep it off to avoid having too many active connections on the server (which can be costly).

I followed this tut to enable keep-alive in .htaccess but don't see any change yet.
http://softstribe.com/wordpress/how-to-enable-http-keep-alive-in-wordpress