Benchmarks: Vapor 3 vs. Vapor 2
After migrating (almost rewriting) my small project from Vapor 2 to Vapor 3 I've run benchmarks to compare performance. I didn't run benchmarks for the last version of Vapor 2.x so I will compare Vapor 2.1.0 to results of Vapor 3.1.0.
- 2 GB RAM
- 1 CPU Core
- 125 MBPS Out
- Ubuntu 16.04.2 LTS
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. Vapor project was compiled with Swift 4.2.
Requests per second
Vapor 3 was rewriten and now it's based on Apple's NIO. It's faster than Vapor 2 but using more memory which is not critical.keyboard_return back