Tag Archive for The Phoenix Project

Maximising WordPress Blog Performance with Free CloudFlare CDN

Free WordPress CloudFlare CDN

Just a quick update on a handful of changes I have made / am making to the site, the first of which is hopefully pretty obvious from the post title! I have been meaning to add a CloudFlare CDN to my WordPress site for a very long time, but like all things which involve a bit of complexity and time to implement, I’ve been putting it off!

My blog was recently suffering quite a few issues caused by the performance of my site host (possible news on that upcoming in the next few weeks). I wanted to both mitigate their performance problems, and generally reduce page times to my site as part of my recent efforts to improve SEO for the site. As many of you may know, Google rank sites higher if they have page load times under about 2000 ms (or 2 seconds to us human folk!)

There are many ways to improve site performance in WordPress, but the one with then biggest impact is to introduce a CDN.

So what is a CDN?

If you haven’t heard of a CDN before, it’s a pretty simple concept. You start by registering DNS for your domain with the CDN provider. After this they sit inline and intercept inbound all requests for content from your site (e.g. images, javascript files, static html, etc) and deliver them from local caches logically and physically closer to the requesting browser. Most CDN providers will have these caches (or POPs aka Points of Presence) all over the globe.

This reduces both outbound bandwidth and server resources used on your web server (otherwise known as an Origin Server), leaving it to get on with serving up dynamic content only. (Yes, technically they can also serve dynamic content, but let’s keep it simple for now!)WordPress CDN CloudFlare Free

Why CloudFlare, and who are the alternatives?

For WordPress blogs, there are a number of well-known alternatives you could choose from (assuming you have little to no budget).

  • WordPress project Photon
    • Built into the Jetpack, this will cache much of your content to the WordPress cloud servers. This seems to improve performance a bit, but it’s not perfect. The great thing is that it’s insanely easy to enable, with just one check box. Zero hassle implementation!
  • Amazon CloudFront
    • If you are using AWS, this is a great option, and it’s pretty cheap at about 8-12p per GB of content delivered. You also get 2 million requests and 50GB per month free for the first 12 months on the AWS Free Tier.
  • Imperva Incapsula
    • If you want the ultimate WAF, I highly recommend this. Their pricing is a bit out of my league for this feature on a personal blog though, so at the free or low cost tiers, CloudFlare worked better for my budget! Ironically if you then move to an enterprise support tier (e.g. for a company site), they are very keenly priced vs some of their competitors.
  • CloudFlare
    • Superb free and “pro” tier features. Even at free tier you get free SSL, DDoS mitigation and CDN included!

I obviously went for the latter as it gives me options later on, to upgrade to a cloud-based WAF (Web Application Firewall), for a very reasonable price of only $20 per month. This is particularly useful if you are not so good at regularly updating WordPress or plugins as it will protect many of the most common SQL injection or XSS attack types.WordPress CDN CloudFlare Free

What issues did I have implementing CloudFlare?

So far the switch has been pretty easy and smooth, there were just a few considerations, one of which I have resolved, the others I am still working on.

Firstly, CloudFlare is a pure DNS and CDN provider, they do not provide email hosting or forwarding services as standard. By moving my DNS from my existing provider (ZoneEdit) I lost the email forwarding functionality (I’m lazy and just use a catch-all for the domain). Fortunately I found an article by Chris Anthropic on using MailGun as a free alternative.

Second, I am keen to utilise CloudFlare’s free SSL encryption. I have been messing around trying to get either Flex or Full mode working, but have run into a few problems, which I will probably document once resolved! As far as I can tell this is more down to WordPress than CloudFlare!WordPress CDN CloudFlare Flexible SSL

orWordPress CDN CloudFlare Full SSL

In the mean time, if you go to the HTTPS version of my site you will likely get a few cert errors. These mainly seem to be caused by some objects within pages being HTTP and some HTTPS. This is something I hope to have resolved soon!

Lastly, the massively improved page load times have (as per the theory of constraints) uncovered the next bottlenecks in my system, which mainly seem to revolve around certain plugins I’m using for WordPress. If you want to check your own blog, simply open Chrome developer tools, navigate to the Network Tab, then refresh one of your pages for a very useful picture of the load times on your pages and every object within them:WordPress CDN CloudFlare Free

The Result

So what is the result of all this effort? I seem to have reduced my average page load time down from 5-10 seconds, into the 2.5-3 second range for most pages, and much of that is background loading (i.e. most content appears almost instantly)! I will be working on those plugins to try to get everything under the 2000ms time frame over the next few weeks…

If you aren’t already using a CDN for your WordPress blog (other blog providers are available!), I highly recommend you check out CloudFlare!

7 Reasons Why You Should Read The Phoenix Project

The Phoenix Project

I began reading The Phoenix Project with no preconceptions, other than having been told that it is a great book, and hearing it mentioned many times on Eric Wright‘s GC On Demand podcast.

Written by Gene Kim, Kevin Behr, and George Stafford, it is told as a first-person narrative from the perspective of Bill, a middleware team manager who is promoted into a senior IT management role for a business in jeopardy. Through his experiences and a guiding hand from another key character, together we work through the problems facing the business, the IT department and the individuals within.

The story is told in an easy to read, informal style, and I made quick work of it over the course of just a few days. I really enjoyed it on numerous levels:

  1. I recognised every single character in the book as somebody I have worked with (or indeed currently work with!). I guarantee you will feel the same!
  2. The book was pretty well written, and the story arc itself was compelling. I was really rooting for Bill to succeed in his endeavours! (But did he? You will have to read the book to find out!)
  3. The authors obviously have a great sense of humour! Quotes such as “Show me a dev who isn’t crashing production systems, and I’ll show you one who can’t fog a mirror. Or more likely, is on vacation.” had me laughing out loud on the train in front of other passengers!
  4. The book is approachable and not elitist. You could pick it up as a cable monkey or an IT director (or maybe even a Sales person!!!), and relate to the concepts and methods described.
  5. I learned a huge amount about different methods for handling and improving processes around WIP (Work in Progress), such as the Theory of Constraints or the use of Kanban boards (I am currently testing this with my pre-sales customer workloads using Trello, but I’m told Kanbanize is also very good). Resilience Engineering (think Netflix Simian Army) and numerous other techniques are also covered, along with the overarching “Three Ways” (very Zen!).
  6. I actually picked up a few key tips which could be applied directly to my pre-sales design and requirements gathering workshops with my customer stakeholders.
  7. Finally, it didn’t feel “preachy”, which is always a risk when trying to sell an idea / concept as your main theme and I was initially concerned that the book would be ramming DevOps culture down my neck throughout. This could not be farther from the truth, and the full DevOps concepts do not come into play until the story is almost complete. There are many lessons to be learned throughout the story, which could be applied to any organisation!

The Phoenix Project Cover

Here are another few choice quotes from The Phoenix Project, both humorous and insightful:

“The only thing more dangerous than a developer is a developer conspiring with Security. The two working together gives us means, motive, and opportunity.”

“How can we manage production if we don’t know what the demand, priorities, status of work in process, and resource availability are?”

“You just described ‘technical debt’ that is not being paid down. It comes from taking shortcuts, which may make sense in the short-term. But like financial debt, the compounding interest costs grow over time. If an organization doesn’t pay down its technical debt, every calorie in the organization can be spent just paying interest, in the form of unplanned work.”

“On the other hand, if a resource is ninety percent busy, the wait time is ‘ninety percent divided by ten percent’, or nine hours. In other words, our task would wait in queue nine times longer than if the resource were fifty percent idle.”

In case you hadn’t felt like I was positive enough about The Phoenix Project yet, I would say that this book should be provided as mandatory training to every person working in every IT department today, from the guys plugging in cables to the CIO!

If you do read and enjoy the book, I highly recommend also reading The Goal by Eliyahu M. Goldratt. I was a little surprised, to say the least, that this appears to be a very similar story, following a similar arc and some almost identical characters to The Phoenix Project. That said, I am half way through it at the moment and still thoroughly enjoying it, though I am not too worried about missing the movie version!

The Goal by Eli Goldratt CoverThe Goal delves even deeper into the Theory of Constraints and explains some of the tools we can use to mitigate, bypass or remove constraints in a system. All of these tools and methods can be applied as easily to IT as they can to production lines, which (without stating the bleeding obvious) is exactly the point of The Phoenix Project!

Anyway, if you want to do yourself a favour both in terms of your career development, but also a really compelling story and a thoroughly decent book, you could do a lot worse than spending £5 on the Kindle Edition of The Phoenix Project!

Where To Get Them

For anything technical, I like to buy ebooks these days for both portability and the fact that I wont be chopping down trees needlessly. Both of the above titles are available very inexpensively on Kindle:

And Finally…

Sincerest apologies for one of the most click bait-y blog titles I’ve ever posted! Even worse than this one. Honestly, I feel ashamed!

I’ll get my coat…

%d bloggers like this: