How do I achieve 100% edge cache on Cloudflare?

I am on the Cloudflare free plan and I currently run a small WordPress site with mostly static content.

I have a page rule that caches my content and when I look at the Overview section, I see that 72% of the requests are cached.

My website hosting provider is due to renew my site in a couple of months and I would really like to stop paying for a hosting provider. Given that I have AT&T fiber with a gigabit connection, I was planning on installing Linux on a spare laptop and run my website from the laptop using a dynamic DNS, which Cloudflare would point to.

In order to achieve my plan I would like to know the following:

  1. In the Cloudflare Free plan, is there a way to achieve 100% edge caching?

  2. In the Cloudflare Free plan, after how many gigabytes of cache data does Cloudflare stop serving data from the edge servers and send all traffic to the origin server?

  3. In the Pro plan @ $20 per month, is there a way to achieve 100% edge caching or come close to it?

  4. Does anyone have a better suggestion or architecture where Cloudflare does all the heavy lifting and serves the website from its edge servers?

Thanks in advance for the answers/suggestions.

No, you can’t get 100% edge cache. Super-high traffic sites can get close to that, but it’s extremely difficult.

If you’re daring enough to put Linux on a spare laptop, you’re daring enough to use WP2Static to generate a static version of your site, and use Wrangler to push it to Cloudflare Workers.

And…if you’re willing to shell out $20/month for a pro plan, why not just pay $5/month for a VPS and save yourself a bunch of headaches?

EDIT: Workers is going to cost you $5/month. Another way to get Cloudflare to do most of the heavy lifting is to create a Cache Everything page rule for your site, but a primary rule to Bypass Cache for wp-admin.

4 Likes

Thank you for the prompt response. You answered questions 1, 3, and 4 and I appreciate that.

What about question 2: “In the Cloudflare Free plan, after how many gigabytes of cache data does Cloudflare stop serving data from the edge servers and send all traffic to the origin server?”

My site also has those two page rules you suggested:

  • On all pages /* … Cache Level: Cache Everything, Edge Cache TTL: 30 days

  • On /wp-admin* … Browser Integrity Check: On, Security Level: I’m Under Attack, Cache Level: Bypass, Disable Apps, Disable Performance

With your new architecture suggestion, you inspired me and I am now thinking of using WP2Static to convert my site to static and host the website using a Google Cloud Storage Bucket with HTTPS.

I found these two excellent sources on how to achieve it:

Hosting a static site using GCP
https://cloud.google.com/storage/docs/hosting-static-website

Using an SSL certificate with a GCP storage bucket

As for a Cache limit, it’s a matter of not abusing the system. If your site’s primary purpose is to host video or audio, you’ll likely get warned, then get kicked out of it continues.

This topic was automatically closed after 30 days. New replies are no longer allowed.