Back in November, I talked about upgrading my blogging platform to use Adobe ColdFusion 2021. And, what started out as a ColdFusion-focused revamp has evolved into a full-court press of all aspects. From implementing Dark Mode using CSS custom properties to finally dropping support for IE11, I'm trying to poke, tweak, prod, and tickle anything that looks old and crufty. As the result of my most recent step in this journey, 100% of my site's traffic is now flowing through the CloudFlare CDN (Content Delivery Network); and, it's doing so for free.
And, as it turns out CloudFlare has a very generous free tier for non-commercial sites and projects! Though, now that I'm using it, I see some paid services that I want to start exploring.
I didn't want to go from zero to 100. So, instead of moving all traffic to CloudFlare from the onset, I registered a new domain name,
bennadel-cdn.com, specifically for my static assets. This way, all top-level traffic would continue to flow directly to my server while allowing the CDN to manage and optimize all secondary asset delivery.
Aside from being an incremental first step, there are actually a number of benefits from serving static assets from a separate domain:
In theory, it increases the number of concurrent connections your browser can make to load content since you're pulling data from multiple, unrelated domains (though, I'm not entirely sure this is still a constraint in modern browsers).
It allows for easier request modification since Request / Response rules can be applied to all traffic flowing through the assets domain.
The browser won't send your cookies to the assets domain since it is not the same domain as your root application experience. This makes your requests and responses smaller (at least a little bit).
Theoretically, you can still use the assets domain in local development (though, I don't actually do that).
I think I'll also be able to add paid-services specifically do this "application" in CloudFlare; but, I haven't really explored any of that yet.
After I got my
bennadel-cdn.com domain up and running, I watched the CloudFlare analytics for a few weeks to see if I ran into any problems. It seemed to be smooth sailing. And, my Lighthouse score immediately went up a bit because I was now caching my static assets.
Over the weekend, I decided to take the leap and move the
bennadel.com name-servers over to CloudFlare so that I could pipe 100% of all traffic through the CDN. Obviously, for a dynamic, ColdFusion-based application with server-side rendering, I don't want to cache my HTML/CFML pages. But, caching aside, there's a lot of value in routing all traffic through the CDN:
DDOS (Distributed Denial of Service) protection - once all traffic is going through CloudFlare, the CDN can use its firewall technologies to help stop any attacks on my site. They even have an "Under Attack?" checkbox that you can toggle to immediately present a "challenge page" for your site visitors.
Big pipes! CloudFlare has spent years building a very fast network in order to distribute static assets. And, by routing normal traffic through their pipes, I'm hoping that it will be like putting my site visitors onto a "highway" instead of having them use "local roads" between them and my origin server.
As with the static asset domain, it allows for easier request modification since Request / Response rules can be applied to all traffic flowing through the main domain.
And, again, I think I'll also be able to add paid-services specifically do this "application" in CloudFlare. I'm curious to see what this Argo Smart Routing is all about.
With the CloudFlare CDN in place, and with many other incremental improvements to my site's structure and CSS, I was super thrilled to receive my first ever 100% rating on performance in Lighthouse. Now, granted, the performance report changes on ever request; but, gosh darn-it if I can't celebrate this win!!
Hecks-to-the-Yeah!!! Now, to be clear, this is my desktop report. My mobile report isn't nearly as good. And, the entire mobile experience for my site leaves something to be desired. But, with 97% of all my traffic coming from desktop devices, I think it makes perfect sense to prioritize the desktop experience.
Oh, and did I mention that CloudFlare is 100% free for my volume of usage? What an amazing service!
I have to say, I've been having a blast updating my ColdFusion site over the last few two months. And, hopefully, I'll have more relevant content to share along the way.