On Thursday night, I finally blogged about my new open-source project for self-hosting blog comments using Amazon’s Lambda service. Then a lot of things happened…
I first announced it on Twitter:
I've been working on this for 2 months, and it's finally ready! Host comments for your static blog using AWS Lambda. https://t.co/8bSPCTEXby— Jim Pick (@jimpick) May 5, 2016
Because Vancouver is on the west coast, announcing a project late in the day isn’t the best way to get attention. Europe has already gone to bed, and the east coast people are done with work.
I was happy with the local attention the blog post received, and the commenting system seemed to be working. One of the first comments I received was this:
Tim Bray is a legend and a hero to any blogger, so already I felt like the project was a success!
This is one of the reasons I wanted to do the project in the first place – I wanted a low-friction commenting system so that anybody can leave a comment without having to jump through a lot of identity verification hoops. If Tim Bray had to verify his identity, he’s a busy guy, and my guess is that he might not have left a comment.
On the other hand, that might not be Tim Bray. :-)
On Friday morning, I was planning to do a bit more promotion of the blog post, but before I could do it, I checked Google Analytics, and I noticed I was already getting some traffic from Hacker News. Somebody I didn’t know had already submitted my blog post as a story. Great!
Nobody had commented on Hacker News yet, so I left a message saying I’d answer questions, and then I tweeted again.
(I should have said ‘submitting’, not ‘submitted’. Don’t you wish you could edit tweets?)
Fifteen minutes later…
I had my Google Analytics window open, and I just noticed that I made the home page on HN. Whee! pic.twitter.com/oeIkrD96L7— Jim Pick (@jimpick) May 6, 2016
Just for fun, I left the Google Analytics window open, and I started my screen recording software, and captured time-lapse of the next 4 hours:
Isn’t that crazy?
I was reloading the Hacker News homepage throughout the day, and I think it eventually peaked at the #10 position on the page. Pretty amazing.
Fortunately, all the traffic happened when I had a few hours available to sit around and respond to all the questions. In the blog post, I actively encouraged people to leave comments so they could try out the commenting system, and they did.
I’m always in Slack anyways, so that worked great. Monitoring the comments on Hacker News took a bit more effort, as the conversation there is threaded, and the new comments are distributed throughout the page.
One great thing about all the attention was that people immediately started to find bugs that I wouldn’t have found right away. On Safari, some of the comment form fields were filled with ‘null’. Also, it didn’t work in private browsing mode on Safari. Somebody posted a gigantic file to test if I had implemented limits (I hadn’t). Somebody tried to post in Korean, and the checksums failed (I had to upgrade some client-side libraries to fix the encoding issue). It didn’t build with the newest version of Node (now fixed).
An addition to the bug reports, lots of good feature suggestions were made.
Although I haven’t yet implemented a UI for moderating comments, it was pretty easy to download the JSON file from Amazon S3, edit the file in vim, and then upload it again. A lot of comments were what I’d call ‘content free’, basically just people doing test posts.
Some commenters tried to test the spam filter by leaving spam-like comments. For the most part, nothing got filtered (the filter hasn’t been trained yet). I think Akismet’s algorithm isn’t overly aggressive - it could tell that those comments weren’t real life spam. I even got a Hitler comment (which I eventually removed).
Particularly gratifying is a nice mention I received from Aerobatic, the hosting provider that I’m running the blog on!
As the day progressed, the traffic kept coming in. Jeff Barr from Amazon even did a nice tweet about it:
One thing I’m glad I did was to include a button in the blog post to remind people to ‘Star’ the project on GitHub:
It’s up to 350 stars at the time I’m posting this! That was enough to get it up to the #8 position on GitHub’s trending projects page!
Most of the traffic came from Hacker News, and it managed to stay on the home page there for around 24 hours.
There were just under 8000 visitors, according to Google Analytics.
How much did it cost?
According to AWS Cost Explorer, I paid $1.37 to serve up the JSON file containing the comments to all those visitors. Not bad, considering that is likely the biggest surge in traffic this blog will ever see.
There doesn’t appear to be any charges for DynamoDB or API Gateway. And the number of requests to Lambda are under a million, so it’s free. When I get my end-of-the-month bill on my credit card, I’ll check to see what I was actually charged for.
Overall, I was blown away that people saw the value in the work I’ve done, and it really is going to encourage me to put some extra effort into the project to improve it going forward!
I still don’t know if anybody out there has actually managed to install the comments for themselves. If anybody has had some success, please leave a comment!
And be sure to check out my current contract availability by clicking the ‘+’ in the upper left corner of the page!