How I Survived the Front Page of Hacker News Without Crashing My Server

The Context: My First Front Page on Hacker News
Last week, I published a post about my experience at a startup weekend competition—our team won, and I wanted to share the lessons.
On April 23rd, I submitted the link to Hacker News. The next morning, I woke up to a surprise: Umami showed a 5,000% increase in visitors over the past 24 hours.
Normally, my blog gets 50–100 daily views. But in just 4 hours, I had nearly 1,300. According to the Wayback Machine, the article peaked at #16 on Hacker News—something I’d never even dreamed of.
By the end of the day, my site had served 194,000 requests—and it never went down.
And yes… I even started a Docker build on the same server during the spike before reviewing the analytics.
Was I Ready for That Much Traffic?
No. At least, not intentionally.
But thanks to past experimentation with caching and web performance optimization, my setup handled it. I use Ghost CMS for my blog, and last year I invested time in tuning it for performance.
How I Prepared: Two Layers of Caching
1. Cloudflare in Front
My blog isn’t directly exposed to the internet—it’s behind a Cloudflare proxy. This helps:
- Block malicious traffic
- Provide a global CDN for caching static assets
- Reduce server load by serving cached responses from edge nodes
2. Cache-Friendly Ghost CMS Configuration
I also fine-tuned Ghost’s cache headers to help Cloudflare do its job.
Here’s what I set in my Docker Compose .env
file:
caching__contentApi__maxAge=60
caching__frontend__maxAge=60
caching__robotstxt__maxAge=36000
This tells Ghost to set proper Cache-Control
headers, so responses are cached both in browsers and by Cloudflare—especially useful when hundreds of users hit the same page simultaneously.
🔗 Learn more in the official Ghost documentation
How Cloudflare Saved My Server
Cloudflare was critical. Here’s how I set it up:
- Admin portal excluded from caching (for security and accuracy)
- Everything else set to “cache everything” with respect to origin headers
As a result, 94% of all requests were served from cache during the Hacker News spike, according to Cloudflare Analytics.
This drastically reduced the number of requests reaching my actual server and you can see that in the following graph.

My Stack: Minimal, Scalable, Docker-Based
My infrastructure uses:
- Docker Compose + Traefik for reverse proxying. read more here.
- Cloudflare for security and caching.
- Ghost CMS for blogging
- ~24 self-hosted sites and tools (like Activepieces ) on a single 4 core ARM server.
Even while building a Docker image during the spike, the system stayed fast and responsive.
TL;DR: Want Your Blog to Survive Hacker News?
Here’s what worked for me:
- Put Cloudflare in front of your site
- Configure your CMS to set cache headers correctly
- Use Docker + Traefik for modular, scalable hosting
- Avoid overcomplicated setups—opt for stability and cacheability
Need Help Setting This Up?
I’m a freelance DevOps and monitoring consultant, and I can help configure your Ghost (or other) stack for performance, caching, and observability.
Mail me or visit click the button bellow if you'd like help prepping your server for a Hacker News-level spike.
Contact me via mail to discuss how I can help you.
Thanks for reading this far! I’ll definitely share more about my stack, my experience as a startup founder, and programming tips in future posts. If that sounds interesting, feel free to subscribe—it's free, and you'll be the first to know when new content drops.
Comments ()