Great job on improving the performance of the site. It has become much faster.
Mind sharing some details as to how you improved the speed?
Sure! So Indie Hackers is a single-page app built using Ember. For those who don't know, that basically means the server returns an empty HTML page + a ton of JavaScript, and the JavaScript is responsible for drawing the site. When you click on links, instead of requesting another page from the server (which takes time), the existing JavaScript simply redraws the page (almost instantly).
The downside of this approach is that the JavaScript loads after the HTML. Thus, when you initially load the site, you get an empty/loading screen for a second or two, and then finally the JavaScript finishes loading and draws the site. I fixed this by using server-side rendering via Ember FastBoot. Basically, my server has a copy of Ember on it. When it receives a request, it renders the app and responds with the HTML. Thus, your browser can show the finished HTML instead of an empty/loading screen while it waits for the JS to load.
Unfortunately, that only really shifts the burden to the server. Sure, once the server responds, the HTML is now immediately visible. However, it now takes a while for the server to respond, since it has to render the Ember app, and that process is slow. The solution is caching, and for that I'm using Amazon CloudFront, a CDN with edge locations (servers) all over the world.
When you request IndieHackers.com, it goes to the nearest CloudFront edge location. That server will ping my server, which will take a second or two to render the Ember app's HTML, then send it back to the CloudFront server. CloudFront will cache that response and then serve it to your browser. From now on, any future requests you (or anyone else) make to that edge location will be super fast, because it can skip hitting my server at all and just instantly respond with the cached value. I'm caching literally everything: the HTML, CSS, JS, images, etc.
So the TL;DR is a combination of...
I'm also doing lots of other important things like concatenating my JS and CSS into one file each, minifying my JS/CSS/HTML, using gzip compression on all my assets, and optimizing images to make them as small as possible.
Thanks for the detailed explanation!