Wedge

Public area => The Pub => Off-topic => Topic started by: MultiformeIngegno on January 4th, 2012, 06:40 PM

Title: CloudFlare
Post by: MultiformeIngegno on January 4th, 2012, 06:40 PM
I'm considering using it(http://cloudflare.com) for some of my domains.. any opinions/experiences with this service? ;)
Title: Re: CloudFlare
Post by: Nao on January 4th, 2012, 07:14 PM
Hmm... Seems interesting. They're not really a host, are they?
Title: Re: CloudFlare
Post by: MultiformeIngegno on January 4th, 2012, 07:40 PM
I tried CF on 3 of my domains and it works really well! It not only speeds up your website (significantly) by doing some caching operations "upstream" (they also have a server in Paris :) ), it also enhance security.

From a FAQ:
CloudFlare is a broad security solution that is designed to provide protection from many forms of malicious activity online including: comment spam, email harvesting, credential hacking, web software vulnerability, cross-site scripting (XSS) and SQL injection attacks. Both XSS and SQL injection attack protection are part of the Pro service.
Title: Re: CloudFlare
Post by: Nao on January 4th, 2012, 07:47 PM
I'm more interested in the CDN aspect than the protection it offers ;)

Again, is this a host (i.e. you upload your files to their servers), do they host entire files or select files, etc...?
Title: Re: CloudFlare
Post by: MultiformeIngegno on January 4th, 2012, 07:49 PM
Quote from Nao on January 4th, 2012, 07:47 PM
Again, is this a host (i.e. you upload your files to their servers), do they host entire files or select files, etc...?
No, no. You just change the NS of your domain to point to theirs. In the "setup" process (before you change the NS) they scan your actual DNS configuration to reproduce it.
Title: Re: CloudFlare
Post by: Nao on January 4th, 2012, 07:54 PM
Oh I see. They act as a proxy then?
Title: Re: CloudFlare
Post by: MultiformeIngegno on January 4th, 2012, 07:56 PM
Quote from Nao on January 4th, 2012, 07:54 PM
Oh I see. They act as a proxy then?
Yes.

CloudFlare acts as a proxy so once you sign up for CloudFlare all connecting IPs will come from the CloudFlare IP address.
Title: Re: CloudFlare
Post by: Nao on January 4th, 2012, 08:28 PM
Oh. So it breaks any classic stats. Although I don't use any Eheh.
Title: Re: CloudFlare
Post by: MultiformeIngegno on January 4th, 2012, 09:58 PM
Quote from Nao on January 4th, 2012, 08:28 PM
Oh. So it breaks any classic stats. Although I don't use any Eheh.
They provide their own system. ;)
There are a lot of options you can choose, for example the automatic minification of CSS and javascript. or the forced support to IPv6, hotlink protection, the possibility to "crypt" emails in plain text present in your website and so on. :)
Title: Re: CloudFlare
Post by: Arantor on January 6th, 2012, 07:27 PM
We do our own minification, btw.

Though it will screw up IP detection though there is an option in Wedge already to look at alternative headers.
Title: Re: CloudFlare
Post by: MultiformeIngegno on January 6th, 2012, 08:22 PM
Quote from Lurker on January 6th, 2012, 07:27 PM
We do our own minification, btw.
I know. :)
Quote from Lurker on January 6th, 2012, 07:27 PM
Though it will screw up IP detection though there is an option in Wedge already to look at alternative headers.
Uhm, I'm interested in this. You mean it screws up IP detection because all requests pass through their proxy?
Title: Re: CloudFlare
Post by: Arantor on January 6th, 2012, 08:31 PM
Yes. The real IP is supplied but SMF and Wedge don't automatically pick up on it. At least Wedge dan be configured for it.
Title: Re: CloudFlare
Post by: Nao on January 6th, 2012, 09:18 PM
That's interesting... Did you actually test CloudFlare, Pete?
Title: Re: CloudFlare
Post by: MultiformeIngegno on January 6th, 2012, 09:57 PM
I should give this a try.. the strange thing is that they released a plugin for Wordpress and they declare that their system works perfectly with forums/blogging platforms and it helps threats/spam prevention on posts/comments.. I have a few blogs/forums in sites I'm testing on cloudflare, if I'm right you're saying that I should see in SMF's users IP history or IP of commenters on wordpress not their real ip but clouflare one (because of the proxy)?
Title: Re: CloudFlare
Post by: Arantor on January 6th, 2012, 10:18 PM
Quote from Nao on January 6th, 2012, 09:18 PM
That's interesting... Did you actually test CloudFlare, Pete?
No, but then again I didn't have to. The supplied REMOTE_ADDR is the CloudFlare IP address and the real address is supplied in a Cf-Connecting-Ip header or something along those lines; it should be tested for in Security.php.
Title: Re: CloudFlare
Post by: MultiformeIngegno on January 6th, 2012, 11:28 PM
Uhm.. I checked my test websites I have on CF right now.
SMF IPs are screwed and for example if I go to my profile I have CF IP related to the domain (173.245.52.115), so you are right.
But Wordpress commenters IP are correct! I tried to comment as anonymous and in WP I can see my correct IP!
Title: Re: CloudFlare
Post by: Arantor on January 6th, 2012, 11:35 PM
Does WP have any bridge attached to it? Are you using Bad Behaviour?
Title: Re: CloudFlare
Post by: MultiformeIngegno on January 6th, 2012, 11:52 PM
Quote from Lurker on January 6th, 2012, 11:35 PM
Does WP have any bridge attached to it? Are you using Bad Behaviour?
No.. clean install.
Title: Re: CloudFlare
Post by: Arantor on January 6th, 2012, 11:56 PM
Maybe WP includes the check for CloudFlare by default, I don't know. Don't really care either, to be honest. WP is not my favourite piece of software.
Title: Re: CloudFlare
Post by: MultiformeIngegno on January 8th, 2012, 01:22 PM
Mod by butchs:
http://www.simplemachines.org/community/index.php?topic=391926.msg2726085#msg2726085

P.S.: What is he talking about when he says(http://www.simplemachines.org/community/index.php?topic=391926.msg2774015#msg2774015):
Quote
[...] make me wish that SMF had just one check for an visitor Ip address so i can easily add a auto-detection script for CloudFlare.
Title: Re: CloudFlare
Post by: MultiformeIngegno on January 8th, 2012, 03:20 PM
They provide tools for many platforms:
http://www.cloudflare.com/wiki/Log_Files

Including a mod_cloudflare module for Apache.
Title: Re: CloudFlare
Post by: Nao on January 12th, 2012, 08:21 AM
Quote from MultiformeIngegno on January 8th, 2012, 01:22 PM
Mod by butchs:
http://www.simplemachines.org/community/index.php?topic=391926.msg2726085#msg2726085
That's odd... Why not simply make *one* test for the CF-specific variable in $_server, and overwrite $_server['remote_addr'] with it..? :-/
Title: Re: CloudFlare
Post by: Arantor on January 12th, 2012, 09:05 AM
Because the author's an arrogant tool whose skills are more in his imagination than in reality?
Title: Re: CloudFlare
Post by: Nao on January 12th, 2012, 10:09 AM
(My post above was unclear. I was commenting on butchs' post, but he was himself quoting a 'tutorial' by MKNJHILL, which is what I was talking about really. Haven't seen butchs' mod because it would require me to log in.)
Title: Re: CloudFlare
Post by: MultiformeIngegno on January 12th, 2012, 03:27 PM
I'm having big problems with their module for Apache... After I installed it a lot of Zombie processes are created every hour and Apache reaches its max FCGI process count and any requests in excess of the limit is dropped. So every 9/10 hours if I don't restart Apache my websites go down. >:(

My error log gets flooded of (~ 16 every second):
Code: [Select]
[info] mod_fcgid: /cgi-bin/php5.fcgi total process count 20 >= 20, skip the spawn request errors

It's indeed something related to the module because these problems started right after I installed it.  :unsure:

I added a ticket in their system.. they said they're going to investigate on it.
Latest reply:
Quote
I noticed that you were running Linux 3.1 x86-64. I am not saying it has any thing to do with this but 64 bit has not been tested.
<_<
Title: Re: CloudFlare
Post by: Nao on January 12th, 2012, 03:45 PM
Shared hosting is not that bad all of a sudden eh... :P
Title: Re: CloudFlare
Post by: MultiformeIngegno on January 12th, 2012, 06:06 PM
Well, Cloudflare system works really really well (and hosting should be glad that users use it, for example my daily bandwidth was 2Gb, now it's reduced to 900Mb (thanks to their threats protection and upstream compression).

The problem is only with this Apache module, maybe it's badly written or has some bugs in it.
https://raw.github.com/cloudflare/CloudFlare-Tools/master/mod_cloudflare.c

Don't know.. I disabled it for now (and I don't have Zombie processes anymore).
Title: Re: CloudFlare
Post by: MultiformeIngegno on June 3rd, 2012, 03:17 PM
Now that I'm on my VPS I managed to compile the mod_cloudflare Apache module properly. :)
Title: Re: CloudFlare
Post by: Arantor on June 3rd, 2012, 03:19 PM
Have fun with that. It may or may not be a good idea.
Title: Re: CloudFlare
Post by: MultiformeIngegno on June 3rd, 2012, 04:10 PM
Quote from Arantor on June 3rd, 2012, 03:19 PM
Have fun with that. It may or may not be a good idea.
Elaborate.. :unsure:
Title: Re: CloudFlare
Post by: Arantor on June 3rd, 2012, 04:13 PM
Have a search around sm.org for the number of people who have trouble with CloudFlare.
Title: Re: CloudFlare
Post by: MultiformeIngegno on June 3rd, 2012, 04:17 PM
Oh, I thought you were talking about the apache module!

Well I used CF for 3/4 months now.. I know how it works. :)
And also if you disable all the performance/CDN/compression stuff (that works well though) it's useful as a DNS manager.
Title: Re: CloudFlare
Post by: Arantor on June 3rd, 2012, 04:49 PM
But if you disable all that stuff, it seems like you're not using all the stuff it's (supposedly) useful for... in which case you might as well not bother and use a separate DNS service.
Title: Re: CloudFlare
Post by: MultiformeIngegno on June 3rd, 2012, 06:09 PM
In fact I said that those things work well though ^_^
And yes maybe it's better to use a separate DNS service if you don't use their primary stuff, but you have for free their reliability, their infrastructure and you have your IP/hostname "masked".
Title: Re: CloudFlare
Post by: Arantor on June 3rd, 2012, 06:16 PM
That's the thing, though, it doesn't work nearly as well as you make it sound like - so many people have so many problems with it. Their infrastructure does not sound particularly reliable from all the reports I've had.
Title: Re: CloudFlare
Post by: MultiformeIngegno on June 3rd, 2012, 06:19 PM
Reports about downtimes, slownesses, or problems with "performance features" that cause problems?
Title: Re: CloudFlare
Post by: Arantor on June 3rd, 2012, 06:22 PM
All of the above.
Title: Re: CloudFlare
Post by: Dr. Deejay on June 3rd, 2012, 06:28 PM
Quote from Arantor on June 3rd, 2012, 06:22 PM
All of the above.
Yeah, especially downtimes and slowness. A forum I was admin on before it shut down had it installed, but the other administrator deleted Cloudflare in the end, because such issues. After that, the forum ran fast again. I'm really glad I don't use it myself.
Title: Re: CloudFlare
Post by: MultiformeIngegno on June 3rd, 2012, 06:47 PM
I'm not payed to defend them ( :P ) but I have more than 10 websites with CF and I had issues only once or twice. I really like their system..