Dec
28

So during my misspent christmas break I decided to play around and make a new website, however I wanted to make it a success with some meaningful traffic. So I  decided to play around and see how high I could get on hacker news, and how much traffic I could actually generate from there to my site (also advertising revenue would be interesting).

From experience of reading HN (Hacker News) one of the best things to do is present the community with a recent project that you have completed by hacking stuff together, they generally offer some great feedback and you get quite a few hits (I assume).

Obviously I also wanted to make something that was useful, so I had a look around at the domains I already had, route.im and traceroute.im sprung to mind as I purchased them a few months before, with the intention of creating a simple web interface to trace route an IP address or Hostname.

Build Time

The Design

I started with a fairly simple CSS template from another unfinished project and used some very basic PHP scripting to perform a simple trace route and display the results. I was fairly happy with the product so I uploaded to my web server (also used for this blog) and did some final testing, everything looked good to go!

The DNS for the domains got updated, however route.im was actually already pointing at the right server so I could launch it even faster than normal. Traceroute.im was now updated however that would take some time to prorogate, but nothing that should stop me…

Time to go public

Route.im was now live, so I passed the url around to a few people on twitter, MSN and facebook to have a look at, beta test completed and finally time to let the public have at it, or at least I hope it is.

Picking the title wasn’t too hard “My 2 hour morning project, route.im” was short and to the point, surly that’s going to drag a few people in to have a look?

That’s it we are live, time to keep an eye on my HN points and comments, when you first post on HN you are placed in the ‘newest’ section, only a few people go through here an up vote content giving you points, the aim is to get enough points to get into the top 30 stories, as your then on the home page! I am not sure of their formula however you basically need a constant stream of points to get on the home page and then stay there.

Welcome to the home page

Thankfully enough people found my story interesting enough and with only 10 votes in a short space of time I got to number 3 on the home page of HN (I think this was the peak position although I got too busy to keep checking), I did a quick look at my server load and it didn’t seem to be high, however looking at the nginx logs there were a lot of people on the site!

Then I quickly decided I needed some better logging on the site, so I made a MySQL table and started to log all of the searches been made and timestamps, wow there was a lot! Also I created a page so vistiors could see this.

Server died…

One of the best things about HN is the comments you get back from people going on your site, so always have a window open and keep refreshing it, instantly there were 3 posts from people saying it wasn’t working…

Turns out the server died, before I only had 4 PHP processes as the PHP code processed quick and didn’t hog the resources. However while one process was waiting for a trace route to complete it couldn’t serve any other users, and there was a lot more than 4 request waiting for a process. So I quickly bumped up the PHP processes to 20, also I did the same to Nginx and restarted the services. Disaster averted and users were ‘happy’ again. Here’s a look at some of the traffic figures, and this was after the first ‘peak’.

Live Traffic View

Firefighting, is fun!

Here was a few bugs found with the script, I tried to fix these ASAP

  • So many users caused the site to crash – Not enough PHP processes, added more and restarted PHP server.
  • Couldn’t trace IPv6 via IP but could via Hostname – Regular expression filtered out the colon ‘:’, simple fix.
  • Couldn’t trace a domain with ‘-‘ included – Regular expression filtered out the ‘-‘, simple fix

Over time I did go down the list on HN home page, however I am still there while posting this, and there is quite a few comments!

That's me at 9th

Feature Requests

With the bug reports and comments came a load of feature requestes:

  • Show IP geographic location
  • Show IP route on a Map
  • Show ASN for the route
  • Change URL format so you can enter target there, e.g. route.im/8.8.8.8
  • Trace route from multiple locations to a single destination
  • Auto fill the user field with their IP address

Revenue

I wasn’t going to post about revenue, however it did see a bit dishonest if I intentionally missed it out, so yes have made some money from been featured on HN, below is a screenshot of my adsense revenue. I expect this will probably die off to less than that in a month, however hopefully with some new features we can keep people coming back to the site and sustain some of it.

I am probably going to do some kind of contest on the website over the next few weeks with the generated revenue, just to say thanks :)

Some tips

  • Make sure your app is secure, people on HN like looking for SQL injection from my logs :)
  • Decent logs is always a good thing to have
  • Pay attention to the feedback, bad feedback is the best type!
  • Don’t be afraid of putting something out there so get some feedback
  • Make sure your server is ready for the traffic, if its not, be ready
  • Hack together bug fixes quick if you can
  • Reply to all comments, you will probably get more people commenting then
  • If you don’t get to the front page, change something before posting again.
  • Have a look at other HN stories to get ideas.
  • Please go in the new section of HN and up vote good stories, it really helps people!

A finial little graph of my Varnish Cache graph from the initial burst:

Varnish Cache is working!

 

Sorry for the quick post, lack of proof reading and probably vast number of typo’s. I just wanted to get my thoughts out there, I am off now to do some more coding to improve the site!

Thanks, please leave you comments below!

Bookmark this on Digg
Share on reddit
Share on StumbleUpon
Bookmark this on Delicious
Share on LinkedIn

You can leave a response, or trackback from your own site.

Leave a Reply

Our Sponsors