Current time: 04-20-2014, 07:05 PM Hello There, Guest! (LoginRegister)

Post Reply 
CloudFlare and mod_cloudflare
04-08-2012, 08:41 AM
Post: #11
RE: CloudFlare and mod_cloudflare
I'm missing something. I click on the box to add cloudflare but there is no update or save changes button anywhere on the page. So, when I leave and come back, it's unclicked. What am I missing?
Melissa
Find all posts by this user
Quote this message in a reply
04-09-2012, 11:41 AM (This post was last modified: 04-09-2012 11:45 AM by damoncloudflare.)
Post: #12
RE: CloudFlare and mod_cloudflare
(04-20-2011 07:47 AM)Netalarm Wrote:  Hello all,

I've enabled CloudFlare (cloudflare.com) on my domains hosted at DreamHost and so far everything's good, but there's one problem. The IP that's logged by software such as phpBB is showing CloudFlare's IP, not the actual visitor's IP. In order to get the actual IP to be displayed, mod_cloudflare would be needed.

Has anyone had any success with mod_cloudflare or otherwise getting CloudFlare working with real IP addresses?

Just a quick note that mod_cloudflare should now be deployed across Dreamhost's servers now.


(04-07-2012 07:47 AM)luna6 Wrote:  I would like to try out Cloudflare. When enabling Cloudflare through the dreamhost panel what security setting is it set at by default? Also can I change this setting? Ideally I need it low or non-existent, because I don't want false positives (visitors getting the captcha page).

Also, the website I am interested in enabling cloudflare on has a subdomain where all images are stored. I am particularly keen on getting this cached. What happens if I enable it only for the subdomain that contains the images? In this case, when the root domain loads images from the subdomain will the cdn benefits from cloudflare kick in and also does cloudflare's security settings come into play?

Lastly, will my awstats install continue to work (or will it show just cloudflare ip's)?

"Lastly, will my awstats install continue to work (or will it show just cloudflare ip's)?"
This should be proper now that mod_cloudflare has been deployed across Dreamhost's servers.

"I would like to try out Cloudflare. When enabling Cloudflare through the dreamhost panel what security setting is it set at by default?"
Medium is the default setting. You can change this by logging in to your CloudFlare account and changing it in your Security Profile (settings->CloudFlare Settings->Security->Change to desired level). Essentially off is the closest option to off (only blocks the worst of the worst).

"Also, the website I am interested in enabling cloudflare on has a subdomain where all images are stored. I am particularly keen on getting this cached. What happens if I enable it only for the subdomain that contains the images?"

You should see the option to enable on the root domain and appropriate subdomains in Dreamhost's panel. Just a quick note that A records can't be provisioned through hosting partner integrations (just so you know why some records may not show).

Note: I think it is important to at least tell why a CloudFlare captcha appears. I also want to highlight that you can override the captcha behavior by whitelisting IPs in your CloudFlare threat control panel.

"when the root domain loads images from the subdomain will the cdn benefits from cloudflare kick in and also does cloudflare's security settings come into play?"
The security and caching is active on any record we proxy.


(04-07-2012 07:47 AM)luna6 Wrote:  I would like to try out Cloudflare. When enabling Cloudflare through the dreamhost panel what security setting is it set at by default? Also can I change this setting? Ideally I need it low or non-existent, because I don't want false positives (visitors getting the captcha page).

Also, the website I am interested in enabling cloudflare on has a subdomain where all images are stored. I am particularly keen on getting this cached. What happens if I enable it only for the subdomain that contains the images? In this case, when the root domain loads images from the subdomain will the cdn benefits from cloudflare kick in and also does cloudflare's security settings come into play?

Lastly, will my awstats install continue to work (or will it show just cloudflare ip's)?

"Lastly, will my awstats install continue to work (or will it show just cloudflare ip's)?"
This should be proper now that mod_cloudflare has been deployed across Dreamhost's servers.

"I would like to try out Cloudflare. When enabling Cloudflare through the dreamhost panel what security setting is it set at by default?"
Medium is the default setting. You can change this by logging in to your CloudFlare account and changing it in your Security Profile (settings->CloudFlare Settings->Security->Change to desired level). Essentially off is the closest option to off (only blocks the worst of the worst).

"Also, the website I am interested in enabling cloudflare on has a subdomain where all images are stored. I am particularly keen on getting this cached. What happens if I enable it only for the subdomain that contains the images?"

You should see the option to enable on the root domain and appropriate subdomains in Dreamhost's panel. Just a quick note that A records can't be provisioned through hosting partner integrations (just so you know why some records may not show).

Note: I think it is important to at least tell why a CloudFlare captcha appears. I also want to highlight that you can override the captcha behavior by whitelisting IPs in your CloudFlare threat control panel.

"when the root domain loads images from the subdomain will the cdn benefits from cloudflare kick in and also does cloudflare's security settings come into play?"
The security and caching is active on any record we proxy.

Damon
CloudFlare Community Evangelist
Find all posts by this user
Quote this message in a reply
04-09-2012, 10:00 PM
Post: #13
RE: CloudFlare and mod_cloudflare
(06-03-2011 10:40 AM)Gwyneth Llewelyn Wrote:  I should say that after a few weeks, CloudFlare is definitely improving the speed of displaying pages to my visitors. It just took some time to fill up those caches; now more than 40% of the bandwidth (on average; some sites get bigger saves than others) is provided by CloudFlare and there is really a huge difference.

Under WordPress, combining CloudFlare with W3 Total Cache gives impressive results. One of my WordPress blogs used to take... over 45 seconds to load the homepage (sometimes more!) on a browser with a clear cache. Way too much! W3 Total Cache + CloudFlare now brings the loading time down to 8 seconds, which is a much more reasonable amount of time to make visitors wait Smile

So vote for mod_cloudflare to be included in DH's Apache build, and for DH to join CloudFlare's hosting partner programme — we would all benefit from that by placing a much smaller burden upon DH's servers and Internet connections Smile

--
LoL?! Shared Hosting + Cloud = Internet speed from '90 years! Smile
C'mon! WakeUp! Tongue WE NEED MORE BANDWITH SPEED FROM DREAMHOST AND FROM OUR ISP's !!! Is 2012 WTH?! Smile)


You can do a simple test
1. Activate CloudFlare Shared Hosting plan or VPS and test your speed
2. Deactivate CloudFlare on a Shared Hosting plan or VPS and test your speed.
Find all posts by this user
Quote this message in a reply
04-16-2012, 03:29 AM (This post was last modified: 04-16-2012 03:30 AM by bobocat.)
Post: #14
RE: CloudFlare and mod_cloudflare
(06-03-2011 10:40 AM)Gwyneth Llewelyn Wrote:  I should say that after a few weeks, CloudFlare is definitely improving the speed of displaying pages to my visitors. It just took some time to fill up those caches; now more than 40% of the bandwidth (on average; some sites get bigger saves than others) is provided by CloudFlare and there is really a huge difference.

I'm not terribly impressed with CloudFlare. I've set up my site to serve all static items off of a related domain, then put that under CloudFlare's control. I've done some extensive testing and found that CloudFlare may be generously giving free bandwidth, but the download times are actually around 100—200ms slower than DH on average. Occasionally they are much slower than DH.

It does help with decreasing server load, but as for making the site faster, not much. My own tweaking (caching, compression, getting CSS loaded as early as possible, maximising parallel downloads, avoiding cookies for static content, etc) has shaved off more time than CloudFlare. In fact, while their cookies are only 50B, all static content through CloudFlare will include a cookie which will decrease your PageSpeed score.

I'll let the test run a bit longer, but so far It's a ho-hum service. What I really wonder is how CloudFlare is monetising this. Remember, if you aren't paying, then you aren't the customer. The more people who sign up for CloudFlare, the more CloudFlare can monitor trends, follow users around teh internets, etc. I've already read some interviews that show they are analysing this data, so they'll probably be selling it in future...
Find all posts by this user
Quote this message in a reply
04-16-2012, 10:58 AM
Post: #15
RE: CloudFlare and mod_cloudflare
(04-16-2012 03:29 AM)bobocat Wrote:  I'm not terribly impressed with CloudFlare. I've set up my site to serve all static items off of a related domain, then put that under CloudFlare's control. I've done some extensive testing and found that CloudFlare may be generously giving free bandwidth, but the download times are actually around 100—200ms slower than DH on average. Occasionally they are much slower than DH.

Are you basing this off of time to first byte? What are you using to test? Also remember that the service is helping with speed relative to where the visitor is hitting relativeto a datacenter.

It does help with decreasing server load, but as for making the site faster, not much. My own tweaking (caching, compression, getting CSS loaded as early as possible, maximising parallel downloads, avoiding cookies for static content, etc) has shaved off more time than CloudFlare. In fact, while their cookies are only 50B, all static content through CloudFlare will include a cookie which will decrease your PageSpeed score.

Cookies are indeed required because security features won't work without them (challenge page, etc.).

"What I really wonder is how CloudFlare is monetising this."
We monetize the service through optional features and services like CloudFlare apps.

"The more people who sign up for CloudFlare, the more CloudFlare can monitor trends, follow users around teh internets, etc. "
This could be possible in the future (aggregate data). We would never divulge personally identifiable information without user consent.

Damon
CloudFlare Community Evangelist
Find all posts by this user
Quote this message in a reply
04-17-2012, 03:58 PM
Post: #16
RE: CloudFlare and mod_cloudflare
(04-16-2012 10:58 AM)damoncloudflare Wrote:  Are you basing this off of time to first byte? What are you using to test? Also remember that the service is helping with speed relative to where the visitor is hitting relativeto a datacenter.

various tools. webpagetest.org is one. TTFB and total download time are both slower than just getting it directly from DH. For example, I set CF to take care of all static content by putting it all on a related domain, then setting that to CF in DH's panel. I can switch to DH only (get static and dynamic from the same domain) or CF (get static from related domain set up with CF) by changing one setting in my config. Or I can just directly download the same file from each domain. Then I run various tests and compare the results.

For example, my main CSS file from CF sometimes takes a long time to download from CF. No images will load until all CSS has been loaded (unless hard-coded into the template):
Code:
{
  "startedDateTime": "2012-04-17T22:46:19.102Z",
  "time": 3037,
  "request": {
    "method": "GET",
    "url": "http://example.net/css/core-120417.min.css",
    "httpVersion": "HTTP/1.1",
    "headers": [
      {
        "name": "Accept-Encoding",
        "value": "gzip,deflate,sdch"
      },
      {
        "name": "Accept-Language",
        "value": "en,en-AU;q=0.8,th;q=0.6"
      },
      {
        "name": "Cookie",
        "value": "__cfduid=some_uidsothauoehurohe"
      },
      {
        "name": "Connection",
        "value": "keep-alive"
      },
      {
        "name": "Pragma",
        "value": "no-cache"
      },
      {
        "name": "Accept-Charset",
        "value": "UTF-8,*;q=0.5"
      },
      {
        "name": "Host",
        "value": "www.example.net"
      },
      {
        "name": "User-Agent",
        "value": "Mozilla/5.0"
      },
      {
        "name": "Accept",
        "value": "text/css,*/*;q=0.1"
      },
      {
        "name": "Cache-Control",
        "value": "no-cache"
      },
      {
        "name": "Referer",
        "value": "http://example.com/"
      }
    ],
    "queryString": [],
    "cookies": [
      {
        "name": "__cfduid",
        "value": "some_uidsaotheuntho",
        "expires": null,
        "httpOnly": false,
        "secure": false
      }
    ],
    "headersSize": 530,
    "bodySize": 0
  },
  "response": {
    "status": 200,
    "statusText": "OK",
    "httpVersion": "HTTP/1.1",
    "headers": [
      {
        "name": "Date",
        "value": "Tue, 17 Apr 2012 22:46:21 GMT"
      },
      {
        "name": "Content-Encoding",
        "value": "gzip"
      },
      {
        "name": "CF-Cache-Status",
        "value": "HIT"
      },
      {
        "name": "Age",
        "value": "0"
      },
      {
        "name": "Transfer-Encoding",
        "value": "chunked"
      },
      {
        "name": "Connection",
        "value": "Keep-Alive"
      },
      {
        "name": "Server",
        "value": "cloudflare-nginx"
      },
      {
        "name": "Vary",
        "value": "Accept-Encoding"
      },
      {
        "name": "Content-Type",
        "value": "text/css; charset: UTF-8"
      },
      {
        "name": "Cache-Control",
        "value": "public, max-age=31536000"
      },
      {
        "name": "Expires",
        "value": "Wed, 17 Apr 2013 22:46:21 GMT"
      }
    ],
    "cookies": [],
    "content": {
      "size": 30432,
      "mimeType": "text/css",
      "compression": 23761
    },
    "redirectURL": "",
    "headersSize": 332,
    "bodySize": 6671
  },
  "cache": {},
  "timings": {
    "blocked": 0,
    "dns": 817,
    "connect": 29,
    "send": 0,
    "wait": 2040,
    "receive": 130,
    "ssl": -1
  },
  "pageref": "page_1"
}
Find all posts by this user
Quote this message in a reply
04-18-2012, 11:25 AM
Post: #17
RE: CloudFlare and mod_cloudflare
(04-17-2012 03:58 PM)bobocat Wrote:  various tools. webpagetest.org is one. TTFB and total download time are both slower than just getting it directly from DH. For example, I set CF to take care of all static content by putting it all on a related domain, then setting that to CF in DH's panel. I can switch to DH only (get static and dynamic from the same domain) or CF (get static from related domain set up with CF) by changing one setting in my config. Or I can just directly download the same file from each domain. Then I run various tests and compare the results.

For example, my main CSS file from CF sometimes takes a long time to download from CF. No images will load until all CSS has been loaded (unless hard-coded into the template):
Code:
{
  "startedDateTime": "2012-04-17T22:46:19.102Z",
  "time": 3037,
  "request": {
    "method": "GET",
    "url": "http://example.net/css/core-120417.min.css",
    "httpVersion": "HTTP/1.1",
    "headers": [
      {
        "name": "Accept-Encoding",
        "value": "gzip,deflate,sdch"
      },
      {
        "name": "Accept-Language",
        "value": "en,en-AU;q=0.8,th;q=0.6"
      },
      {
        "name": "Cookie",
        "value": "__cfduid=some_uidsothauoehurohe"
      },
      {
        "name": "Connection",
        "value": "keep-alive"
      },
      {
        "name": "Pragma",
        "value": "no-cache"
      },
      {
        "name": "Accept-Charset",
        "value": "UTF-8,*;q=0.5"
      },
      {
        "name": "Host",
        "value": "www.example.net"
      },
      {
        "name": "User-Agent",
        "value": "Mozilla/5.0"
      },
      {
        "name": "Accept",
        "value": "text/css,*/*;q=0.1"
      },
      {
        "name": "Cache-Control",
        "value": "no-cache"
      },
      {
        "name": "Referer",
        "value": "http://example.com/"
      }
    ],
    "queryString": [],
    "cookies": [
      {
        "name": "__cfduid",
        "value": "some_uidsaotheuntho",
        "expires": null,
        "httpOnly": false,
        "secure": false
      }
    ],
    "headersSize": 530,
    "bodySize": 0
  },
  "response": {
    "status": 200,
    "statusText": "OK",
    "httpVersion": "HTTP/1.1",
    "headers": [
      {
        "name": "Date",
        "value": "Tue, 17 Apr 2012 22:46:21 GMT"
      },
      {
        "name": "Content-Encoding",
        "value": "gzip"
      },
      {
        "name": "CF-Cache-Status",
        "value": "HIT"
      },
      {
        "name": "Age",
        "value": "0"
      },
      {
        "name": "Transfer-Encoding",
        "value": "chunked"
      },
      {
        "name": "Connection",
        "value": "Keep-Alive"
      },
      {
        "name": "Server",
        "value": "cloudflare-nginx"
      },
      {
        "name": "Vary",
        "value": "Accept-Encoding"
      },
      {
        "name": "Content-Type",
        "value": "text/css; charset: UTF-8"
      },
      {
        "name": "Cache-Control",
        "value": "public, max-age=31536000"
      },
      {
        "name": "Expires",
        "value": "Wed, 17 Apr 2013 22:46:21 GMT"
      }
    ],
    "cookies": [],
    "content": {
      "size": 30432,
      "mimeType": "text/css",
      "compression": 23761
    },
    "redirectURL": "",
    "headersSize": 332,
    "bodySize": 6671
  },
  "cache": {},
  "timings": {
    "blocked": 0,
    "dns": 817,
    "connect": 29,
    "send": 0,
    "wait": 2040,
    "receive": 130,
    "ssl": -1
  },
  "pageref": "page_1"
}

Time to first byte might be a little bit slower with CloudFlare in some cases & a pretty good explanation can be found here.

"By definition cloudflare will add some first byte time since it needs to go back to your server and process the data but it should be minimal. My algorithm for calculating a first byte time grade doesn't play nicely with something like cloudflare though so look at the before/after first byte times and compare those directly (doesn't explain the one long time you had in a repeat view though).

The algorithm for first byte time looks at the socket connect time to get an estimate of the round trip time to a server and then it uses a multiple of that as the baseline and adds 100ms for each letter.

Since cloudflare has distributed edge nodes, they actually make your socket connect time a LOT faster than if the browser had to go back to the original server directly so the baseline is lowered. The actual request still needs to travel back to your server though so it can't be any faster than it was before (and will usually be slightly slower). The effect that has is that it will lower the grade even if it is actually faster because the round trip time used for the baseline is faster"

CSS issue:
Are we actually caching the CSS? It might be hard to look at this issue here, at least not without knowing the full domain, so one of our engineers can always take a look at it. I would recommend contacting CloudFlare so we can take a deeper look. I would also include where you are located and a traceroute in the report (just so we know which datacenter you're personally hitting).

Damon
CloudFlare Community Evangelist
Find all posts by this user
Quote this message in a reply
04-18-2012, 05:01 PM
Post: #18
RE: CloudFlare and mod_cloudflare
Thanks for your reply. TTFB is not the only thing I look at. The most important thing for me is the UX. So I want a page to load as quickly as possible. Sometimes I test the whole page, sometimes I test individual components. Almost always, CF is slower.

I've got my testing set up so that the same web app can get its static components (images, JS, and CSS) from one of two domains, both of which are hosted at DH, and one of which is backed up by CF. I also monitor these in real time by piping the logs into a visualisation program using tail -f, so if there's a request, I'll see it. I know the files are being served from CF because of this. There's no record created in the log (unless I put CF in dev mode). There are also headers which show it's coming from CF. There's a CF-related header stating HIT, and another showing the CF server. When I request from DH, I can see the request instantly in the log file, so there's no doubt in where it's coming from.

So by either requesting a single part of the page and comparing total download time, connection time, DNS lookup time, or whatever, I can evaluate what's going on. Evaluating total page load time is the same procedure. I compare these side by side on my own machine and through webpagetest.org where I can select from a variety of locations.

The end result is that for a highly optimised site which already fully loads in around 1.5-2.5 seconds, CF may actually degrade performance. CF does help on an image-heavy and unoptimised wordpress blog that I don't have the time nor inclination to improve.

For now I've ended my CF trial. I appreciate the free resources, but right now it doesn't seem like a good trade-off for highly optimised sites (a score of 92+ on webpagetest.org, for example). YMMMV.

By the way, your link back to DH on your CF control panel is malformed. You need http:// rather than http//
Find all posts by this user
Quote this message in a reply
04-19-2012, 12:03 PM
Post: #19
RE: CloudFlare and mod_cloudflare
"By the way, your link back to DH on your CF control panel is malformed. You need http:// rather than http//
[/quote]
Do you mean the link back from the DNS settings' page in your actual CloudFlare account?

Damon
CloudFlare Community Evangelist
Find all posts by this user
Quote this message in a reply
04-19-2012, 06:00 PM (This post was last modified: 04-19-2012 06:00 PM by bobocat.)
Post: #20
RE: CloudFlare and mod_cloudflare
(04-19-2012 12:03 PM)damoncloudflare Wrote:  Do you mean the link back from the DNS settings' page in your actual CloudFlare account?

Yes, but I can't get it to work that way now. I did something which caused a red bar to appear at the top of the page directing me to make DNS changes at Dreamhost. Clicking on the link caused an error because the URL was malformed. I can't get that red bar to appear again. Now I only see a full page with a green button leading to DH. That button works fine.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: