Arm1.ru

Benchmarks for Vapor 1.2.5

About month ago I've launched benchmarks for Server side Swift frameworks. Yesterday I've updated my project to new version of Vapor: 1.2.5. Previous version I used was 1.1.11. 

One of the most important updates in Vapor 1.2.x is that "Vapor is now using a non-blocking server".

So today I decided to run new benchmark for my project updated to Vapor 1.2 and results surprised me. It's not only faster than 1.1.x version, it's now equal to Node.js results!

Vapor vs. Node.js

My server:

  • 2 GB RAM
  • 1 CPU Core
  • SSD
  • 125 MBPS Out
  • Ubuntu 16.10
  • CouchDB

Benchmark from other server was launched as:

wrk -t4 -c20 -d5m https://my_url

API just gets some data from CouchDB and returns it as JSON.

Total requests

 

Requests per second

 

Average Latency

 

These results looks much much better than previous, so I'm sure that backend on Swift can be good choise. The last question for me is memory usage now. Vapor grew after benchmarks from 13.4 mb to 59.1 mb. Maybe there's some memory leaks in my code, will see.

keyboard_return back