My fish forum loads so slow, is CDN even worth it for small sites?

wafflesRgood

New Member
Messages
57
Reaction score
0
Location
Berlin, DE

So I run a small fishkeeping forum, like 200 members, mostly just people posting pics of their tanks and asking why their betta is acting weird. And lately the site has been crawling. Like 5+ seconds to load a page. I'm on shared hosting (I know, I know) and I've got Cloudflare free plan set up but it doesn't seem to do much for the images.

I'm worried my members are gonna bail. And also I'm worried about my actual fish, I have a 20 gallon with some tetras and one of them has been hiding all day. Idk if it's related but stress is stress lol.

I tried BunnyCDN for a week (saw a thread here) and it was faster but then I got confused about cache rules and purged everything and then it was slow again. So I cancelled. Maybe I'm dumb.

Anyway, do small forums even benefit from CDN? Or am I just wasting money? And how do you set up caching so you don't have to purge all the time? I keep reading about TTL and edge rules and my brain hurts.

Any advice appreciated. Also if anyone knows why my tetra is hiding, that's cool too.

kewldad

New Member
Messages
60
Reaction score
0
Location
Calgary, AB

Small forums absolutely benefit from a CDN, that's not wasted money. Honestly it's the opposite, shared hosting is exactly the case where a CDN helps most because your host's upload pipe is garbage and every tank pic is getting squeezed through it. Cloudflare free does basically nothing for images by default because it doesn't cache them unless you tell it to.

The purge spiral is the real trap. Every time you purge you nuke the whole edge cache and everyone's request falls back to your origin, which is the slowest possible state. Fix is boring: give static stuff (jpg, png, css, js) a long TTL, like months, and when you actually change one of those files, rename it instead of purging. site-logo-v2.png type deal. Then you basically never purge. HTML and PHP pages get a short TTL or bypass entirely. That's 90% of the confusion right there, people try to cache dynamic pages and then wonder why things break.

Bunny is fine btw, you weren't dumb, you just changed two variables at once and then cancelled before you got a baseline. If you want to read up on the caching side there's a whole section here

https://websiteforums.info/forums/cdn-and-performance.4/

Also Cloudflare APO for non-WP is worth a skim, mostly because people keep recommending APO to forum owners and it won't do anything for you.

On the tetra, hiding all day is usually params or bullying. Test ammonia and nitrite before you do anything else, and watch at feeding time, if he darts out and eats he's probably just got a jerk in the tank. If he ignores food, that's a different problem.

rk_designs

New Member
Messages
68
Reaction score
0
Location
Vancouver, BC

kewldad nailed the purge thing, that's exactly what bit you. The rule I use is dumb simple: anything with a file extension that never changes gets cached for a year at the edge, and the moment I need to change it I bump the filename. logo.png becomes logo-2.png and I stop touching the cache entirely. Pages and PHP I just bypass. Haven't purged in like four months.

One thing he didn't mention, Cloudflare free will still cache images for you but only if you actually have cache rules set up, the default "cache everything" toggle isn't a thing anymore unless you're on a paid tier or you do it with page rules. That's probably why it felt like it did nothing. It's not a CF problem, it's a config problem.

Also if you're on WordPress with some bloated theme on top of this, fix that first before spending another cent on CDN. I went through this on a client site, ditched Elementor for blocks and the page weight dropped enough that the CDN actually had less to push. No point putting a faster pipe on a fat site.

As for the tetra, hiding for a day is usually just stress from water params, did you test ammonia? Probably unrelated to your site being slow but tbh I'd test before you worry about the fish.

LisaW_

New Member
Messages
53
Reaction score
0
Location
Edinburgh, UK

wait you literally rename the file every time? That feels so hacky but also kind of genius. I've been purging like twice a week and then wondering why the site feels worse after, which now makes zero sense lol. No wonder nothing stuck.

kewldad when you say bypass HTML/PHP, is that a page rule or a cache rule? I'm on free plan and I can never find the same menu people screenshot in tutorials. Feels like CF rearranges the dashboard every time I log in.

Also the tetra, mine did that exact thing after a big water change. Hid behind the filter for two days then acted totally normal. Did you test params yet or just eyeballing it?

maria_lopez

New Member
Messages
66
Reaction score
0
Location
Miami, FL

LisaW_ the renaming thing isn't hacky, it's literally what build tools do automatically (content hashing, filename gets a hash of the file contents). Doing it by hand is just the manual version. So not genius, more like the standard approach, you're just your own build tool now.

On your rules question: free plan gets 3 page rules and like 10 cache rules. Use cache rules, not page rules. Page rule matching is clunky, cache rules you do "if URI path ends with .jpg/.png/.css/.js" then "edge TTL 1 year" and you're done. For HTML don't do a full bypass, set a short TTL like 1 hour instead. You still get some edge benefit and worst case someone sees a page an hour old. Full bypass means every single HTML hit goes to your origin, which on shared hosting is the whole problem.

What's your actual origin TTFB though? Before you touch Cloudflare again, open devtools, disable cache, load a page, look at TTFB. If origin is 4 seconds, no edge config fixes that, you're just shuffling the pain around. rk_designs is right that the bloated theme is the real culprit, fix that first or you're optimizing the wrong layer.

Tetra: hiding all day, are you testing params or eyeballing it? Hiding by itself isn't alarming, they do that. Hiding + not eating + parked near the surface or jammed in a back corner is a different thing. What's your ammonia, nitrite, pH and temp right now? And how long has that tank been running?

rk_designs

New Member
Messages
68
Reaction score
0
Location
Vancouver, BC

Eh, I gotta push back on the 1 hour HTML TTL, maria. On a forum with logins that's how you end up serving some guy a cached page that says he's logged out, or worse, shows the last person's username in the header. CF will hand a cached HTML response to a request carrying a session cookie unless you write a bypass rule for it. So now you're maintaining two rules to save a few hundred ms on a site with 200 members. Not worth it. Bypass the HTML, put the effort into the origin.

LisaW_ the renaming thing does feel hacky until you get used to it, then you wonder why you ever purged anything. Just don't rename stuff you don't control (avatars uploaded by members, that's a whole other headache, and tbh I still just purge those once in a while and eat the 10 seconds of pain).

And my tetra, since I left you hanging: yeah I tested. Ammonia read somewhere between 0 and 0.25 on the API kit, so probably a mini spike from a filter rinse I did earlier in the week. 30% water change, dosed Prime, he's out cruising again this morning. Boring answer, params. Takes four minutes, saves you a panic post.

On the origin TTFB point, that's the one that actually matters. I've been on three hosts where the box was so oversold that the edge was just polishing a turd. If your TTFB is north of 2s that's a hosting problem, not a CDN problem, and there's a whole subforum here that'll tell you the same thing faster than I can Shared and Cloud Hosting. Fwiw I've been paying for hosting with a prepaid card for two years now because my bank flags every web host charge as fraud, so I get the pain of switching hosts. Doesn't stop you from needing to.

What host are you actually on? That's the missing variable in this whole thread.

tommy2k

New Member
Messages
69
Reaction score
0
Location
Mexico City, MX

maria's TTFB point is the one to actually go measure, but I'll throw in a thing nobody's said: your members are uploading phone pics of their tanks. Those are 3-5MB JPEGs straight off a Pixel with zero resizing. No CDN fixes that, no cache rule fixes that, the file itself is just enormous. On my old forum I set a max upload size and auto-resize and the page weight dropped by like 70% overnight. Did more for load times than Cloudflare ever did. Worth checking what the average attachment size is before you touch any edge config.

On the HTML thing, rk_designs is right and I learned it the dumb way. Tried a short TTL on a forum once, got a guy complaining the site kept logging him out, and one weird moment where the header showed someone else's username for a second. Went full bypass that same day. Forum pages are basically all session-dependent so caching them is asking for trouble.

And yeah kewldad's rename trick is the move, I do logo-2.png, logo-3.png like an animal and haven't purged in months. Feels wrong the first three times then you forget you ever cared.

For the tetra, hiding all day is almost always params. Mine sulked for two days after I rinsed a filter cartridge too aggressively. Test ammonia and nitrite, do a small water change, stop staring at him. What forum software are you on though? Change the caching answer a lot, phpBB vs XenForo especially.

tallguy_tx

New Member
Messages
61
Reaction score
0
Location
Austin, TX

tommy2k's phone pics point is the one that actually moved the needle for me. I pulled the stats on my old board and the average attachment was like 3.8MB, and four of them in one tank thread was 60% of the page weight. Capped uploads at 1600px, re-encoded to webp, load went from ~6s to under 2. No CDN touched. A CDN makes the fat files travel faster, it doesn't make them smaller, and people keep skipping that step because it's not as fun as buying a service.

I still purge maybe twice a year for the avatar thing rk_designs mentioned, member uploads are the one case where you can't rename your way out. My fix was lazy: short TTL on just the /uploads/ folder, like 6 hours, and let it expire on its own. Nobody has ever complained about a 6 hour old avatar.

New angle nobody's brought up, if you browse your own site through a VPN to check it (I do, force of habit), Cloudflare can hand you a cached variant from a different colo and it looks exactly like your cache rules are broken when they're fine. Cost me an afternoon of purging before I figured out what I was actually looking at. Test from a clean connection or you're debugging ghosts.

Tetra is almost certainly params, but also check your temp. My heater drifted once and hiding was the only symptom, ammonia was fine the whole time.

bananapeel42

New Member
Messages
53
Reaction score
0
Location
Manchester, UK

Gonna be the contrarian here: for 200 members, I'd genuinely question whether you need a CDN at all yet.

Everyone's debating edge TTLs and cache rules and renaming files, which is all correct, but notice how the two things that actually moved the needle in this thread were tommy2k's image resize point and maria's TTFB point. Neither of those needs Cloudflare. If your origin is spitting out 4 second responses and your members are uploading 4MB phone pics, you're arguing about the last 10% while the first 90% is on fire. A CDN makes fat files travel faster. It doesn't make them small, and it doesn't fix a host that's overselling its box.

I ran a board about that size years ago on a $5 shared plan, no CDN, no Cloudflare. What fixed it was a max upload size and an auto-resize on the attachment handler. Went from unusable to fine in an afternoon. The CDN conversation came way later and honestly made a much smaller difference than I expected.

Not saying don't do it eventually. Just that the ordering matters and this thread has the cart in front of the horse a bit. Also second the point about testing from a clean connection, that VPN colo thing tallguy_tx mentioned has burned me too.

Tetra is params. It's always params. Test the damn water.

nightowl87

New Member
Messages
60
Reaction score
0
Location
Portland, OR

bananapeel42 this is the post that made the whole thread click for me. I've been reading the cache rule stuff nodding along, but nobody said "make the files smaller first" until like five posts in, and that's the part I can actually go do today.

Dumb question though, where do you actually cap upload size? Is that a phpBB setting or does the host handle it? I'm on a tiny board and I've never touched it.

Also kewldad do you dose Prime on every water change or only when params look off? I've got a betta who went pale for two days after I rinsed his filter and I just waited it out like an idiot.

Still not fully sold on the CDN tbh. Feels like buying a faster pipe for pictures the size of my house.

danielp77

New Member
Messages
51
Reaction score
0
Location
Melbourne, AU

nightowl87 if it's phpBB it's in the ACP under Attachment settings, "maximum file size" and "maximum image dimensions." But that only controls what the forum will accept. PHP itself has upload_max_filesize and post_max_size limits that are usually way lower on shared hosting, so check those first or your members just get a generic error instead of a nice "too big" message. I set mine to 2MB and 1600px and it was the single best thing I did on that board.

I'll half push back on bananapeel42 though. Resize first, absolutely, no argument there. But once my images were small the CDN actually did earn its keep, because my shared host throttles bandwidth per account and the tank photo threads would saturate it during evening hours. At that point it wasn't file size, it was 40 people loading the same 15 photos at once. Edge cache ate that traffic and the origin stopped choking. So the ordering is right, I just wouldn't write the CDN off entirely for a 200 member forum.

And yeah, "a faster pipe for pictures the size of my house" is the perfect summary of this whole thread until you actually fix the pictures.

You must log in or register to reply here.