Kestrel vs Gin vs Iris vs Express vs Fasthttp on EC2 nano

Since this post got quite a bit of traction, I decided to update it by rerunning all the benchmarks as well as adding GO’s fasthttp and Node’s express to the comparison. I came across this blog post on ayende.com. Here Oren Eini tries to see how far he could push a simple ipify style of api on an EC2 by running a synthetic benchmark. He hosts the http server on a T2.nano instance and then uses wrk to benchmark it from a T2.small instance. After reading this, I thought to myself - surely .NET cannot be quicker than GO. I decided to try and make a similar effort and get a little bit of competition going between a .NET implementation with, hopefully, a representative version of Oren’s .NET server made with GO. For GO - I went with 3 candidates gin, fasthttp and iris. I also benchmark Node’s Express. All the tests were performed on the same EC2 instance, with production/release configurations, so variance should be low. I also use the same parameters for wrk as Oren. This is as close as I could get to apples to apples type of comparison. ...

January 23, 2018 · Vik

Speeding hexo (or any page) for PageSpeed insights

An explanation As mentioned in my previous post, I really wanted to optimize my hexo blog for speed. I’ve started a new project and decided hexo would be a good fit for it. Since I’ve grown used to hexo, it will make development faster. Albeit it’s not a blog I’m working on, but a webpage for a local blacksmith. That will involve quite a few images and just a few text entries/pages. Being able to deploy to S3 is also a benefit - no need to manage anything - and since the webpage is going to be pretty static I’m thinking hexo is a good way to go. The problem though, is that most of the themes that hexo has are quite slow out of the box. For this walkthrough, I’ll be doing a demo repo with a standard hexo init followed by a clone of the theme edinburgh. I have a repo setup with all the steps tagged, so you should be able to see the exact changes I’m making. I’ll include step links just after the heading for each section if you’re interested in following along. Let’s get going then. ...

January 4, 2018 · Vik

Starting a blog with hexo and AWS S3

So me and my girlfriend have been playing with the idea of starting a blog for quite some time now. Having a day off I’ve decided to put it to good use and start creating one. Being a developer I’ve had a few concerns when it came to choosing a blog framework: I’m a control freak so I’d prefer hosting it myself. Blogging platforms are out of the question. I like markdown - the blog must support it. It must be lightweight. It must be easily deployable to s3 static website hosting. I should not need to use anything else than s3 for hosting. Just a text editor and a CLI for a good blogging experience. After a bit of research and a tip from a friend I’ve landed on Hexo.io. It seems to tick all of my boxes. Plugin support seems to be excellent as well. Being based on node it means I’ll mostly be able to find anything my heart might desire. If not - I can code it myself. ...

November 30, 2017 · Vik