Benchmarking Express vs Vapor

Migrating gitignore.io from Express To Vapor #

I have maintained gitignore.io since February of 2013. Recently, I decided to update the website from the ground up to version 2.0 with lofty goals such as snapshot tests, public metrics, localization, 100% test cases, and 100% code coverage. My goal was to increase site performance under the same server constraints. I’ve been running the site using one free Heroku Dyno since 2013 and as the site slowly grows, I want to ensure that the site is fast.

Why Vapor? #

Vapor fit my 2.0 requirements needs. I tried Perfect and looked at IBM Kitura, but at the time neither had a good localization solution. The server-side Swift community is growing rapidly and each framework solves slightly different problems when it comes to building web applications and web services. That being said, all three communities are awesome and extremely helpful. If you are choosing a framework, you need to research at least these 3 and figure out which one fits your needs the best.

Benchmarks #

I am running these benchmarks on my late 2015 iMac with both web applications running with the production flag enabled.
machine.png

The JavaScript version of gitignore.io website uses Kraken JS which sits on top of Express JS. Swift uses the Vapor framework.

Conclusion #

A lot of people ask me if server-side Swift is ready for production. The answer to that question depends on your needs, but in my case — it is definitely ready. I’ve been running Vapor for about 2 months now without any problems. The community on the Slack channel is also excellent. As the server-side Swift community does more work to establish Server Foundation, the server-side Swift community will see even greater performance gains.

Check out gitignore.io to see a production server-side Swift web application.

 
72
Kudos
 
72
Kudos

Now read this

Gitignore.io Template Fork

Growing Beyond GitHub’s gitignore Template List # Since Feb 13, 2013, gitignore.io relied on GitHub’s list of gitignore templates to power the website. GitHub maintains the most popular gitignore template list as reflected by it’s... Continue →