My Docker Powered Ghost Blog Handled Hacker News Front Page

My Docker Powered Ghost Blog Handled Hacker News Front Page

Life tends to sit in the corner waiting to catch you off guard. Much like my infant son, he waits till I'm out of arms reach to try one of his kamikaze moves ending 9 times out of 10 in a face plant. However, my Docker powered Ghost Blog was ready for the challenge.

Recently, My Docker Alpine Post went quasi viral in the tech news universe. The post was submitted by a random person to Hacker News and then the story proceeded to the Top 4 on Hacker News, Top Story of Slashdot and was covered by several Linux publications after the submission. All this kicked off while I was counting containers while sleeping.

The typical traffic that this website receives is normally between 200 to 300 visitors a day. On February 6th, when my site hit HN it had a free hamburger type mad rush of visitors show up peaking at 30,000 visitors in less than 24 hours.

This Blog is running a single Ghost Docker container on a Digital Ocean droplet that has 2GB of RAM with 2 CPU's. In front of the Blog is the free CloudFlare CDN services which does a great job of not only providing free SSL and better performance but also threat mitigation.

Docker Ghost Blog Performance

So how did this small Blog handle such a rush of visitors? Surprisingly, quite well. I was actually a bit shocked. Not only did it stay up the entire time but it continued serving pages at consistent speeds.
CloudFlare Statistics for Hacker NewsCloudFlare Statistics

It appears CloudFlare took a major load off my server by serving up cached copies. However, I did notice a large discrepancy between the analytics in CloudFlare and Google Analytics of around 10,000 users. So of course I will use the large number until I figure out who is correct.

The load on the actual Digital Ocean droplet looked to be running just above idle as seen in the graph below. The CPU reached a whopping 6% utilization at its peak.

Digital Ocean CPU PerformanceDigital Ocean CPU Performance

The real indicator of the traffic spike was only really represented in the bandwidth logs. But even in the grand scope of things it was barely a blip on the radar.
Digital Ocean Bandwidth and Disk PerformanceBandwidth and Disk performance

The amazing simplicity about this setup proves that it can and will handle traffic spikes. Unlike WordPress where it is recommended to install X number of plugins to do caching, image optimization, SEO, etc. My previous high level traffic events on WordPress sites made all my hair fall out. WordPress chew through Memory and the plugins were a pain to configure and keep updated and always ended in tears.

Ghost just runs right out of the box combined with Docker enables a truly flexible and durable solution.

Lessons Learned

If I knew ahead of time that I would receive such a burst of traffic I would have prepared the following:

  1. Newsletter - Someone emailed me and complimented and complained to me at the same time. They informed me that they enjoyed my content but found it really hard to subscribe or stay updated on new articles. Hence, I added a Newsletter section in the sidebar and footer and created an initial Newsletter pop-up. But this was only changed on the downside of the spike. Doh!

  2. About Page - I started digging through my analytics and found a lot visitors click through to the About Page but abandoned shortly after. I shortened my about page considerably, added my DockerCon Video and added social links and contact info. Afterwards, visitors not only stayed on longer but they transitioned on to other pages.

  3. Contact Page - Another page which I noticed traffic without action. This page used to contain a Google Form for my contact page. I have since deleted it and added my social contacts as well as a direct email link. This appears to work much better and emails have increased from my blog. Not sure if this is a good thing :)

Next Steps

I still have a ton of articles in the queue that I need to research and write ranging from Docker Image best practices to why air travel continues to decline and not get better with technology.

Also on the ToDo list is to build a monthly newsletter. The newsletter will cover all the interesting projects I stumble across or working on, books I'm reading and some general TIL (Today I Learned) information. If you're interested be sure to sign up here in the sidebar or footer.

Comments powered by Disqus