The last post I wrote made it onto Hacker News - a very popular site for nerds and geeks. At one point it was number 2 which is pretty impressive.
In the space of one day the site received over 45,000 requests for the page, and according to my logs that was over 29,000 unique IP addresses. To put that into perspective here’s the daily stats from Google Analytics for december:
This sudden influx of people is known as the “Hacker News Effect”. For a lot of websites - especially ones that have complex functionality - this can cause the site to completely collapse and stop serving traffic. Fortunately for my blog, there’s not really an issue, it’s s statically generated site made using Jekyll, so it’s just plain HTML, CSS and images. I’m also hosting my site on Amazon AWS and serving everything via CloudFront, so in theory, it should be able to handle a lot of traffic.
It’s also pretty cheap to run - I had a look at the costs around the time period and in total it was about 12 cents.
I’m sure there are even cheaper ways to host the site, but this is what I’m used to and it works well enough for me.
I did recently set up traffic logging on CloudFront, which means I’ve got some quite nice logs of the hacker news effect. Using the IP-Addresses from the logs we can work out the approximate location of the requests. It’s not always perfect - but it does get you pretty close to where the traffic is coming from - though sometimes all you can get is the country.
It’s pretty interesting to see the world light up as people get out of bed and check the latest news.
You can watch a really nice animation of this at the end of this video.
And you can play with the map here.