Cloudflare and Drupal

We've recently signed up to be a Cloudflare partner. We have occasionally been using Cloudflare for some of our clients, and we've become believers. At least for a lot of our clients.

What is Cloudflare?

It's quite a few different things.  It's a Content Distribution Network.  Content from your site will be cached at data centers around the world, and served up from those data centers. Also your DNS will be distributed through these data centers, which will make your DNS lookups much faster. It also provides you with protection against web threats - requests that look suspicous will either be blocked if they are severe, and if they are less severe, they will provide a human challenge to the person trying to access the web site. This protection is adjustable, and is particularly valuable if you are fending off a serious DDOS or other form of attack.

So - that sounds expensive!

The basic plan is free - you get most of the advantage of Cloudflare caching just by signing up. If you want more control and advanced features, the pricing is reasonable.

What about Drupal? Or Wordpress?

We have mostly been using Cloudflare with Drupal, and have been pretty happy with it.  It requires a little bit of tweaking to not interfere with your Drupal site.  There's also a Drupal Cloudflare module that will fix things so that your Drupal install understands the IP addresses that your traffic comes from.  There's also a plugin for Wordpress that does the same thing.  Soon I'm going to be writing a tutorial here and on Planet Drupal about setting up Cloudflare on a Drupal site to get it to behave and to give you great performance.

So what's this partner deal?

We are partnering with Cloudflare for a number of reasons.  We will make Cloudflare available as a no-cost option when you sign up for hosting with us, and it welil be set up automatically as part of your plan. Additionally, we are planning on implementing the Railgun option for Cloudflare, which will set up a high-speed link between us and Cloudflare to bring you the best performance for your server.  You'll be able to use this even on our shared hosting plans -- We'll have more news on this when it's set up.  

So -- will this replace using Varnish on my site?

Not really quite the same thing, though with some similarities. Varnish will typically live on your own local network and will cache traffic to your own network. Cloudlflare lives out in the cloud, and therefore will keep a lot of traffic from entering your network at all.

On the other hand - Cloudflare only caches non-html entities.  So - it's lots easier to deal with than Varnish, and is less painfult to set up. On the other hand, it caches considerably less than a well-tuned Varnish cache can. Of course, there's always the possiblity of using Varnish locally and Cloudflare out on the perimeter - we're exploring that at the moment.

Category: