New beta update has noticeably slowed initial load time with a reverse proxy?

I have a very small forum, it is less than a week old and was running fine up until an hour ago when I updated to the new beta version. now when I access the site I’m getting a blank white screen for over 3/4 seconds, cloudflare CDN only lowers it to over 2.7 (apparently, but i think its longer)

anything i can do about this? it is not very appealing when I am trying to get a forum off the ground

even a loading screen would help, far from ideal but it would atleast look like the site wasnt broken

When you say Cloudflare CDN, how are you using it?

We have an open bug where if you have a broken reverse proxy (like a badly configured nginx or a cloudflare orange cloud) you will be using uncompressed assets, which will be huge and take a lot of time to download, resulting in a way slower first page load. The bug is also triggered by a working install + older browser (IE11, or anything else that doesn’t speak brotli).

You need to fix your reverse proxy anyway, but the underlying bug will be fixed this week, hopefully.

6 Likes

Well i essentially just updated the dns per cloudflare instructions and paid for ‘argo’, i havent touched the vps or discourse application, am i missing a step? Its worth noting i only resorted to couldflare because the load time was 3+ seconds anyway

Also thanks for the quick reply from you both

AFAIK, using Argo is completely untested, if we were looking at a map you’ve basically strayed into the region marked “thar be dragons”.

You need to turn off all of Cloudflare’s optimisations to use it with Discourse, a page rule which looks like this will suffice:

Discourse already optimises the code whenever you rebuild or update, Cloudflare can’t do better than that, having it massage the code in any way is unsupported. It’s also advisable to shut off brotli in speed settings as their implementation has periodically introduced issues in the past.

You can use a rule to cache /uploads, but this is really the extent to which Cloudflare can be used. Even then, remember that you’re adding hops between client and server, which constitutes most of what users feel when browsing a discourse site. So, while it might alleviate some server load by reducing asset requests, it won’t be as efficient as using a real CDN.

2 Likes

thanks for the help, i only really gave cloudflare a try when i started getting long white screen on initial load, are there any other solutions to fix this without a CDN? and what ‘real’ CDN would you recommend?

Cloudflare acts as a CDN by inserting itself in the path as a reverse proxy and caching requests for assets.

Any s3-like CDN which offloads assets to another URL will speed up asset delivery without standing in the path between client and server. There are lots of examples here on Meta of other CDN implementations.

The gzip bug is fixed in latest, please update your site ASAP.

7 Likes