I've cloned the API template, changed it to use MySQL, configured MySQL params, added one route (GET /devices) which calls the DeviceController's index method which gets 100 devices from the DB and sends a response as a json array.
I've benchmarked it with ab and it fails (timeout). With wrk:
I've cloned the API template, changed it to use MySQL, configured MySQL params, added one route (GET /devices) which calls the DeviceController's index method which gets 100 devices from the DB and sends a response as a json array. I've benchmarked it with ab and it fails (timeout). With wrk:
I get only 7 req/sec. Laravel does 20-30 req/sec. Rx-Jersey does 400 req/sec.
MySQL query that Vapor does (and others) takes 1-2ms.
Making a request from Postman and similar tools: Vapor 3: 110-120ms Laravel: 70-80ms Rx-Jersey: 9-12ms
Attached is a DB dump and here is the model and the controller for reproduction:
vapor_test_2018-07-25.sql.zip