Cache Everything (Full Page Cache) to global CDN Locations

Ask yourself, if this page didn’t load almost immediately, but instead there was a blank white page for a few seconds, would you stick around? Around half of web users leave, if it takes longer than 3 seconds to load a web page.

Two years ago I used Cloudflare’s Page Rules, more specifically the “Cache everything” option to full page cache (FPC) this blog’s pages to Cloudflare’s global edge cache locations. Eventually though, I opted to go with BunnyCDN and also configured this WordPress blog with WP-Rocket and Autoptimize. This setup, has resulted in the fastest ever response and page load times for this blog.

Note: This post isn’t referring to the caching of statics (jpg, css, js, etc.), but rather the caching of fully generated HTML pages to CDN locations for near instant delivery to end-users based on their geolocation. This, on top of caching of statics provides a consistently fast user experience.

This blog via full page cache CDN locations.

 

What is Full Page Cache (or Page Caching)?

When you visit a WordPress blog (powers more than 30% of the Web and 60% of CMS websites), the pages by default are generated via a combination of database queries and PHP scripts. This takes time and that time is often ballooned when there’s a burst of traffic. To address this, the most common solution is to enable Page Caching. With Page Cache in place, full pages are saved/cached, so that they don’t need to be regenerated each time when requested.

Serving a page from cache by-passes the server processing that goes into generating a page. This greatly increases page load performance as well as pages-per-second throughput.

 

Why combine Full Page Caching with a CDN?

Although serving a cached page is much, much, faster than page generation, serving a cached page will be measurably slower for users in Europe if your server is located the Unites States and vice versa. This is where the use of a CDN (Content Delivery Network) can help to ensure that the page loading speed for your website, is roughly the same regardless of a visitor’s geographic location. In other words, if a cached page takes 1 second to load in New York, 2 seconds to load in London and up to 3 seconds in Australia… then with a page cached CDN in place, it should be closer to 1 second page loads no matter the user’s geolocation.

This has been my setup for the past year… using WP-Rocket for local page cache set to 4 hours and BunnyCDN for CDN with page cache TTL is set to 24 hours.

BunnyCDN locations

When you visit this blog from the UK, you’ll be served a static page from a London CDN location. If you visit from Las Vegas, you’ll be served from a Los Angeles location, and so on.

 

Performance improvement of Full Page Caching + CDN

Pingdom response reports

The above graph from Pingdom, shows the blog’s average response times before and after adding CDN into the mix. It shows a 30% to 50% improvement. However, my Pingdom checks were setup for North America only, so the global improvement is actually a lot greater. As you can see, the improvement just for USA and Canada is quite remarkable, as such, you can imagine the massive improvement from serving cached pages via Europe and Asia CDN locations. Over the past year, this has improved international traffic, bounce rates and time on site.

Sucuri Global Load Time Tester

Notice in the above test results from Sucuri, the IPs vary by location. Even fairly close locations such as Atlanta and New York are served via close-proximity CDN location to noticeably improve page load performance. Locations such as India, Paris, Singapore and Brazil often took a second or more just for TTFB (Time to first byte).

 

Part 2: full-page-cache CDN article?

Depending if there’s interest in this setup, I’ll publish a part 2 in depth FPC-CDN setup guide. If you’d like that, let me know. However, writing a setup guide would focus on my specific BunnyCDN setup and I don’t just want to promote BunnyCDN. The reality is, this type of CDN-backed FPC setup can be achieved with a number of CDN providers. That said, I highly recommend BunnyCDN, value is great, support is responsive and their CDN is very fast w/ low latency globally. See and decide for yourself.

Lastly, have a look at my 25 Best CDN Providers blog post. In that post, I recommend CDN providers based on your priority or balance on value vs performance… free, budget, small business or enterprise level CDN providers..

 

Reference:
https://www.business2community.com/infographics/faster-website-load-times-can-help-sales-infographic-02044802
https://bunnycdn.com/?ref=jvllmbd1bp (referral link)
https://www.imperva.com/learn/performance/what-is-cdn-how-it-works/

Tags: , ,