What are the CF solutions for dynamic websites?

Hi!

I use Wordpress and I wanted to know what besides Edge Cache, CF can offer to make my site faster for people logged in.

From a simple page where the visitor needs to enter a password, to stores or forums.
In those places as far as I know Edge Cache, it doesn’t work, right?

Is there any solution to speed up PHP via CF?

Thank you!

As far as I know, the only thing Cloudflare can do for truly dynamic sites is Argo (regular Argo, not Tunnel). This speeds up traffic over longer distances.

Other than that, the dynamic HTML you describe fully depend upon server performance. And that includes PHP.

1 Like

To add, trying to speed up/cache dynamic content is like asking to know the future. The backend server needs to generate the csrf tokens, session tokens, etc that power these highly dynamic pages, so unless you introduce a persistent csrf that can be cached/shared between users (a bad idea that would open you up to spam) caching these pages would be either pointless or a security vulnerability.

1 Like

For logged in users only Cloudflare solution is on cloudflare business or enterprise plans with cloudflare railgun https://www.cloudflare.com/en-au/website-optimization/railgun/.

It works specifically on non cacheable dynamic content not to cache it but to reduce the amount of data transferred between your origin and cloudflare edge servers.

It does this when you install railgun client on your origin with memcached server to store data to setup a persistent connection to cloudflare edge servers. Then this connection acts like another proxy between your cloudflare edge and origin server and has full insights to inspect your dynamic HTML pages to know what specific content changes on the page changes between requests.

The railgun client on your origin only sends a binary based compressed diff of the changes it detects on a dynamic HTML page to cloudflare edge instead of the full HTML page which may only had a few bytes changed for a logged in user (private logged in data).

I use Cloudflare railgun on my forums to accelerate logged in forum members page loads. And combine that with cloudflare CDN Cache for guests to cache full HTML pages via page rules and cloudflare worker based advance caching logic for guest visitors. Logged in vs logged out guest users are differentiated by Cloudflare Business or higher plan’s Bypass cache on cookie page rules and also custom CF Worker bypass cache on predefined cookie logic.

Note though cloudflare intends to eventually depreciate railgun and merge into Argo tunnels so development updates for railgun to support newer operating system versions like Ubuntu 20 and CentOS 8 may not be available or coming. Might need to ask cloudflare support about your particular operating system support.

Also to be able to install and configured railgun and memcached server, you need to have origin server full root user access which means usually using VPS or dedicated server for your origin

Another note is Cloudflare railgun is incompatible with cloudflare authenticated origin pull certificates https://developers.cloudflare.com/ssl/origin/authenticated-origin-pull/

2 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.