QR Code contains TinyURL of this article.Kudos to SDF

I posted an article, iOS 7.1 Mobile Safari Minimal UI, earlier this week that ended up on the front page of Hacker News (HN) (getting as high as #5 at its peak). It was great to see my article linked from HN but also a little scary. Why? Well HN generates a lot of traffic and web-sites often go down under the load.

Still, if my site went down it wouldn’t be the end of the world would it?

No. But it would be personally embarrassing. I have written much about making this site scalable and fast. I have advocated static sites, minimalism and optimisation. I have made an effort to reduce this site’s footprint and overheads. It would reflect badly on me if, after all my endeavours, the site didn’t survive a little traffic surge.

Screen capture of my post [iOS 7.1 Mobile Safari Minimal UI] on the front page of Hacker News
Screen capture of my iOS 7.1 Mobile Safari Minimal UI post on the front page of Hacker News

Perpetual βeta didn’t go down. In fact, it didn’t seem to suffer at all under the load. But what was the load? I don’t use Google Analytics or any other kind of tracking or monitoring service on this website.1  So the only way I can get any idea of the impact of the HN link is by looking at Apache’s raw access-log data:

$ grep -c "^\[1[8-9]/Mar/2014.\+/weblog/ios-7-dot-1-mobile-safari-minimal-ui.html" apache.log

This query returns a count of the number of times in which Apache received a request for the URI:

/weblog/ios-7-dot-1-mobile-safari-minimal-ui.html

and also where the access date is either the 18th or 19th of March 2014.2  It returns a rather surprising: 217,048 hits. If these were evenly distributed over the ~27.5 hours we’re reporting on then we’re looking at ~9000 accesses per hour.3

It was rewarding to see that my website didn’t falter under this load. Out of curiosity, I periodically visited the page, with an empty cache, whilst it was on HN’s front page to check its availability and see how it was holding up. I surprised me to see that it remained as fast under load as it is in normal conditions, taking ~1.5 seconds to load the linked article (including its assets).

Waterfall report of the load time of my post [iOS 7.1 Mobile Safari Minimal UI] whilst it was on the front page of Hacker News
Waterfall report of the load time of my post, iOS 7.1 Mobile Safari Minimal UI, whilst it was on the front page of Hacker News

So here’s what blows my mind: this website isn’t hosted on a dedicated, high-performance server — it’s on a shared Apache box along with ~300 other websites!

It’s a testament to the SDF that this site stayed up and remained fast during its flirtation with Hacker News. I’d like to take this opportunity thank everyone at SDF4 for providing me with a platform that is both speedy and resilient.

  1. See the Perpetual βeta Privacy Policy↩︎

  2. I published the iOS 7.1 Mobile Safari Minimal UI on the 18th of March 2014 at 20:28 (GMT). It appeared on HN’s front page shortly afterwards and stayed there for 17 hours. ↩︎

  3. This is hardly a scientific analysis I know, but it does give us something of an idea of the scope of traffic that a link on HN can generate. ↩︎

  4. Wikipedia entry on the SDF↩︎