Benchmarking Express vs Vapor

Migrating from Express To Vapor #

I have maintained 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.

The JavaScript version of 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 to see a production server-side Swift web application.


Now read this Open Source System Architecture

Building A Service On Great Open Source Tools # I’ve been working on as a side project since February 10th, 2013 and the service has slowly grown to host over 250 gitignore templates. I finally got a chance to create a... Continue →