Over-optimisation slows your site

Jon12345

Active member
Do you ever feel that after you try to over-optimise, you end up making your site slower? Recently, I just added a redis cache and switched from BunnyCDN to Cloudflare $20pm plan. I swear my site is slower!
 

ozzy47

Well-known member
Probably the same thing as adding to many anti virus programs to your PC, they canceled out each other.
 

Jon12345

Active member
The DNS lookup speeds on Cloudflare are a significant improvement over my domain registrars. I've gone from like 110ms to 10ms. I know that affects TTFB. But I am not sure what else affects it. I would have thought distance to a POP, and Cloudflare has the most. An interesting thread would be the best settings for the paid version of Cloudlfare for people who have Xenforo forums. I would be interested in reading that info!
 

rdn

Well-known member
The DNS lookup speeds on Cloudflare are a significant improvement over my domain registrars.
You can still use Cloudflare but for DNS only with orange cloud disable/grayed.
Then switch back to Free plan.

Or you can try Argo/Railgun/Full Page Caching via Cookie which is expensive.
 

Jon12345

Active member
I thought the free plan doesn't give fast DNS speeds??

Things like Railgun etc are way too expensive for me!
 

Jon12345

Active member
I am confused by the orange cloud thing. Do you mean that you can still get fast DNS speeds on the free plan if you disable the orange cloud toggle?
 

Jon12345

Active member
Ah ok, thanks. I was going to go with DNSMadeEasy for $5pm. Sounds like Cloudflare offers quite a bit for free. Why am I paying $20pm then? :LOL: 😭

I know I am getting image compression, but is that worth $20pm?
 

Jon12345

Active member
I am befuddled! lol

I see the image compression as a bonus when someone has a sizeable image in a thread. But those threads are in the minority. Most threads only have the avatars as images and they are relatively small in size.

I see the options on the orange cloud as being proxied or DNS only. What is being proxied on that setting?

Are we saying that just having DNS only will not slow the TTFB, only the proxied setting will do that? I presume it is the security aspects of Cloudflare that slow the TTFB.

You guys are making me think that I just blew $20 on the wrong thing! What would you spend that $20 on to improve the site speed?
 

Sam9

Member
I see the image compression as a bonus when someone has a sizeable image in a thread. But those threads are in the minority. Most threads only have the avatars as images and they are relatively small in size.
There are a couple of Xenforo addons which handle image compression, or you can do it yourself using nginx's image filter module. However, unless your site is very image heavy (which it doesn't sound like it is) the gains will be negligible. However, it's worth making sure that all of your theme images are compressed, but you can easily do this manually.

I see the options on the orange cloud as being proxied or DNS only. What is being proxied on that setting?

Are we saying that just having DNS only will not slow the TTFB, only the proxied setting will do that? I presume it is the security aspects of Cloudflare that slow the TTFB.
With the orange cloud, everything is being proxied, including all HTML, images, etc. This will have a small impact on TTFB for uncached items, like the initial page requests. However, images/css/js/etc should load faster as they're being sent from Cloudflare's edge locations, you can confirm this by looking at the headers of the static content requests and making sure there is "cf-cache-status: HIT". If you have good internet and are nearby to your origin server, the gains may be hard to see, but users who are further away or on poorer connections will see greater improvements.

By just using Cloudflare's DNS and not proxying your site through their network, you'll be missing out on your static content being cached throughout their CDN, as well as most of their other features.

Bear in mind every time you toggle the "cloud" DNS has to propagate again, which can take a while, although you can speed this up by clearing your local DNS cache, and using a third party DNS provider locally, and purging their DNS cache as well.

You guys are making me think that I just blew $20 on the wrong thing! What would you spend that $20 on to improve the site speed?
You could perhaps get a faster server, on a better network, but if your current server is adequate, then just save that $20.
 

djbaxter

Well-known member
I am befuddled! lol

I see the image compression as a bonus when someone has a sizeable image in a thread. But those threads are in the minority. Most threads only have the avatars as images and they are relatively small in size.

I see the options on the orange cloud as being proxied or DNS only. What is being proxied on that setting?

Are we saying that just having DNS only will not slow the TTFB, only the proxied setting will do that? I presume it is the security aspects of Cloudflare that slow the TTFB.

You guys are making me think that I just blew $20 on the wrong thing! What would you spend that $20 on to improve the site speed?
I think you already have Litespeed, correct? Just tune that.

The only reason to use Cloudflare and the $20 option in particular is for the WAF feature if you are experiencing DDoS attacks. However, I've found that even that isn't very effective for certain types of attacks.
 

Jon12345

Active member
@Sam9 Thanks for that. Helped clarify a few things. I will check to make sure you are using those hits you mentioned. I am not using nginx. Instead, I have litespeed + cache.

@djbaxter I didn't know you could "tune" litespeed. Any suggestions on where I might look to tune it? Sounds interesting!
 

djbaxter

Well-known member
I'm still figuring that out myself, TBH. One of the sites where I provide tech support was recently migrated to a Knownhost VPS and we added Litespeed on the recommendation of @JonathanW. Among other things, Cloudflare wasn't managing multiple hits from China any more and then I ran into an annoying issue where I couldn't log in to the Cloudflare dashboard to make changes; we canceled Cloudflare.

If you sign in to the Litespeed Dashboard you will see that there are popups next to every setting to explain what is does and the recommended settings. It seems that by default many options are left at "Not set" and if you're unsure it's probably best to leave it that way. Our biggest concern was not site speed per se but having 2000+ "guests" from China and Taiwan online at the same time.

But ask your host about how you can improve performance with Litespeed. We don't have LSCache installed (yet anyway) but I understand that can also be optimized.


Cache your XenForo 1.x Site
The LiteSpeed Cache Add-on for XenForo 1.x is a PHP-based add-on that communicates with your installation of LiteSpeed Web Server and its built-in page cache, LSCache. Because LSCache is built directly into LSWS, overhead is reduced and caching can be done more efficiently than with other PHP-based caches. LSCXF1 also supports HTTPS, HTTP/2, and QUIC out-of-box with no extra configuration necessary.

LiteSpeed's XF 1.x cache add-on allows you to significantly speed up your forum pages, and keep your visitors' attention. Nobody wants to wait more than a few seconds for pages to load. With LSCache, your guests won't have to.

LSCache for XenForo 2.x is also available. The LiteSpeed Cache Add-on for XenForo 2.x caches dynamic content as static HTML for guest users. Currently, LSCXF2's caching is rewrite-rule based (as opposed to LSCXF1's, which is tag-based). Using rewrite rules, content is cached for 5 minutes at a time. On a busy forum, this is enough to reduce server load significantly.
You can get some more hints at




LiteSpeed provides cutting-edge Anti-DDoS protection against Layer 7 attacks and more! Employ reCAPTCHA, Per-IP Throttling, SSL Renegotiation Protection, ModSecurity, and other measures to mitigate denial of service attacks, and keep your system running smoothly.
 

Jon12345

Active member
I am also with Knownhost and I've already setup the cache. Whether I have done it correctly or not is to be seen, but I am showing hits in the Chrome browser developer tools.

I've never signed into the litespeed dashboard. Think I better take a peek!
 

djbaxter

Well-known member
I thought so. I have found that their tech support has been really helpful as I've been trying to fine tune Litespeed.
 
Top